@survicate/survicate-web-package 28.15.0-npm → 28.16.0-npm
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/package.json +1 -1
- package/survicate_widget.d.ts +42 -0
- package/survicate_widget.js +1 -1
package/package.json
CHANGED
package/survicate_widget.d.ts
CHANGED
|
@@ -124,6 +124,8 @@ export interface ConfigModel {
|
|
|
124
124
|
disableSensitiveDataPersistence?: boolean;
|
|
125
125
|
/** Force surveys to display in a specific language (IETF language tag, e.g., "en", "fr", "pt-BR") */
|
|
126
126
|
forcedLanguage?: string;
|
|
127
|
+
/** Force initial theme mode: "light", "dark", or "auto" (follow system). Same as setThemeMode() but applied on init */
|
|
128
|
+
themeMode?: string;
|
|
127
129
|
/** Array of survey IDs to hide from targeting */
|
|
128
130
|
hiddenSurveys?: string[];
|
|
129
131
|
/** Content Security Policy nonce for script injection */
|
|
@@ -319,6 +321,26 @@ export interface SurveyApi {
|
|
|
319
321
|
*/
|
|
320
322
|
setSurveyLanguage: (languageTag: string) => void;
|
|
321
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Set the theme mode for displaying surveys
|
|
326
|
+
*
|
|
327
|
+
* This method allows you to control whether surveys use light or dark theme.
|
|
328
|
+
* The mode can be set to "light" or "dark" (case-insensitive).
|
|
329
|
+
* Note: "auto" mode is not available via API and is the default behavior.
|
|
330
|
+
*
|
|
331
|
+
* @param mode - Theme mode: "light" or "dark" (case-insensitive)
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* ```javascript
|
|
335
|
+
* // Force surveys to use light theme
|
|
336
|
+
* Survicate.setThemeMode('light');
|
|
337
|
+
*
|
|
338
|
+
* // Force surveys to use dark theme
|
|
339
|
+
* Survicate.setThemeMode('dark');
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
342
|
+
setThemeMode: (mode: string) => void;
|
|
343
|
+
|
|
322
344
|
/**
|
|
323
345
|
* Set visitor traits/attributes for targeting and identification
|
|
324
346
|
* @param attributes - Object containing visitor attributes
|
|
@@ -541,6 +563,26 @@ declare const Survicate: {
|
|
|
541
563
|
*/
|
|
542
564
|
setSurveyLanguage: (languageTag: string) => void;
|
|
543
565
|
|
|
566
|
+
/**
|
|
567
|
+
* Set the theme mode for displaying surveys
|
|
568
|
+
*
|
|
569
|
+
* This method allows you to control whether surveys use light or dark theme.
|
|
570
|
+
* The mode can be set to "light" or "dark" (case-insensitive).
|
|
571
|
+
* Note: "auto" mode is not available via API and is the default behavior.
|
|
572
|
+
*
|
|
573
|
+
* @example
|
|
574
|
+
* ```javascript
|
|
575
|
+
* // Force surveys to use light theme
|
|
576
|
+
* Survicate.setThemeMode('light');
|
|
577
|
+
*
|
|
578
|
+
* // Force surveys to use dark theme
|
|
579
|
+
* Survicate.setThemeMode('dark');
|
|
580
|
+
* ```
|
|
581
|
+
*
|
|
582
|
+
* @param mode - Theme mode: "light" or "dark" (case-insensitive)
|
|
583
|
+
*/
|
|
584
|
+
setThemeMode: (mode: string) => void;
|
|
585
|
+
|
|
544
586
|
/**
|
|
545
587
|
* Set visitor traits/attributes for targeting and identification
|
|
546
588
|
*
|