gleap 18.2.0 → 19.0.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.
package/index.d.ts CHANGED
@@ -237,6 +237,28 @@ export namespace Gleap {
237
237
  function close(): void;
238
238
  function hide(): void;
239
239
  function setUseCookies(useCookies: boolean): void;
240
+ /**
241
+ * Sets the widget's color scheme, overriding the dashboard's "Color scheme"
242
+ * setting, which applies until this is called. Only takes effect when "Adapt
243
+ * to dark / light mode" is enabled in the dashboard; while it is disabled the
244
+ * widget is never themed. "auto" follows the host app's dark/light mode (theme
245
+ * classes/attributes like `class="dark"` or `data-theme="dark"`, the CSS
246
+ * color-scheme, the page background, then the OS preference) and switches
247
+ * live. "light"/"dark" force a scheme. Any other value (including the former
248
+ * "default") is treated as "auto". Dark mode uses the dark colors set in the
249
+ * dashboard (header colors, UI color, background) and the dark logo, header
250
+ * image and composer glow set there; without dark colors the widget keeps
251
+ * its normal colors.
252
+ */
253
+ function setColorScheme(
254
+ colorScheme: "auto" | "light" | "dark",
255
+ options?: {
256
+ /** #rrggbb background used in light mode. Defaults to the dashboard background. */
257
+ lightBackgroundColor?: string;
258
+ /** #rrggbb background used in dark mode. Defaults to the dashboard's dark background. Also enables dark mode without dark colors in the dashboard. */
259
+ darkBackgroundColor?: string;
260
+ }
261
+ ): void;
240
262
  function setEnvironment(environment: "dev" | "staging" | "prod"): void;
241
263
  /**
242
264
  * Env data keys (e.g. "currentUrl", "userAgent") that are removed before a
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "JavaScript and TypeScript SDK for Gleap, an Intercom alternative with AI customer support, live chat, in-app bug reporting and customer feedback.",
3
3
  "name": "gleap",
4
- "version": "18.2.0",
4
+ "version": "19.0.0",
5
5
  "main": "build/cjs/index.js",
6
6
  "module": "build/esm/index.mjs",
7
7
  "exports": {
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",
29
- "url": "https://github.com/GleapSDK/JavaScript-SDK"
29
+ "url": "git+https://github.com/GleapSDK/JavaScript-SDK.git"
30
30
  },
31
31
  "author": "Gleap <hello@gleap.io>",
32
32
  "homepage": "https://www.gleap.ai",