@uphold/enterprise-widget-sdk-core 0.7.0 → 0.9.0

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 (2) hide show
  1. package/dist/widget.js +16 -0
  2. package/package.json +2 -2
package/dist/widget.js CHANGED
@@ -109,6 +109,22 @@ class Widget extends EventTarget {
109
109
  }
110
110
  this[logSymbol].log('[Widget -> Host] ', event.data);
111
111
  switch (event.data.type) {
112
+ // This is to force a repaint of the iframe to address
113
+ // a bug that happens when using view transitions API
114
+ // while running the widget in a WKWebView on iOS.
115
+ case 'force_repaint': {
116
+ if (!this.#iframe) {
117
+ break;
118
+ }
119
+ this.#iframe.style.opacity = '0.99';
120
+ setTimeout(() => {
121
+ if (!this.#iframe) {
122
+ return;
123
+ }
124
+ this.#iframe.style.opacity = '1';
125
+ }, 0);
126
+ break;
127
+ }
112
128
  case 'load': {
113
129
  const widgetInitMessage = {
114
130
  ...this.session,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uphold/enterprise-widget-sdk-core",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  ]
31
31
  },
32
32
  "dependencies": {
33
- "@uphold/enterprise-widget-messaging-types": "^0.12.0"
33
+ "@uphold/enterprise-widget-messaging-types": "^0.14.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "jsdom": "^27.4.0"