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

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 (104) hide show
  1. package/README.md +343 -2
  2. package/dist/.vite/manifest.json +27 -0
  3. package/dist/api-client/src/api-client.d.ts +11 -0
  4. package/dist/api-client/src/api-client.d.ts.map +1 -0
  5. package/dist/api-client/src/http-client.d.ts +24 -0
  6. package/dist/api-client/src/http-client.d.ts.map +1 -0
  7. package/dist/api-client/src/index.d.ts +9 -0
  8. package/dist/api-client/src/index.d.ts.map +1 -0
  9. package/dist/api-client/src/services/sessions.d.ts +19 -0
  10. package/dist/api-client/src/services/sessions.d.ts.map +1 -0
  11. package/dist/api-client/src/services/token-intents.d.ts +17 -0
  12. package/dist/api-client/src/services/token-intents.d.ts.map +1 -0
  13. package/dist/api-client/src/services/tokens.d.ts +19 -0
  14. package/dist/api-client/src/services/tokens.d.ts.map +1 -0
  15. package/dist/api-client/src/types.d.ts +313 -0
  16. package/dist/api-client/src/types.d.ts.map +1 -0
  17. package/dist/basis-theory-sdk.es.js +6 -0
  18. package/dist/basis-theory-sdk.es.js.map +1 -0
  19. package/dist/basis-theory-sdk.umd.js +1 -0
  20. package/dist/basis-theory-sdk.umd.js.map +1 -0
  21. package/dist/create-card-DipDWgph.js +232 -0
  22. package/dist/create-card-DipDWgph.js.map +1 -0
  23. package/dist/index-BBfuUaLw.js +2317 -0
  24. package/dist/index-BBfuUaLw.js.map +1 -0
  25. package/dist/loader/basis-theory.min.js +1 -0
  26. package/dist/postmessage/src/client.d.ts +7 -0
  27. package/dist/postmessage/src/client.d.ts.map +1 -0
  28. package/dist/postmessage/src/event-map.d.ts +135 -0
  29. package/dist/postmessage/src/event-map.d.ts.map +1 -0
  30. package/dist/postmessage/src/index.d.ts +9 -0
  31. package/dist/postmessage/src/index.d.ts.map +1 -0
  32. package/dist/postmessage/src/server.d.ts +11 -0
  33. package/dist/postmessage/src/server.d.ts.map +1 -0
  34. package/dist/postmessage/src/types.d.ts +71 -0
  35. package/dist/postmessage/src/types.d.ts.map +1 -0
  36. package/dist/shared/src/api-url-resolver.d.ts +22 -0
  37. package/dist/shared/src/api-url-resolver.d.ts.map +1 -0
  38. package/dist/shared/src/debug-logger.d.ts +16 -0
  39. package/dist/shared/src/debug-logger.d.ts.map +1 -0
  40. package/dist/shared/src/deep-sanitization.d.ts +24 -0
  41. package/dist/shared/src/deep-sanitization.d.ts.map +1 -0
  42. package/dist/shared/src/errors.d.ts +93 -0
  43. package/dist/shared/src/errors.d.ts.map +1 -0
  44. package/dist/shared/src/generate-id.d.ts +13 -0
  45. package/dist/shared/src/generate-id.d.ts.map +1 -0
  46. package/dist/shared/src/index.d.ts +13 -0
  47. package/dist/shared/src/index.d.ts.map +1 -0
  48. package/dist/shared/src/logger-context.d.ts +25 -0
  49. package/dist/shared/src/logger-context.d.ts.map +1 -0
  50. package/dist/sri.json +22 -0
  51. package/dist/stats.html +4949 -0
  52. package/dist/web-elements/src/BasisTheory.d.ts +47 -0
  53. package/dist/web-elements/src/BasisTheory.d.ts.map +1 -0
  54. package/dist/web-elements/src/basis-theory.d.ts +62 -0
  55. package/dist/web-elements/src/basis-theory.d.ts.map +1 -0
  56. package/dist/web-elements/src/elements/create-card-number.d.ts +14 -0
  57. package/dist/web-elements/src/elements/create-card-number.d.ts.map +1 -0
  58. package/dist/web-elements/src/elements/create-card.d.ts +37 -0
  59. package/dist/web-elements/src/elements/create-card.d.ts.map +1 -0
  60. package/dist/web-elements/src/elements/create-cvv.d.ts +10 -0
  61. package/dist/web-elements/src/elements/create-cvv.d.ts.map +1 -0
  62. package/dist/web-elements/src/elements/create-expiry.d.ts +10 -0
  63. package/dist/web-elements/src/elements/create-expiry.d.ts.map +1 -0
  64. package/dist/web-elements/src/elements/create-text.d.ts +13 -0
  65. package/dist/web-elements/src/elements/create-text.d.ts.map +1 -0
  66. package/dist/web-elements/src/index.d.ts +27 -0
  67. package/dist/web-elements/src/index.d.ts.map +1 -0
  68. package/dist/web-elements/src/mounter/create-mounter.d.ts +11 -0
  69. package/dist/web-elements/src/mounter/create-mounter.d.ts.map +1 -0
  70. package/dist/web-elements/src/theme/default-theme.d.ts +22 -0
  71. package/dist/web-elements/src/theme/default-theme.d.ts.map +1 -0
  72. package/dist/web-elements/src/theme/inject-theme-dark.d.ts +13 -0
  73. package/dist/web-elements/src/theme/inject-theme-dark.d.ts.map +1 -0
  74. package/dist/web-elements/src/theme/inject-theme.d.ts +20 -0
  75. package/dist/web-elements/src/theme/inject-theme.d.ts.map +1 -0
  76. package/dist/web-elements/src/types/events.d.ts +137 -0
  77. package/dist/web-elements/src/types/events.d.ts.map +1 -0
  78. package/dist/web-elements/src/types/theme.d.ts +91 -0
  79. package/dist/web-elements/src/types/theme.d.ts.map +1 -0
  80. package/dist/web-elements/src/types.d.ts +537 -0
  81. package/dist/web-elements/src/types.d.ts.map +1 -0
  82. package/dist/web-elements/src/utils/create-event-dispatcher.d.ts +47 -0
  83. package/dist/web-elements/src/utils/create-event-dispatcher.d.ts.map +1 -0
  84. package/dist/web-elements/src/utils/create-iframe.d.ts +10 -0
  85. package/dist/web-elements/src/utils/create-iframe.d.ts.map +1 -0
  86. package/dist/web-elements/src/utils/resolve-element-references.d.ts +20 -0
  87. package/dist/web-elements/src/utils/resolve-element-references.d.ts.map +1 -0
  88. package/dist/web-elements/src/utils/validate-element-options.d.ts +11 -0
  89. package/dist/web-elements/src/utils/validate-element-options.d.ts.map +1 -0
  90. package/dist/web-elements/src/utils/validate-sdk-config.d.ts +15 -0
  91. package/dist/web-elements/src/utils/validate-sdk-config.d.ts.map +1 -0
  92. package/dist/web-elements/src/utils/warn-unknown-keys.d.ts +15 -0
  93. package/dist/web-elements/src/utils/warn-unknown-keys.d.ts.map +1 -0
  94. package/dist/web-elements/src/version.d.ts +25 -0
  95. package/dist/web-elements/src/version.d.ts.map +1 -0
  96. package/package.json +53 -72
  97. package/LICENSE +0 -202
  98. package/dist/LICENSE +0 -202
  99. package/dist/README.md +0 -3
  100. package/dist/bundle/index.js +0 -1
  101. package/dist/main/index.js +0 -1161
  102. package/dist/module/module.js +0 -1159
  103. package/dist/package.json +0 -37
  104. package/dist/types/index.d.ts +0 -732
@@ -0,0 +1,47 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,62 @@
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
@@ -0,0 +1 @@
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;IAA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EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,SAAS,CA+Z/C"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Card Number Element Factory
3
+ */
4
+ 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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,37 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,13 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,27 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,22 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Dark Theme Support Utilities
3
+ * Generates theme CSS with light/dark mode support via prefers-color-scheme
4
+ */
5
+ import type { ThemeMode, ThemeTokens } from '../types/theme';
6
+ /**
7
+ * Generate complete CSS with light and dark theme support
8
+ * @param lightTheme - Theme for light mode
9
+ * @param darkTheme - Theme for dark mode (optional, uses adjusted light theme if not provided)
10
+ * @param themeMode - 'light', 'dark', or 'auto' (uses prefers-color-scheme)
11
+ */
12
+ export declare const generateThemeCSS: (lightTheme?: ThemeTokens, darkTheme?: ThemeTokens, themeMode?: ThemeMode) => string;
13
+ //# sourceMappingURL=inject-theme-dark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inject-theme-dark.d.ts","sourceRoot":"","sources":["../../../../src/theme/inject-theme-dark.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAY,WAA2B,EACvC,YAAY,WAAW,EACvB,YAAW,SAAkB,KAC5B,MA8KF,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Theme Injection Utilities
3
+ * Injects CSS variables into iframe for theme support
4
+ * Supports light/dark themes via prefers-color-scheme media query
5
+ */
6
+ import type { ThemeTokens } from '../types/theme';
7
+ /**
8
+ * Generate CSS variable declarations from theme tokens
9
+ * Flattens nested structure (e.g., colors.text.primary → --bt-color-text-primary)
10
+ */
11
+ export declare const generateCSSVariables: (theme: ThemeTokens) => string;
12
+ /**
13
+ * Inject theme CSS variables into iframe
14
+ */
15
+ export declare const injectTheme: (iframe: HTMLIFrameElement, theme: ThemeTokens) => void;
16
+ /**
17
+ * Update theme dynamically (e.g., for dark mode)
18
+ */
19
+ export declare const updateTheme: (iframe: HTMLIFrameElement, updates: Partial<ThemeTokens>) => void;
20
+ //# sourceMappingURL=inject-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inject-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/inject-theme.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,WAAW,KAAG,MAoLzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,iBAAiB,EACzB,OAAO,WAAW,KACjB,IAgBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,iBAAiB,EACzB,SAAS,OAAO,CAAC,WAAW,CAAC,KAC5B,IAWF,CAAC"}
@@ -0,0 +1,137 @@
1
+ /**
2
+ * Event type definitions for Basis Theory Elements v3
3
+ * All events follow a consistent contract with base metadata
4
+ */
5
+ /**
6
+ * Element types
7
+ */
8
+ export type ElementType = 'cardNumber' | 'cvv' | 'expiry' | 'text' | 'card';
9
+ /**
10
+ * Base event detail - all element events include this metadata
11
+ */
12
+ export interface BaseEventDetail {
13
+ /** Element type that fired this event */
14
+ elementType: ElementType;
15
+ /** Unique element ID (for distinguishing multiple elements) */
16
+ elementId: string;
17
+ /** Event timestamp (Unix milliseconds) */
18
+ timestamp: number;
19
+ }
20
+ /**
21
+ * Ready event - fired when element iframe loads and is ready for interaction
22
+ */
23
+ export interface ReadyEventDetail extends BaseEventDetail {
24
+ }
25
+ /**
26
+ * Validation error structure
27
+ */
28
+ export interface ValidationError {
29
+ /** Machine-readable error code */
30
+ code: string;
31
+ /** Human-readable error message */
32
+ message: string;
33
+ }
34
+ /**
35
+ * Base change event detail - common to all element types
36
+ */
37
+ export interface ChangeEventDetail extends BaseEventDetail {
38
+ /** Whether the current value is valid */
39
+ isValid: boolean;
40
+ /** Whether the input is empty */
41
+ isEmpty: boolean;
42
+ /** Validation error (null if valid) */
43
+ error: ValidationError | null;
44
+ }
45
+ /**
46
+ * Card number specific change event detail
47
+ * Extends base with card brand detection metadata
48
+ */
49
+ export interface CardNumberChangeEventDetail extends ChangeEventDetail {
50
+ /** Detected card brand (Visa, Mastercard, etc.) */
51
+ cardBrand?: string;
52
+ /** Last 4 digits (PCI-safe, for display) */
53
+ last4?: string | null;
54
+ /** BIN (Bank Identification Number) - first 6-8 digits */
55
+ bin?: string | null;
56
+ /** CVV lengths for detected brand (for coordinating with CVV element) */
57
+ cvvLengths?: number[] | null;
58
+ /** All brands that could potentially match */
59
+ potentialBrands?: string[];
60
+ /** Match confidence (0-1, higher = more confident) */
61
+ matchStrength?: number;
62
+ }
63
+ /**
64
+ * Card element specific change event detail (unified card element)
65
+ * Extends base with unified card state for all 3 sub-fields
66
+ */
67
+ export interface CardElementChangeEventDetail extends ChangeEventDetail {
68
+ /** Detected card brand (Visa, Mastercard, etc.) */
69
+ cardBrand?: string;
70
+ /** Last 4 digits (PCI-safe, for display) */
71
+ last4?: string | null;
72
+ /** BIN (Bank Identification Number) - first 6-8 digits */
73
+ bin?: string | null;
74
+ /** Validation errors from all sub-fields (cardNumber, expirationDate, cvc) */
75
+ errors?: Array<{
76
+ field: string;
77
+ code: string;
78
+ message: string;
79
+ }> | null;
80
+ }
81
+ /**
82
+ * Focus event - fired when element receives focus
83
+ */
84
+ export interface FocusEventDetail extends BaseEventDetail {
85
+ }
86
+ /**
87
+ * Blur event - fired when element loses focus
88
+ */
89
+ export interface BlurEventDetail extends BaseEventDetail {
90
+ }
91
+ /**
92
+ * Error codes
93
+ */
94
+ export type ErrorCode = 'MOUNT_ERROR' | 'POSTMESSAGE_TIMEOUT' | 'IFRAME_LOAD_ERROR' | 'INITIALIZATION_ERROR' | 'API_ERROR' | 'NETWORK_ERROR' | 'VALIDATION_ERROR' | 'INVALID_CONFIGURATION' | 'UNKNOWN_ERROR';
95
+ /**
96
+ * Error event detail - fired when errors occur during element operations
97
+ */
98
+ export interface ErrorEventDetail extends BaseEventDetail {
99
+ /** Machine-readable error code */
100
+ code: ErrorCode;
101
+ /** Human-readable error message */
102
+ message: string;
103
+ /** HTTP status code (for API errors) */
104
+ status?: number;
105
+ /** Field-level validation errors from API */
106
+ validationErrors?: Record<string, string[]>;
107
+ /** Additional error context */
108
+ metadata?: {
109
+ /** Error source (e.g., 'tokenize', 'mount') */
110
+ source?: string;
111
+ /** Number of retry attempts */
112
+ retryCount?: number;
113
+ /** Full API response body (for debugging) */
114
+ body?: unknown;
115
+ /** Original error object */
116
+ originalError?: Error;
117
+ };
118
+ }
119
+ /**
120
+ * Union of all event types
121
+ */
122
+ export type ElementEventType = 'ready' | 'change' | 'focus' | 'blur' | 'error';
123
+ /**
124
+ * Map of event types to their detail types
125
+ */
126
+ export interface ElementEventDetailMap {
127
+ ready: ReadyEventDetail;
128
+ change: ChangeEventDetail | CardNumberChangeEventDetail | CardElementChangeEventDetail;
129
+ focus: FocusEventDetail;
130
+ blur: BlurEventDetail;
131
+ error: ErrorEventDetail;
132
+ }
133
+ /**
134
+ * Type-safe event listener signature
135
+ */
136
+ export type ElementEventListener<T extends ElementEventType> = (event: CustomEvent<ElementEventDetailMap[T]>) => void;
137
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAM5E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,WAAW,EAAE,WAAW,CAAC;IAEzB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAElB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;CAExD;AAMD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IAEb,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC;IAEjB,iCAAiC;IACjC,OAAO,EAAE,OAAO,CAAC;IAEjB,uCAAuC;IACvC,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;IACpE,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE7B,8CAA8C;IAC9C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAA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AAC;KACvB,CAAC;CACH;AAMD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,iBAAiB,GAAG,2BAA2B,GAAG,4BAA4B,CAAC;IACvF,KAAK,EAAE,gBAAgB,CAAC;IACxB,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,gBAAgB,IAAI,CAC7D,KAAK,EAAE,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,KACzC,IAAI,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Theme System Types
3
+ * Implements Hybrid approach: CSS variables for theming + property overrides
4
+ *
5
+ * Uses semantic nesting for better DX:
6
+ * - Magnitude scales: fontSize.sm/base/lg
7
+ * - State variants: border.default/hover/focus
8
+ * - Semantic groups: text.primary/secondary/placeholder
9
+ *
10
+ * Supports light/dark themes via prefers-color-scheme or explicit theme prop
11
+ */
12
+ export type ThemeMode = 'light' | 'dark' | 'auto';
13
+ export interface ThemeTokens {
14
+ colors: {
15
+ primary: string;
16
+ error: string;
17
+ success: string;
18
+ text: {
19
+ primary: string;
20
+ secondary?: string;
21
+ placeholder?: string;
22
+ disabled?: string;
23
+ };
24
+ background: {
25
+ default: string;
26
+ hover?: string;
27
+ focus?: string;
28
+ disabled?: string;
29
+ };
30
+ border: {
31
+ default: string;
32
+ hover?: string;
33
+ focus?: string;
34
+ error?: string;
35
+ };
36
+ };
37
+ typography: {
38
+ fontFamily: string;
39
+ fontSize: {
40
+ sm?: string;
41
+ base: string;
42
+ lg?: string;
43
+ };
44
+ fontWeight: {
45
+ normal: string;
46
+ medium?: string;
47
+ semibold?: string;
48
+ };
49
+ lineHeight?: {
50
+ tight?: string;
51
+ normal?: string;
52
+ relaxed?: string;
53
+ };
54
+ };
55
+ spacing: {
56
+ xs?: string;
57
+ sm: string;
58
+ md: string;
59
+ lg: string;
60
+ xl?: string;
61
+ };
62
+ borders: {
63
+ radius: {
64
+ none?: string;
65
+ sm?: string;
66
+ base: string;
67
+ md?: string;
68
+ lg?: string;
69
+ full?: string;
70
+ };
71
+ width: {
72
+ thin?: string;
73
+ base: string;
74
+ thick?: string;
75
+ };
76
+ };
77
+ shadows?: {
78
+ none?: string;
79
+ sm?: string;
80
+ base?: string;
81
+ md?: string;
82
+ lg?: string;
83
+ focus?: string;
84
+ };
85
+ transitions?: {
86
+ fast?: string;
87
+ base?: string;
88
+ slow?: string;
89
+ };
90
+ }
91
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/types/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE;QAEN,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAGhB,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM,CAAC;YAChB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;SACnB,CAAC;QAGF,UAAU,EAAE;YACV,OAAO,EAAE,MAAM,CAAC;YAChB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,QAAQ,CAAC,EAAE,MAAM,CAAC;SACnB,CAAC;QAGF,MAAM,EAAE;YACN,OAAO,EAAE,MAAM,CAAC;YAChB,KAAK,CAAC,EAAE,MAAM,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