@magicfeedback/popup-sdk 1.21.1 → 1.22.1

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 (46) hide show
  1. package/README.md +1 -1
  2. package/dist/2.2.44-HO4Z2OYX.mjs +2421 -0
  3. package/dist/2.2.44-HO4Z2OYX.mjs.map +1 -0
  4. package/dist/2.2.44-NTG36TY5.mjs +2421 -0
  5. package/dist/2.2.44-NTG36TY5.mjs.map +1 -0
  6. package/dist/assets/assets/style.css +113 -36
  7. package/dist/assets/assets/survey-css/2.2.44.css +2413 -0
  8. package/dist/{chunk-7KMBH25G.mjs → chunk-4TNJ2IBB.mjs} +265 -40
  9. package/dist/chunk-4TNJ2IBB.mjs.map +1 -0
  10. package/dist/{chunk-NNWYOG43.mjs → chunk-5UURWEOR.mjs} +265 -40
  11. package/dist/chunk-5UURWEOR.mjs.map +1 -0
  12. package/dist/{chunk-4C3DSMUT.mjs → chunk-6HPKIMVM.mjs} +265 -40
  13. package/dist/chunk-6HPKIMVM.mjs.map +1 -0
  14. package/dist/index.d.mts +28 -1
  15. package/dist/index.d.ts +28 -1
  16. package/dist/index.js +4322 -1466
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +78 -27
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/index.native.d.mts +28 -1
  21. package/dist/index.native.d.ts +28 -1
  22. package/dist/index.native.js +4322 -1466
  23. package/dist/index.native.js.map +1 -1
  24. package/dist/index.native.mjs +78 -27
  25. package/dist/index.native.mjs.map +1 -1
  26. package/dist/react-native.d.mts +22 -0
  27. package/dist/react-native.d.ts +22 -0
  28. package/dist/react-native.js +2962 -230
  29. package/dist/react-native.js.map +1 -1
  30. package/dist/react-native.mjs +78 -27
  31. package/dist/react-native.mjs.map +1 -1
  32. package/dist/renderPopup-L5TROMDQ.mjs +4001 -0
  33. package/dist/renderPopup-L5TROMDQ.mjs.map +1 -0
  34. package/dist/{renderPopup-IKPXPDB7.mjs → renderPopup-SFDIFFUT.mjs} +70 -40
  35. package/dist/renderPopup-SFDIFFUT.mjs.map +1 -0
  36. package/dist/renderPopup-UXD7L3FX.mjs +4001 -0
  37. package/dist/renderPopup-UXD7L3FX.mjs.map +1 -0
  38. package/package.json +2 -2
  39. package/dist/chunk-4C3DSMUT.mjs.map +0 -1
  40. package/dist/chunk-7KMBH25G.mjs.map +0 -1
  41. package/dist/chunk-NNWYOG43.mjs.map +0 -1
  42. package/dist/renderPopup-IKPXPDB7.mjs.map +0 -1
  43. package/dist/renderPopup-M5ZIXNV6.mjs +0 -3847
  44. package/dist/renderPopup-M5ZIXNV6.mjs.map +0 -1
  45. package/dist/renderPopup-QVMBE4L4.mjs +0 -3847
  46. package/dist/renderPopup-QVMBE4L4.mjs.map +0 -1
@@ -1,3 +1,5 @@
1
+ type Appearance = 'system' | 'light' | 'dark';
2
+
1
3
  /**
2
4
  * Tiempo de ejecución en segundo plano para los envíos de analytics (DD-55).
3
5
  *
@@ -321,6 +323,7 @@ interface AutoTrackOptions {
321
323
  */
322
324
  errors?: boolean;
323
325
  }
326
+
324
327
  interface DeepdotsInitParams {
325
328
  /** API key for authentication */
326
329
  apiKey?: string;
@@ -421,6 +424,13 @@ interface DeepdotsInitParams {
421
424
  * en vez de cambiar los defaults que comparten todos los clientes.
422
425
  */
423
426
  surveyCss?: string;
427
+ /**
428
+ * Claro u oscuro desde la app (DD-241): `'system'` sigue al sistema (`prefers-color-scheme`),
429
+ * `'light'` / `'dark'` lo fuerzan. Sin él mandan los colores del Style del survey (un Style
430
+ * oscuro ya sale en oscuro). En oscuro se usan los colores opcionales `dark` del Style; el
431
+ * survey recibe el modo. Se cambia luego con `setAppearance()`. Paridad con nativo (DD-240).
432
+ */
433
+ appearance?: Appearance;
424
434
  /**
425
435
  * Nonce de la Content-Security-Policy de la página, para hosts con una CSP estricta
426
436
  * (`style-src 'nonce-…'` sin `'unsafe-inline'`). El popup lo pone en cada `<style>` que
@@ -650,6 +660,8 @@ interface PopupRenderOptions {
650
660
  surveySdkVersion?: string | null;
651
661
  /** `init({debug})`, para el log de la versión de survey SDK elegida. */
652
662
  debug?: boolean;
663
+ /** Claro/oscuro de la app (DD-241). Sin él mandan los colores del Style. */
664
+ appearance?: Appearance;
653
665
  }
654
666
  interface PopupRenderer {
655
667
  /** Preparar recursos si aplica */
@@ -926,6 +938,8 @@ declare class DeepdotsPopups {
926
938
  /** CSS del host inyectado al final de los estilos del popup. */
927
939
  private surveyCss;
928
940
  private cspNonce;
941
+ /** Claro/oscuro de la app (DD-241). undefined = mandan los colores del Style. */
942
+ private appearance;
929
943
  /** Identidad + sesión (Fase 1 tracking). Null hasta init(). */
930
944
  private tracking;
931
945
  /** Capa de analytics (canal separado del feedback). Null hasta init(). */
@@ -1114,6 +1128,14 @@ declare class DeepdotsPopups {
1114
1128
  *
1115
1129
  * Equivale a llamar a `init()` otra vez con otro `userId`.
1116
1130
  */
1131
+ /**
1132
+ * Claro u oscuro desde la app, en cualquier momento (apps con su propio interruptor de modo
1133
+ * oscuro). `'system'` sigue al sistema; `null`/`undefined` vuelve a los colores del Style.
1134
+ * Se aplica al siguiente popup que se abra. Paridad con nativo `setAppearance()` (DD-240).
1135
+ */
1136
+ setAppearance(appearance?: Appearance | null): void;
1137
+ /** El `appearance` actual de la app (`undefined` = mandan los colores del Style). */
1138
+ getAppearance(): Appearance | undefined;
1117
1139
  setUserId(userId?: string): void;
1118
1140
  /**
1119
1141
  * Cierra la sesión actual: vuelca todo lo que quedaba abierto y envía el último lote
@@ -1478,6 +1500,11 @@ interface BuildSurveyHtmlOptions {
1478
1500
  version?: string;
1479
1501
  font?: PopupFont;
1480
1502
  theme?: 'light' | 'dark';
1503
+ /**
1504
+ * Claro/oscuro de la app (DD-241). `system` se resuelve dentro del WebView con
1505
+ * `prefers-color-scheme`. Sin él mandan los colores del Style.
1506
+ */
1507
+ appearance?: Appearance;
1481
1508
  position?: 'bottom' | 'bottom-right' | 'bottom-left' | 'top' | 'top-right' | 'top-left' | 'center';
1482
1509
  actions?: PopupActions;
1483
1510
  /**
@@ -1708,4 +1735,4 @@ declare function createHermesRejectionHub(hermes: HermesRejectionTrackerLike | n
1708
1735
  dev: boolean;
1709
1736
  }): PromiseRejectionHub | null;
1710
1737
 
1711
- export { type AnalyticsFeedbackBody, type AnalyticsKeys, type AppStateLike, type AutoTrackOptions, BACKGROUND_TASK_MAX_MS, type BackgroundTaskRunner, type BackgroundTimerLike, BrowserPopupRenderer, type BuildBodyOptions, type ContactAttributeValue, type ContactAttributes, type ContactBody, ContactManager, type CrashRecord, CrashReporter, type CrashSeverity, type DeepdotsConfig, type DeepdotsEvent, type DeepdotsEventType, type DeepdotsInitParams, type DeepdotsLogger, DeepdotsPopups, type DeviceInfo, type DeviceInfoLike, type DeviceSnapshot, type EventListener, type FeedbackKV, type FeedbackSession, type HermesRejectionTrackerLike, InMemoryStorage, type KeyValueStorage, LABELS, MAX_TRACKED_MESSAGES, MESSAGE_CHANNELS, type MessageChannel, MessageGuard, type MessageGuardVerdict, type MessageRejectionReason, type MessageStage, type MmkvLike, NATIVE_READY_GRACE_MS, NoopPopupRenderer, POPUP_TRIGGER_CONDITION_STATUSES, type PopupDefinition, type PopupLabels, type PopupLocale, type PopupRenderer, type PopupTrigger, type PopupTriggerCondition, type PopupTriggerConditionStatus, type PromiseRejectionHub, REVEAL_TIMEOUT_MS, RTL_LOCALES, type ReactNativeErrorUtils, ReactNativePopupRenderer, type ReactNativeRendererOptions, type ReactNativeSetupDeps, type ReactNativeSurveyPayload, type RejectionTrackingOptions, type ReportErrorOptions, type ResolvedActionLabels, SUPPORTED_LANGUAGES, type SessionEndReason, type SessionStartReason, type TrackMessageOptions, type TriggerConfig, backgroundTimerTask, buildAnalyticsFeedbackBody, buildMessageParams, buildSurveyHtml, collectRnDevice, crashRecordToParams, createDefaultRenderer, createFeedbackSink, createHermesRejectionHub, directionFor, getLabels, isRtlLanguage, mmkvStorage, resolveActionLabels, resolveLocale, setupReactNative };
1738
+ export { type AnalyticsFeedbackBody, type AnalyticsKeys, type AppStateLike, type Appearance, type AutoTrackOptions, BACKGROUND_TASK_MAX_MS, type BackgroundTaskRunner, type BackgroundTimerLike, BrowserPopupRenderer, type BuildBodyOptions, type ContactAttributeValue, type ContactAttributes, type ContactBody, ContactManager, type CrashRecord, CrashReporter, type CrashSeverity, type DeepdotsConfig, type DeepdotsEvent, type DeepdotsEventType, type DeepdotsInitParams, type DeepdotsLogger, DeepdotsPopups, type DeviceInfo, type DeviceInfoLike, type DeviceSnapshot, type EventListener, type FeedbackKV, type FeedbackSession, type HermesRejectionTrackerLike, InMemoryStorage, type KeyValueStorage, LABELS, MAX_TRACKED_MESSAGES, MESSAGE_CHANNELS, type MessageChannel, MessageGuard, type MessageGuardVerdict, type MessageRejectionReason, type MessageStage, type MmkvLike, NATIVE_READY_GRACE_MS, NoopPopupRenderer, POPUP_TRIGGER_CONDITION_STATUSES, type PopupDefinition, type PopupLabels, type PopupLocale, type PopupRenderer, type PopupTrigger, type PopupTriggerCondition, type PopupTriggerConditionStatus, type PromiseRejectionHub, REVEAL_TIMEOUT_MS, RTL_LOCALES, type ReactNativeErrorUtils, ReactNativePopupRenderer, type ReactNativeRendererOptions, type ReactNativeSetupDeps, type ReactNativeSurveyPayload, type RejectionTrackingOptions, type ReportErrorOptions, type ResolvedActionLabels, SUPPORTED_LANGUAGES, type SessionEndReason, type SessionStartReason, type TrackMessageOptions, type TriggerConfig, backgroundTimerTask, buildAnalyticsFeedbackBody, buildMessageParams, buildSurveyHtml, collectRnDevice, crashRecordToParams, createDefaultRenderer, createFeedbackSink, createHermesRejectionHub, directionFor, getLabels, isRtlLanguage, mmkvStorage, resolveActionLabels, resolveLocale, setupReactNative };
@@ -1,3 +1,5 @@
1
+ type Appearance = 'system' | 'light' | 'dark';
2
+
1
3
  /**
2
4
  * Tiempo de ejecución en segundo plano para los envíos de analytics (DD-55).
3
5
  *
@@ -321,6 +323,7 @@ interface AutoTrackOptions {
321
323
  */
322
324
  errors?: boolean;
323
325
  }
326
+
324
327
  interface DeepdotsInitParams {
325
328
  /** API key for authentication */
326
329
  apiKey?: string;
@@ -421,6 +424,13 @@ interface DeepdotsInitParams {
421
424
  * en vez de cambiar los defaults que comparten todos los clientes.
422
425
  */
423
426
  surveyCss?: string;
427
+ /**
428
+ * Claro u oscuro desde la app (DD-241): `'system'` sigue al sistema (`prefers-color-scheme`),
429
+ * `'light'` / `'dark'` lo fuerzan. Sin él mandan los colores del Style del survey (un Style
430
+ * oscuro ya sale en oscuro). En oscuro se usan los colores opcionales `dark` del Style; el
431
+ * survey recibe el modo. Se cambia luego con `setAppearance()`. Paridad con nativo (DD-240).
432
+ */
433
+ appearance?: Appearance;
424
434
  /**
425
435
  * Nonce de la Content-Security-Policy de la página, para hosts con una CSP estricta
426
436
  * (`style-src 'nonce-…'` sin `'unsafe-inline'`). El popup lo pone en cada `<style>` que
@@ -650,6 +660,8 @@ interface PopupRenderOptions {
650
660
  surveySdkVersion?: string | null;
651
661
  /** `init({debug})`, para el log de la versión de survey SDK elegida. */
652
662
  debug?: boolean;
663
+ /** Claro/oscuro de la app (DD-241). Sin él mandan los colores del Style. */
664
+ appearance?: Appearance;
653
665
  }
654
666
  interface PopupRenderer {
655
667
  /** Preparar recursos si aplica */
@@ -926,6 +938,8 @@ declare class DeepdotsPopups {
926
938
  /** CSS del host inyectado al final de los estilos del popup. */
927
939
  private surveyCss;
928
940
  private cspNonce;
941
+ /** Claro/oscuro de la app (DD-241). undefined = mandan los colores del Style. */
942
+ private appearance;
929
943
  /** Identidad + sesión (Fase 1 tracking). Null hasta init(). */
930
944
  private tracking;
931
945
  /** Capa de analytics (canal separado del feedback). Null hasta init(). */
@@ -1114,6 +1128,14 @@ declare class DeepdotsPopups {
1114
1128
  *
1115
1129
  * Equivale a llamar a `init()` otra vez con otro `userId`.
1116
1130
  */
1131
+ /**
1132
+ * Claro u oscuro desde la app, en cualquier momento (apps con su propio interruptor de modo
1133
+ * oscuro). `'system'` sigue al sistema; `null`/`undefined` vuelve a los colores del Style.
1134
+ * Se aplica al siguiente popup que se abra. Paridad con nativo `setAppearance()` (DD-240).
1135
+ */
1136
+ setAppearance(appearance?: Appearance | null): void;
1137
+ /** El `appearance` actual de la app (`undefined` = mandan los colores del Style). */
1138
+ getAppearance(): Appearance | undefined;
1117
1139
  setUserId(userId?: string): void;
1118
1140
  /**
1119
1141
  * Cierra la sesión actual: vuelca todo lo que quedaba abierto y envía el último lote
@@ -1478,6 +1500,11 @@ interface BuildSurveyHtmlOptions {
1478
1500
  version?: string;
1479
1501
  font?: PopupFont;
1480
1502
  theme?: 'light' | 'dark';
1503
+ /**
1504
+ * Claro/oscuro de la app (DD-241). `system` se resuelve dentro del WebView con
1505
+ * `prefers-color-scheme`. Sin él mandan los colores del Style.
1506
+ */
1507
+ appearance?: Appearance;
1481
1508
  position?: 'bottom' | 'bottom-right' | 'bottom-left' | 'top' | 'top-right' | 'top-left' | 'center';
1482
1509
  actions?: PopupActions;
1483
1510
  /**
@@ -1708,4 +1735,4 @@ declare function createHermesRejectionHub(hermes: HermesRejectionTrackerLike | n
1708
1735
  dev: boolean;
1709
1736
  }): PromiseRejectionHub | null;
1710
1737
 
1711
- export { type AnalyticsFeedbackBody, type AnalyticsKeys, type AppStateLike, type AutoTrackOptions, BACKGROUND_TASK_MAX_MS, type BackgroundTaskRunner, type BackgroundTimerLike, BrowserPopupRenderer, type BuildBodyOptions, type ContactAttributeValue, type ContactAttributes, type ContactBody, ContactManager, type CrashRecord, CrashReporter, type CrashSeverity, type DeepdotsConfig, type DeepdotsEvent, type DeepdotsEventType, type DeepdotsInitParams, type DeepdotsLogger, DeepdotsPopups, type DeviceInfo, type DeviceInfoLike, type DeviceSnapshot, type EventListener, type FeedbackKV, type FeedbackSession, type HermesRejectionTrackerLike, InMemoryStorage, type KeyValueStorage, LABELS, MAX_TRACKED_MESSAGES, MESSAGE_CHANNELS, type MessageChannel, MessageGuard, type MessageGuardVerdict, type MessageRejectionReason, type MessageStage, type MmkvLike, NATIVE_READY_GRACE_MS, NoopPopupRenderer, POPUP_TRIGGER_CONDITION_STATUSES, type PopupDefinition, type PopupLabels, type PopupLocale, type PopupRenderer, type PopupTrigger, type PopupTriggerCondition, type PopupTriggerConditionStatus, type PromiseRejectionHub, REVEAL_TIMEOUT_MS, RTL_LOCALES, type ReactNativeErrorUtils, ReactNativePopupRenderer, type ReactNativeRendererOptions, type ReactNativeSetupDeps, type ReactNativeSurveyPayload, type RejectionTrackingOptions, type ReportErrorOptions, type ResolvedActionLabels, SUPPORTED_LANGUAGES, type SessionEndReason, type SessionStartReason, type TrackMessageOptions, type TriggerConfig, backgroundTimerTask, buildAnalyticsFeedbackBody, buildMessageParams, buildSurveyHtml, collectRnDevice, crashRecordToParams, createDefaultRenderer, createFeedbackSink, createHermesRejectionHub, directionFor, getLabels, isRtlLanguage, mmkvStorage, resolveActionLabels, resolveLocale, setupReactNative };
1738
+ export { type AnalyticsFeedbackBody, type AnalyticsKeys, type AppStateLike, type Appearance, type AutoTrackOptions, BACKGROUND_TASK_MAX_MS, type BackgroundTaskRunner, type BackgroundTimerLike, BrowserPopupRenderer, type BuildBodyOptions, type ContactAttributeValue, type ContactAttributes, type ContactBody, ContactManager, type CrashRecord, CrashReporter, type CrashSeverity, type DeepdotsConfig, type DeepdotsEvent, type DeepdotsEventType, type DeepdotsInitParams, type DeepdotsLogger, DeepdotsPopups, type DeviceInfo, type DeviceInfoLike, type DeviceSnapshot, type EventListener, type FeedbackKV, type FeedbackSession, type HermesRejectionTrackerLike, InMemoryStorage, type KeyValueStorage, LABELS, MAX_TRACKED_MESSAGES, MESSAGE_CHANNELS, type MessageChannel, MessageGuard, type MessageGuardVerdict, type MessageRejectionReason, type MessageStage, type MmkvLike, NATIVE_READY_GRACE_MS, NoopPopupRenderer, POPUP_TRIGGER_CONDITION_STATUSES, type PopupDefinition, type PopupLabels, type PopupLocale, type PopupRenderer, type PopupTrigger, type PopupTriggerCondition, type PopupTriggerConditionStatus, type PromiseRejectionHub, REVEAL_TIMEOUT_MS, RTL_LOCALES, type ReactNativeErrorUtils, ReactNativePopupRenderer, type ReactNativeRendererOptions, type ReactNativeSetupDeps, type ReactNativeSurveyPayload, type RejectionTrackingOptions, type ReportErrorOptions, type ResolvedActionLabels, SUPPORTED_LANGUAGES, type SessionEndReason, type SessionStartReason, type TrackMessageOptions, type TriggerConfig, backgroundTimerTask, buildAnalyticsFeedbackBody, buildMessageParams, buildSurveyHtml, collectRnDevice, crashRecordToParams, createDefaultRenderer, createFeedbackSink, createHermesRejectionHub, directionFor, getLabels, isRtlLanguage, mmkvStorage, resolveActionLabels, resolveLocale, setupReactNative };