@basis-theory/web-elements 3.0.0-beta.3 → 3.0.0-beta.5

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 (101) hide show
  1. package/dist/.vite/manifest.json +30 -8
  2. package/dist/basis-theory-sdk.es.js +1 -1
  3. package/dist/basis-theory-sdk.umd.js +1 -1
  4. package/dist/basis-theory-sdk.umd.js.map +1 -1
  5. package/dist/{create-card-DipDWgph.js → create-card-CB_YcP_4.js} +58 -20
  6. package/dist/create-card-CB_YcP_4.js.map +1 -0
  7. package/dist/create-card-display-kBupMJwe.js +280 -0
  8. package/dist/create-card-display-kBupMJwe.js.map +1 -0
  9. package/dist/create-copy-button-2XtKTEo3.js +236 -0
  10. package/dist/create-copy-button-2XtKTEo3.js.map +1 -0
  11. package/dist/{index-BBfuUaLw.js → index-Dyy7tm5Z.js} +709 -140
  12. package/dist/index-Dyy7tm5Z.js.map +1 -0
  13. package/dist/index.d.ts +1119 -0
  14. package/dist/loader/basis-theory.min.js +1 -1
  15. package/dist/sri.json +9 -9
  16. package/dist/stats.html +1 -1
  17. package/package.json +12 -12
  18. package/dist/api-client/src/api-client.d.ts +0 -11
  19. package/dist/api-client/src/api-client.d.ts.map +0 -1
  20. package/dist/api-client/src/http-client.d.ts +0 -24
  21. package/dist/api-client/src/http-client.d.ts.map +0 -1
  22. package/dist/api-client/src/index.d.ts +0 -9
  23. package/dist/api-client/src/index.d.ts.map +0 -1
  24. package/dist/api-client/src/services/sessions.d.ts +0 -19
  25. package/dist/api-client/src/services/sessions.d.ts.map +0 -1
  26. package/dist/api-client/src/services/token-intents.d.ts +0 -17
  27. package/dist/api-client/src/services/token-intents.d.ts.map +0 -1
  28. package/dist/api-client/src/services/tokens.d.ts +0 -19
  29. package/dist/api-client/src/services/tokens.d.ts.map +0 -1
  30. package/dist/api-client/src/types.d.ts +0 -313
  31. package/dist/api-client/src/types.d.ts.map +0 -1
  32. package/dist/create-card-DipDWgph.js.map +0 -1
  33. package/dist/index-BBfuUaLw.js.map +0 -1
  34. package/dist/postmessage/src/client.d.ts +0 -7
  35. package/dist/postmessage/src/client.d.ts.map +0 -1
  36. package/dist/postmessage/src/event-map.d.ts +0 -135
  37. package/dist/postmessage/src/event-map.d.ts.map +0 -1
  38. package/dist/postmessage/src/index.d.ts +0 -9
  39. package/dist/postmessage/src/index.d.ts.map +0 -1
  40. package/dist/postmessage/src/server.d.ts +0 -11
  41. package/dist/postmessage/src/server.d.ts.map +0 -1
  42. package/dist/postmessage/src/types.d.ts +0 -71
  43. package/dist/postmessage/src/types.d.ts.map +0 -1
  44. package/dist/shared/src/api-url-resolver.d.ts +0 -22
  45. package/dist/shared/src/api-url-resolver.d.ts.map +0 -1
  46. package/dist/shared/src/debug-logger.d.ts +0 -16
  47. package/dist/shared/src/debug-logger.d.ts.map +0 -1
  48. package/dist/shared/src/deep-sanitization.d.ts +0 -24
  49. package/dist/shared/src/deep-sanitization.d.ts.map +0 -1
  50. package/dist/shared/src/errors.d.ts +0 -93
  51. package/dist/shared/src/errors.d.ts.map +0 -1
  52. package/dist/shared/src/generate-id.d.ts +0 -13
  53. package/dist/shared/src/generate-id.d.ts.map +0 -1
  54. package/dist/shared/src/index.d.ts +0 -13
  55. package/dist/shared/src/index.d.ts.map +0 -1
  56. package/dist/shared/src/logger-context.d.ts +0 -25
  57. package/dist/shared/src/logger-context.d.ts.map +0 -1
  58. package/dist/web-elements/src/BasisTheory.d.ts +0 -47
  59. package/dist/web-elements/src/BasisTheory.d.ts.map +0 -1
  60. package/dist/web-elements/src/basis-theory.d.ts +0 -62
  61. package/dist/web-elements/src/basis-theory.d.ts.map +0 -1
  62. package/dist/web-elements/src/elements/create-card-number.d.ts +0 -14
  63. package/dist/web-elements/src/elements/create-card-number.d.ts.map +0 -1
  64. package/dist/web-elements/src/elements/create-card.d.ts +0 -37
  65. package/dist/web-elements/src/elements/create-card.d.ts.map +0 -1
  66. package/dist/web-elements/src/elements/create-cvv.d.ts +0 -10
  67. package/dist/web-elements/src/elements/create-cvv.d.ts.map +0 -1
  68. package/dist/web-elements/src/elements/create-expiry.d.ts +0 -10
  69. package/dist/web-elements/src/elements/create-expiry.d.ts.map +0 -1
  70. package/dist/web-elements/src/elements/create-text.d.ts +0 -13
  71. package/dist/web-elements/src/elements/create-text.d.ts.map +0 -1
  72. package/dist/web-elements/src/index.d.ts +0 -27
  73. package/dist/web-elements/src/index.d.ts.map +0 -1
  74. package/dist/web-elements/src/mounter/create-mounter.d.ts +0 -11
  75. package/dist/web-elements/src/mounter/create-mounter.d.ts.map +0 -1
  76. package/dist/web-elements/src/theme/default-theme.d.ts +0 -22
  77. package/dist/web-elements/src/theme/default-theme.d.ts.map +0 -1
  78. package/dist/web-elements/src/theme/inject-theme-dark.d.ts +0 -13
  79. package/dist/web-elements/src/theme/inject-theme-dark.d.ts.map +0 -1
  80. package/dist/web-elements/src/theme/inject-theme.d.ts +0 -20
  81. package/dist/web-elements/src/theme/inject-theme.d.ts.map +0 -1
  82. package/dist/web-elements/src/types/events.d.ts +0 -137
  83. package/dist/web-elements/src/types/events.d.ts.map +0 -1
  84. package/dist/web-elements/src/types/theme.d.ts +0 -91
  85. package/dist/web-elements/src/types/theme.d.ts.map +0 -1
  86. package/dist/web-elements/src/types.d.ts +0 -537
  87. package/dist/web-elements/src/types.d.ts.map +0 -1
  88. package/dist/web-elements/src/utils/create-event-dispatcher.d.ts +0 -47
  89. package/dist/web-elements/src/utils/create-event-dispatcher.d.ts.map +0 -1
  90. package/dist/web-elements/src/utils/create-iframe.d.ts +0 -10
  91. package/dist/web-elements/src/utils/create-iframe.d.ts.map +0 -1
  92. package/dist/web-elements/src/utils/resolve-element-references.d.ts +0 -20
  93. package/dist/web-elements/src/utils/resolve-element-references.d.ts.map +0 -1
  94. package/dist/web-elements/src/utils/validate-element-options.d.ts +0 -11
  95. package/dist/web-elements/src/utils/validate-element-options.d.ts.map +0 -1
  96. package/dist/web-elements/src/utils/validate-sdk-config.d.ts +0 -15
  97. package/dist/web-elements/src/utils/validate-sdk-config.d.ts.map +0 -1
  98. package/dist/web-elements/src/utils/warn-unknown-keys.d.ts +0 -15
  99. package/dist/web-elements/src/utils/warn-unknown-keys.d.ts.map +0 -1
  100. package/dist/web-elements/src/version.d.ts +0 -25
  101. package/dist/web-elements/src/version.d.ts.map +0 -1
@@ -1,71 +0,0 @@
1
- /**
2
- * PostMessage Module Types
3
- * Production-ready type definitions for secure cross-iframe communication
4
- */
5
- /**
6
- * Message types using semantic prefixes
7
- * EVENT_* = iframe → parent, CMD_* = parent → iframe, RESPONSE_* = follows request
8
- */
9
- export type ElementEvent = 'EVENT_READY' | 'EVENT_MASK_READY' | 'EVENT_VALUE_CHANGED' | 'EVENT_FOCUS' | 'EVENT_BLUR' | 'EVENT_ERROR';
10
- export type ElementCommand = 'CMD_SET_CONFIG' | 'CMD_SET_VALUE' | 'CMD_FOCUS' | 'CMD_BLUR' | 'CMD_CLEAR' | 'CMD_TOKENIZE' | 'CMD_TOKENS_ENCRYPT' | 'CMD_VALIDATE';
11
- export type ElementResponse = 'RESPONSE_CONFIG_OK' | 'RESPONSE_CONFIG_ERROR' | 'RESPONSE_TOKEN_OK' | 'RESPONSE_TOKEN_ERROR' | 'RESPONSE_VALIDATION';
12
- export type SystemMessage = 'SYS_PING' | 'SYS_PONG' | 'SYS_ACK';
13
- export type MessageType = ElementEvent | ElementCommand | ElementResponse | SystemMessage;
14
- export interface RetryConfig {
15
- maxRetries: number;
16
- initialDelay: number;
17
- maxDelay: number;
18
- backoffFactor: number;
19
- }
20
- export interface PostMessageConfig {
21
- targetOrigin: string;
22
- timeout?: number;
23
- retries?: number | RetryConfig;
24
- debug?: boolean;
25
- }
26
- export interface PostMessageRequest<T = any> {
27
- type: MessageType | string;
28
- nonce: string;
29
- timestamp: number;
30
- payload?: T;
31
- }
32
- export interface PostMessageResponse<T = any> {
33
- type: MessageType | string;
34
- nonce: string;
35
- timestamp: number;
36
- payload?: T;
37
- error?: PostMessageError;
38
- }
39
- export type TimeoutReason = 'timeout' | 'blocked' | 'origin_mismatch' | 'network';
40
- export interface PostMessageError {
41
- code: string;
42
- message: string;
43
- reason?: TimeoutReason;
44
- status?: number;
45
- statusCode?: number;
46
- validationErrors?: Record<string, string[]>;
47
- body?: any;
48
- retryCount?: number;
49
- details?: Record<string, unknown>;
50
- }
51
- export interface PendingRequest<T = any> {
52
- resolve: (value: T) => void;
53
- reject: (error: Error) => void;
54
- timeout: NodeJS.Timeout;
55
- timestamp: number;
56
- }
57
- export type MessageHandler<TRequest = any, TResponse = any> = (payload: TRequest) => Promise<TResponse> | TResponse;
58
- export interface PostMessageClient {
59
- sendRequest<TResponse = any, TRequest = any>(type: string, payload?: TRequest): Promise<TResponse>;
60
- ping(timeout?: number): Promise<number>;
61
- subscribe(type: string, callback: (payload: any) => void): () => void;
62
- destroy(): void;
63
- getPendingCount(): number;
64
- }
65
- export interface PostMessageServer {
66
- handle<TRequest = any, TResponse = any>(type: string, handler: MessageHandler<TRequest, TResponse>): void;
67
- broadcast(type: string, payload?: any): void;
68
- destroy(): void;
69
- getHandlerCount(): number;
70
- }
71
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../postmessage/src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,kBAAkB,GAClB,qBAAqB,GACrB,aAAa,GACb,YAAY,GACZ,aAAa,CAAC;AAElB,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,eAAe,GACf,WAAW,GACX,UAAU,GACV,WAAW,GACX,cAAc,GACd,oBAAoB,GACpB,cAAc,CAAC;AAEnB,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,uBAAuB,GACvB,mBAAmB,GACnB,sBAAsB,GACtB,qBAAqB,CAAC;AAE1B,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,SA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O,IAAI,IAAI,CAAC;IAChB,eAAe,IAAI,MAAM,CAAC;CAC3B"}
@@ -1,22 +0,0 @@
1
- /**
2
- * API URL Resolution Utility
3
- *
4
- * Simple same-origin API detection for v3
5
- * Shared across SDK and Elements packages
6
- */
7
- /**
8
- * Get default API base URL
9
- *
10
- * If user provides apiBaseUrl, use it.
11
- * Otherwise auto-detect based on environment:
12
- * - localhost or dev → https://js.flock-dev.com/api
13
- * - uat → https://js.btsandbox.com/api
14
- * - prod → https://js.basistheory.com/api
15
- *
16
- * @param userProvidedUrl - Optional user-provided API URL
17
- * @param enforceOrigin - If true, throws error for unauthorized origins (default: false)
18
- * SDK: false (runs on customer domains)
19
- * Elements: true (must run on BasisTheory domains)
20
- */
21
- export declare const getDefaultApiBaseUrl: (userProvidedUrl?: string, enforceOrigin?: boolean) => string;
22
- //# sourceMappingURL=api-url-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-url-resolver.d.ts","sourceRoot":"","sources":["../../../../shared/src/api-url-resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,GAC/B,kBAAkB,MAAM,EACxB,uBAAqB,KACpB,MAkCF,CAAC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Universal Debug Logger
3
- * PCI-compliant logging that never exposes sensitive data
4
- *
5
- * FR-005: Deep Logger Sanitization
6
- * - Recursively sanitizes nested objects/arrays
7
- * - Masks PANs to first 6 + last 4
8
- * - Redacts CVV/PIN/passwords completely
9
- * - Handles circular references
10
- */
11
- export type DebugLogger = (action: string, metadata?: Record<string, unknown>) => void;
12
- /**
13
- * Create a debug logger for a specific package
14
- */
15
- export declare const createDebugLogger: (packageName: string, enabled: boolean) => DebugLogger;
16
- //# sourceMappingURL=debug-logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug-logger.d.ts","sourceRoot":"","sources":["../../../../shared/src/debug-logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,MAAM,WAAW,GAAG,CACxB,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC/B,IAAI,CAAC;AAiDV;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,EACnB,SAAS,OAAO,KACf,WAUF,CAAC"}
@@ -1,24 +0,0 @@
1
- /**
2
- * FR-005: Deep Logger Sanitization
3
- * PCI-DSS Requirement 3.2 - Never Store Sensitive Authentication Data
4
- *
5
- * Recursively sanitizes objects to prevent PAN/CVV leakage in logs.
6
- */
7
- /**
8
- * Check if a field name matches PAN patterns
9
- */
10
- export declare const isPANField: (key: string) => boolean;
11
- /**
12
- * Check if a field name matches redact patterns
13
- */
14
- export declare const isRedactField: (key: string) => boolean;
15
- /**
16
- * Deep sanitize an unknown value
17
- *
18
- * @param data - Data to sanitize
19
- * @param depth - Current recursion depth (max 5)
20
- * @param visited - WeakSet to track visited objects (circular reference detection)
21
- * @returns Sanitized data
22
- */
23
- export declare const sanitizeDeep: (data: unknown, depth?: number, ancestors?: WeakSet<object>) => unknown;
24
- //# sourceMappingURL=deep-sanitization.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deep-sanitization.d.ts","sourceRoot":"","sources":["../../../../shared/src/deep-sanitization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,OAExC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,OAE3C,CAAC;AAgFF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,OAAO,EACb,cAAS,EACT,2BAAiC,KAChC,OAgEF,CAAC"}
@@ -1,93 +0,0 @@
1
- /**
2
- * BasisTheory Structured Error Types
3
- *
4
- * Functional error factories for consistent error handling across SDK, Elements, and API Client.
5
- */
6
- export interface BasisTheoryErrorType extends Error {
7
- readonly code: string;
8
- readonly details?: Record<string, any>;
9
- toJSON: () => {
10
- name: string;
11
- code: string;
12
- message: string;
13
- details?: Record<string, any>;
14
- };
15
- }
16
- /**
17
- * Base BasisTheoryError factory
18
- * Creates error objects with consistent structure
19
- */
20
- export declare const createBasisTheoryError: (code: string, message: string, details?: Record<string, any>) => BasisTheoryErrorType;
21
- /**
22
- * BasisTheoryError - Generic base error
23
- */
24
- export declare const BasisTheoryError: (code: string, message: string, details?: Record<string, any>) => BasisTheoryErrorType;
25
- /**
26
- * ValidationError - Input validation failures
27
- *
28
- * @example
29
- * throw ValidationError('Card number is invalid', 'cardNumber', {
30
- * received: '1234',
31
- * expected: '13-19 digits'
32
- * });
33
- */
34
- export interface ValidationErrorType extends BasisTheoryErrorType {
35
- readonly field?: string;
36
- }
37
- export declare const ValidationError: (message: string, field?: string, details?: Record<string, any>) => ValidationErrorType;
38
- /**
39
- * CoordinatorError - Errors from coordinator iframe operations
40
- *
41
- * @example
42
- * throw CoordinatorError('Tokenization failed', {
43
- * operation: 'tokenize',
44
- * elementId: 'card-123'
45
- * });
46
- */
47
- export declare const CoordinatorError: (message: string, details?: Record<string, any>) => BasisTheoryErrorType;
48
- /**
49
- * ElementError - Errors from element iframe operations
50
- *
51
- * @example
52
- * throw ElementError('Element not mounted', 'card-number-123', {
53
- * reason: 'mount() was never called'
54
- * });
55
- */
56
- export interface ElementErrorType extends BasisTheoryErrorType {
57
- readonly elementId?: string;
58
- }
59
- export declare const ElementError: (message: string, elementId?: string, details?: Record<string, any>) => ElementErrorType;
60
- /**
61
- * NetworkError - HTTP/Network-related errors
62
- *
63
- * @example
64
- * throw NetworkError('API request failed', 500, {
65
- * url: 'https://api.basistheory.com/tokens',
66
- * method: 'POST'
67
- * });
68
- */
69
- export interface NetworkErrorType extends BasisTheoryErrorType {
70
- readonly statusCode?: number;
71
- }
72
- export declare const NetworkError: (message: string, statusCode?: number, details?: Record<string, any>) => NetworkErrorType;
73
- /**
74
- * ConfigurationError - SDK/Element configuration errors
75
- *
76
- * @example
77
- * throw ConfigurationError('Invalid API key', {
78
- * provided: 'key_test_invalid',
79
- * expected: 'key_test_* or key_live_*'
80
- * });
81
- */
82
- export declare const ConfigurationError: (message: string, details?: Record<string, any>) => BasisTheoryErrorType;
83
- /**
84
- * EncryptionError - Client-side encryption errors
85
- *
86
- * @example
87
- * throw EncryptionError('JWE encryption failed', 'ENCRYPTION_FAILED', {
88
- * algorithm: 'ECDH-ES',
89
- * keyId: 'key_123'
90
- * });
91
- */
92
- export declare const EncryptionError: (message: string, code?: string, details?: Record<string, any>) => BasisTheoryErrorType;
93
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../shared/src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,oBAAqB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC/B,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,MAAM,EACZ,SAAS,MAAM,EACf,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5B,oBAoBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,SAAS,MAAM,EACf,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5B,oBAIF,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,GAC1B,SAAS,MAAM,EACf,QAAQ,MAAM,EACd,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5B,mBAWF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,MAAM,EACf,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5B,oBAIF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY,GACvB,SAAS,MAAM,EACf,YAAY,MAAM,EAClB,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5B,gBAWF,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,YAAY,GACvB,SAAS,MAAM,EACf,aAAa,MAAM,EACnB,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5B,gBAWF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,EACf,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5B,oBAIF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,MAAM,EACf,OAAM,MAA2B,EACjC,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC5B,oBAIF,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Generate a unique identifier for elements
3
- *
4
- * Uses crypto.randomUUID() if available (Node 14.17+, all modern browsers)
5
- * Falls back to Math.random() for older environments (rare)
6
- *
7
- * Format: Standard UUID v4 (e.g., "550e8400-e29b-41d4-a716-446655440000")
8
- *
9
- * Note: This utility is rarely needed as the coordinator generates element IDs
10
- * via CMD_REGISTER_ELEMENT using crypto.randomUUID() directly.
11
- */
12
- export declare const generateId: () => string;
13
- //# sourceMappingURL=generate-id.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-id.d.ts","sourceRoot":"","sources":["../../../../shared/src/generate-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,QAAO,MAuB7B,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * @basis-theory-elements/shared
3
- * Shared utilities for all BasisTheory Elements packages
4
- */
5
- export { createDebugLogger } from './debug-logger';
6
- export type { DebugLogger } from './debug-logger';
7
- export { sanitizeDeep } from './deep-sanitization';
8
- export { getDefaultApiBaseUrl } from './api-url-resolver';
9
- export { generateId } from './generate-id';
10
- export { configureLogger, getLogger, log } from './logger-context';
11
- export { BasisTheoryError, ValidationError, CoordinatorError, ElementError, NetworkError, ConfigurationError, EncryptionError, } from './errors';
12
- export type { BasisTheoryErrorType, ValidationErrorType, ElementErrorType, NetworkErrorType, } from './errors';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../shared/src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAGnE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,UAAU,CAAC"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Shared Logger Context
3
- *
4
- * Provides a global logger instance that can be controlled by the coordinator.
5
- * Elements import this and use the shared logger without passing it around.
6
- */
7
- import { type DebugLogger } from './debug-logger';
8
- /**
9
- * Configure the global logger (called by coordinator on init)
10
- *
11
- * @param packageName - Package name for log prefix
12
- * @param enabled - Whether debug logging is enabled
13
- */
14
- export declare const configureLogger: (packageName: string, enabled: boolean) => void;
15
- /**
16
- * Get the current logger instance
17
- *
18
- * Elements use this to get the shared logger
19
- */
20
- export declare const getLogger: () => DebugLogger;
21
- /**
22
- * Convenience: Log directly without getting logger first
23
- */
24
- export declare const log: (action: string, metadata?: Record<string, unknown>) => void;
25
- //# sourceMappingURL=logger-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger-context.d.ts","sourceRoot":"","sources":["../../../../shared/src/logger-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOrE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,aAAa,MAAM,EACnB,SAAS,OAAO,KACf,IAEF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,QAAO,WAA2B,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,GAAG,GACd,QAAQ,MAAM,EACd,WAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACjC,IAEF,CAAC"}
@@ -1,47 +0,0 @@
1
- /**
2
- * @basis-theory/web-elements
3
- * Main SDK factory function
4
- */
5
- import type { BasisTheorySDK, SDKOptions } from './types';
6
- /**
7
- * Queued command from loader
8
- * Commands are queued before SDK loads, then replayed
9
- */
10
- interface QueuedCommand {
11
- method: 'createElement' | 'tokenize' | 'updateThemeMode';
12
- args: any[];
13
- resolve: (result: any) => void;
14
- reject: (error: Error) => void;
15
- }
16
- /**
17
- * Creates a BasisTheory SDK instance
18
- * Factory function (no class, pure functional approach)
19
- *
20
- * @param apiKey - Your Basis Theory public API key (starts with 'pk_')
21
- * @param options - SDK configuration options
22
- * @param queuedCommands - Optional: Commands queued by loader before SDK loaded
23
- * @returns SDK instance with methods to create and tokenize elements
24
- *
25
- * @example
26
- * ```typescript
27
- * import BasisTheory from '@basis-theory/web-elements';
28
- *
29
- * const bt = BasisTheory('pk_test_YOUR_API_KEY');
30
- *
31
- * const cardNumber = bt.createElement('cardNumber', {
32
- * placeholder: '4111 1111 1111 1111'
33
- * });
34
- *
35
- * await cardNumber.mount('#card-number');
36
- * ```
37
- */
38
- declare const BasisTheory: (apiKey: string, options?: SDKOptions, queuedCommands?: QueuedCommand[]) => BasisTheorySDK;
39
- declare global {
40
- interface Window {
41
- BasisTheory?: typeof BasisTheory;
42
- }
43
- }
44
- export default BasisTheory;
45
- export { BasisTheory };
46
- export type { BasisTheorySDK, CardElement, ChangeEventDetail, Element, ElementOptions, ElementType, ErrorEventDetail, EventListener, EventType, ReadyEventDetail, SDKOptions, TokenizeInput, TokenizeResult, } from './types';
47
- //# sourceMappingURL=BasisTheory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BasisTheory.d.ts","sourceRoot":"","sources":["../../../src/BasisTheory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,KAAK,EACV,cAAc,EAOd,UAAU,EAQX,MAAM,SAAS,CAAC;AAMjB;;;GAGG;AACH,UAAU,aAAa;IACrB,MAAM,EAAE,eAAe,GAAG,UAAU,GAAG,iBAAiB,CAAC;IACzD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,WAAW,GACf,QAAQ,MAAM,EACd,UAAS,UAAe,EACxB,iBAAiB,aAAa,EAAE,KAC/B,cAi2BF,CAAC;AAMF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,WAAW,CAAC,EAAE,OAAO,WAAW,CAAC;KAClC;CACF;AAgBD,eAAe,WAAW,CAAC;AAG3B,OAAO,EAAE,WAAW,EAAE,CAAC;AAGvB,YAAY,EACV,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,cAAc,GACf,MAAM,SAAS,CAAC"}
@@ -1,62 +0,0 @@
1
- /**
2
- * BasisTheory SDK Loader
3
- *
4
- * Ultra-minimal loader that:
5
- * 1. Attaches to window.BasisTheory immediately (<10ms)
6
- * 2. Queues API calls until the full SDK loads
7
- * 3. Asynchronously loads the full SDK
8
- * 4. Replays queued commands when SDK is ready
9
- *
10
- * Target Size: 2-4 KB minified+gzipped
11
- */
12
- type QueuedCommand = {
13
- type: 'init';
14
- apiKey: string;
15
- options?: any;
16
- timestamp: number;
17
- } | {
18
- type: 'createElement';
19
- args: any[];
20
- timestamp: number;
21
- } | {
22
- type: 'tokenize';
23
- args: any[];
24
- timestamp: number;
25
- } | {
26
- type: 'updateThemeMode';
27
- args: any[];
28
- timestamp: number;
29
- };
30
- type LoaderAPI = {
31
- createElement: (...args: any[]) => any;
32
- tokenize: (...args: any[]) => Promise<any>;
33
- updateThemeMode: (...args: any[]) => void;
34
- tokens: {
35
- create: (...args: any[]) => Promise<any>;
36
- retrieve: (...args: any[]) => Promise<any>;
37
- update: (...args: any[]) => Promise<any>;
38
- encrypt: (...args: any[]) => Promise<any>;
39
- };
40
- tokenIntents: {
41
- create: (...args: any[]) => Promise<any>;
42
- get: (...args: any[]) => Promise<any>;
43
- };
44
- sessions: {
45
- create: (...args: any[]) => Promise<any>;
46
- };
47
- __queue?: QueuedCommand[];
48
- __loaderVersion?: string;
49
- };
50
- /**
51
- * Loader Factory
52
- * Creates the minimal facade that gets attached to window.BasisTheory
53
- */
54
- export declare function createLoader(config: {
55
- sdkUrl: string;
56
- version?: string;
57
- onSdkReady?: () => void;
58
- debug?: boolean;
59
- sdkSriHash?: string;
60
- }): (apiKey: string, options?: any) => LoaderAPI;
61
- export {};
62
- //# sourceMappingURL=basis-theory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"basis-theory.d.ts","sourceRoot":"","sources":["../../../src/basis-theory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,KAAK,aAAa,GACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAClE;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,GAAG,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,GAAG,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,IAAI,EAAE,GAAG,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,KAAK,SAAS,GAAG;IACf,aAAa,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IACvC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3C,eAAe,EAAE,CAAC,GAAG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
- import type { Element, ElementOptions, SDKConfig } from '../types';
5
- /**
6
- * Factory function to create a card number element
7
- * No class, pure functional approach with closure-based state
8
- *
9
- * PERFORMANCE OPTIMIZATION (Step 3):
10
- * Now receives LAZY coordinator initializer - mount() calls it when needed
11
- */
12
- export declare const createCardNumberElement: (apiKey: string, sdkConfig: SDKConfig, options: ElementOptions | undefined, coordinatorElementId: string, // Unique ID (now generated locally)
13
- ensureCoordinatorReady: () => Promise<void>) => Element;
14
- //# sourceMappingURL=create-card-number.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-card-number.d.ts","sourceRoot":"","sources":["../../../../src/elements/create-card-number.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EACV,OAAO,EAEP,cAAc,EAGd,SAAS,EACV,MAAM,UAAU,CAAC;AAIlB;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,GAClC,QAAQ,MAAM,EACd,WAAW,SAAS,EACpB,SAAS,cAAc,YAAK,EAC5B,sBAAsB,MAAM,EAAE,oCAAoC;AAClE,wBAAwB,MAAM,OAAO,CAAC,IAAI,CAAC,KAC1C,OAgSF,CAAC"}
@@ -1,37 +0,0 @@
1
- /**
2
- * Card Element Factory (Unified)
3
- */
4
- import type { CardElement, SDKConfig } from '../types';
5
- /**
6
- * Card element options
7
- */
8
- export interface CardElementOptions {
9
- /** CSS styling */
10
- style?: Record<string, any>;
11
- /** Placeholder text for each sub-field */
12
- placeholder?: {
13
- cardNumber?: string;
14
- expiryDate?: string;
15
- cvc?: string;
16
- };
17
- /** Accessibility label */
18
- ariaLabel?: string;
19
- /** Disabled state (applies to all 3 sub-fields) */
20
- disabled?: boolean;
21
- /** Read-only state (applies to all 3 sub-fields) */
22
- readOnly?: boolean;
23
- /** Layout mode */
24
- layout?: 'row' | 'column' | 'auto';
25
- /** Stack threshold in pixels (only applies when layout: 'auto') */
26
- stackAt?: number;
27
- /** Icon position */
28
- iconPosition?: 'left' | 'right' | 'none';
29
- /** Restrict accepted card brands */
30
- cardBrands?: string[];
31
- }
32
- /**
33
- * Factory function to create a unified card element
34
- * No class, pure functional approach with closure-based state
35
- */
36
- export declare const createCardElement: (apiKey: string, sdkConfig: SDKConfig, options: CardElementOptions | undefined, coordinatorElementId: string, ensureCoordinatorReady: () => Promise<void>) => CardElement;
37
- //# sourceMappingURL=create-card.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-card.d.ts","sourceRoot":"","sources":["../../../../src/elements/create-card.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EACV,WAAW,EAKX,SAAS,EAEV,MAAM,UAAU,CAAC;AAUlB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE5B,0CAA0C;IAC1C,WAAW,CAAC,EAAE;QACZ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IAEF,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,kBAAkB;IAClB,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEnC,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,oBAAoB;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAEzC,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,MAAM,EACd,WAAW,SAAS,EACpB,SAAS,kBAAkB,YAAK,EAChC,sBAAsB,MAAM,EAC5B,wBAAwB,MAAM,OAAO,CAAC,IAAI,CAAC,KAC1C,WAiTF,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * CVV Element Factory
3
- */
4
- import type { Element, ElementOptions, SDKConfig } from '../types';
5
- /**
6
- * Factory function to create a CVV element
7
- */
8
- export declare const createCVVElement: (apiKey: string, sdkConfig: SDKConfig, options: ElementOptions | undefined, coordinatorElementId: string, // Unique ID (now generated locally)
9
- ensureCoordinatorReady: () => Promise<void>) => Element;
10
- //# sourceMappingURL=create-cvv.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-cvv.d.ts","sourceRoot":"","sources":["../../../../src/elements/create-cvv.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EACV,OAAO,EAEP,cAAc,EAGd,SAAS,EACV,MAAM,UAAU,CAAC;AAIlB;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,MAAM,EACd,WAAW,SAAS,EACpB,SAAS,cAAc,YAAK,EAC5B,sBAAsB,MAAM,EAAE,oCAAoC;AAClE,wBAAwB,MAAM,OAAO,CAAC,IAAI,CAAC,KAC1C,OA8QF,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Expiry Date Element Factory
3
- */
4
- import type { Element, ElementOptions, SDKConfig } from '../types';
5
- /**
6
- * Factory function to create an expiry date element
7
- */
8
- export declare const createExpiryElement: (apiKey: string, sdkConfig: SDKConfig, options: ElementOptions | undefined, coordinatorElementId: string, // Unique ID (now generated locally)
9
- ensureCoordinatorReady: () => Promise<void>) => Element;
10
- //# sourceMappingURL=create-expiry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-expiry.d.ts","sourceRoot":"","sources":["../../../../src/elements/create-expiry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EACV,OAAO,EAEP,cAAc,EAGd,SAAS,EACV,MAAM,UAAU,CAAC;AAIlB;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,MAAM,EACd,WAAW,SAAS,EACpB,SAAS,cAAc,YAAK,EAC5B,sBAAsB,MAAM,EAAE,oCAAoC;AAClE,wBAAwB,MAAM,OAAO,CAAC,IAAI,CAAC,KAC1C,OA0QF,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Text Element Factory
3
- *
4
- * General-purpose text input with optional validation and masking
5
- * Follows same pattern as CVV/Expiry elements
6
- */
7
- import type { Element, ElementOptions, SDKConfig } from '../types';
8
- /**
9
- * Factory function to create a text element
10
- */
11
- export declare const createTextElement: (apiKey: string, sdkConfig: SDKConfig, options: ElementOptions | undefined, coordinatorElementId: string, // Unique ID (now generated locally)
12
- ensureCoordinatorReady: () => Promise<void>) => Element;
13
- //# sourceMappingURL=create-text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-text.d.ts","sourceRoot":"","sources":["../../../../src/elements/create-text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACV,OAAO,EAEP,cAAc,EAGd,SAAS,EACV,MAAM,UAAU,CAAC;AAIlB;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,MAAM,EACd,WAAW,SAAS,EACpB,SAAS,cAAc,YAAK,EAC5B,sBAAsB,MAAM,EAAE,oCAAoC;AAClE,wBAAwB,MAAM,OAAO,CAAC,IAAI,CAAC,KAC1C,OA8TF,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * @basis-theory/web-elements
3
- * Secure, PCI-compliant SDK for creating payment input elements
4
- *
5
- * @example ESM (bundlers)
6
- * ```typescript
7
- * import BasisTheory from '@basis-theory/web-elements';
8
- *
9
- * const bt = BasisTheory('pk_test_YOUR_API_KEY');
10
- * const cardNumber = bt.createElement('cardNumber');
11
- * await cardNumber.mount('#card-number');
12
- * ```
13
- *
14
- * @example UMD (script tags)
15
- * ```html
16
- * <script src="https://cdn.basistheory.com/elements/index.umd.js"></script>
17
- * <script>
18
- * const bt = window.BasisTheory('pk_test_YOUR_API_KEY');
19
- * const cardNumber = bt.createElement('cardNumber');
20
- * cardNumber.mount('#card-number');
21
- * </script>
22
- * ```
23
- */
24
- export { default } from './BasisTheory';
25
- export { version, buildDate } from './version';
26
- export type { BaseEventDetail, BasisTheorySDK, BlurEventDetail, CardElement, CardElementChangeEventDetail, CardElementOptions, CardNumberChangeEventDetail, ChangeEventDetail, Element, ElementInputArray, ElementInputObject, ElementLeaf, ElementOptions, ElementType, EncryptedToken, EncryptToken, ErrorCode, ErrorEventDetail, EventListener, EventType, FocusEventDetail, ReadyEventDetail, SDKOptions, Session, SubElementRef, TokenCreateRequest, TokenIntent, TokenIntentRequest, TokenizeInput, TokenizeResult, TokenUpdateRequest, ValidationError, } from './types';
27
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAS/C,YAAY,EACV,eAAe,EACf,cAAc,EACd,eAAe,EACf,WAAW,EACX,4BAA4B,EAC5B,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,WAAW,EACX,cAAc,EACd,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,eAAe,GAChB,MAAM,SAAS,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Element Mounter Factory
3
- * Handles DOM mounting/unmounting of iframes
4
- */
5
- import type { ElementMounter } from '../types';
6
- /**
7
- * Factory function to create an element mounter
8
- * Handles DOM mounting/unmounting of iframes
9
- */
10
- export declare const createMounter: () => ElementMounter;
11
- //# sourceMappingURL=create-mounter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-mounter.d.ts","sourceRoot":"","sources":["../../../../src/mounter/create-mounter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,UAAU,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,cAkChC,CAAC"}
@@ -1,22 +0,0 @@
1
- /**
2
- * Default Theme
3
- * Provides sensible defaults for all theme tokens
4
- */
5
- import type { ThemeTokens } from '../types/theme';
6
- /**
7
- * Default light theme
8
- * Inspired by Tailwind CSS color system + Inter font
9
- */
10
- export declare const DEFAULT_THEME: ThemeTokens;
11
- /**
12
- * Default dark theme
13
- * Optimized for dark mode with high contrast
14
- */
15
- export declare const DEFAULT_DARK_THEME: ThemeTokens;
16
- /**
17
- * Merge user theme with default theme
18
- * User values take precedence, missing values use defaults
19
- * Handles nested color groups (text, background, border)
20
- */
21
- export declare const mergeWithDefaultTheme: (userTheme?: Partial<ThemeTokens>) => ThemeTokens;
22
- //# sourceMappingURL=default-theme.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"default-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/default-theme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,WA8E3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,WA6EhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,YAAY,OAAO,CAAC,WAAW,CAAC,KAC/B,WAmDF,CAAC"}