@meshconnect/web-link-sdk 3.4.1 → 3.4.2

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/Link.js CHANGED
@@ -185,6 +185,7 @@ export var createLink = function (options) {
185
185
  }
186
186
  linkUrl = addLanguage(linkUrl, currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.language);
187
187
  linkUrl = addDisplayFiatCurrency(linkUrl, currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.displayFiatCurrency);
188
+ linkUrl = addTheme(linkUrl, currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.theme);
188
189
  linkTokenOrigin = new URL(linkUrl).origin;
189
190
  window.removeEventListener('message', eventsListener);
190
191
  if (customIframeId) {
@@ -236,3 +237,9 @@ function addDisplayFiatCurrency(linkUrl, displayFiatCurrency) {
236
237
  }
237
238
  return linkUrl;
238
239
  }
240
+ function addTheme(linkUrl, theme) {
241
+ if (theme) {
242
+ return "".concat(linkUrl).concat(linkUrl.includes('?') ? '&' : '?', "th=").concat(theme);
243
+ }
244
+ return linkUrl;
245
+ }
package/README.md CHANGED
@@ -105,6 +105,7 @@ After successfull authentication on the Link session, the popup will be closed a
105
105
  | `accessTokens` | `IntegrationAccessToken[]` | An array of integration access tokens |
106
106
  | `language` | `'en' \| undefined` | Link UI language |
107
107
  | `displayFiatCurrency` | `'USD' \| undefined` | A fiat currency to display fiat equivalent of a crypto amount |
108
+ | `theme` | `'dark' \| 'light' \| 'system' \| undefined` | Color theme of Link UI interface |
108
109
 
109
110
  #### `createLink` return value
110
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshconnect/web-link-sdk",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "description": "A client-side JS library for integrating with Mesh Connect",
5
5
  "exports": "./index.js",
6
6
  "license": "MIT",
package/utils/types.d.ts CHANGED
@@ -139,6 +139,10 @@ export interface LinkOptions {
139
139
  * Default: 'USD'
140
140
  */
141
141
  displayFiatCurrency?: string;
142
+ /**
143
+ * Link UI theme. Possible values: 'dark', 'light' and 'system'.
144
+ */
145
+ theme?: 'dark' | 'light' | 'system';
142
146
  }
143
147
  export interface LinkStyle {
144
148
  ir: number;
@@ -1 +1 @@
1
- export declare const sdkVersion = "3.4.1";
1
+ export declare const sdkVersion = "3.4.2";
package/utils/version.js CHANGED
@@ -1 +1 @@
1
- export var sdkVersion = '3.4.1';
1
+ export var sdkVersion = '3.4.2';