@payment-kit-js/vanilla 0.5.3 → 0.5.4

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * PaymentKit.js v0.5.3
2
+ * PaymentKit.js v0.5.4
3
3
  * https://paymentkit.com
4
4
  *
5
5
  * @license MIT
@@ -42,7 +42,7 @@ var PaymentKit = (() => {
42
42
  });
43
43
 
44
44
  // package.json
45
- var version = "0.5.3";
45
+ var version = "0.5.4";
46
46
 
47
47
  // src/analytics/mock-adapter.ts
48
48
  var MockAnalyticsAdapter = class {
@@ -6872,6 +6872,27 @@ var PaymentKit = (() => {
6872
6872
  validations: ["required", "validCardSecurityCode"],
6873
6873
  css: fieldCss
6874
6874
  });
6875
+ for (const selector of [mountPoints.pan, mountPoints.exp, mountPoints.cvc]) {
6876
+ const container = document.querySelector(selector);
6877
+ if (!container) continue;
6878
+ const styleIframe = (iframe) => {
6879
+ iframe.style.width = "100%";
6880
+ iframe.style.height = "100%";
6881
+ };
6882
+ const existing = container.querySelector("iframe");
6883
+ if (existing) {
6884
+ styleIframe(existing);
6885
+ } else {
6886
+ const observer = new MutationObserver((_2, obs) => {
6887
+ const iframe = container.querySelector("iframe");
6888
+ if (iframe) {
6889
+ styleIframe(iframe);
6890
+ obs.disconnect();
6891
+ }
6892
+ });
6893
+ observer.observe(container, { childList: true, subtree: true });
6894
+ }
6895
+ }
6875
6896
  if (onFocusChangeCallbacks) {
6876
6897
  const fieldMap = [
6877
6898
  [panField, "card_pan"],