@magicfeedback/popup-sdk 1.22.1 → 1.23.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 (44) hide show
  1. package/README.md +8 -2
  2. package/dist/2.2.47-BYEZ6PUX.mjs +2428 -0
  3. package/dist/2.2.47-BYEZ6PUX.mjs.map +1 -0
  4. package/dist/2.2.47-ZZQRJNYY.mjs +2428 -0
  5. package/dist/2.2.47-ZZQRJNYY.mjs.map +1 -0
  6. package/dist/assets/assets/style.css +8 -1
  7. package/dist/assets/assets/survey-css/2.2.47.css +2420 -0
  8. package/dist/{chunk-5UURWEOR.mjs → chunk-7PNQVCOR.mjs} +156 -5
  9. package/dist/chunk-7PNQVCOR.mjs.map +1 -0
  10. package/dist/{chunk-4TNJ2IBB.mjs → chunk-HDCZ2QGX.mjs} +156 -5
  11. package/dist/chunk-HDCZ2QGX.mjs.map +1 -0
  12. package/dist/{chunk-6HPKIMVM.mjs → chunk-OXAYYIUH.mjs} +156 -5
  13. package/dist/chunk-OXAYYIUH.mjs.map +1 -0
  14. package/dist/index.d.mts +36 -0
  15. package/dist/index.d.ts +36 -0
  16. package/dist/index.js +4022 -1311
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +125 -60
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/index.native.d.mts +36 -0
  21. package/dist/index.native.d.ts +36 -0
  22. package/dist/index.native.js +4022 -1311
  23. package/dist/index.native.js.map +1 -1
  24. package/dist/index.native.mjs +125 -60
  25. package/dist/index.native.mjs.map +1 -1
  26. package/dist/react-native.d.mts +25 -0
  27. package/dist/react-native.d.ts +25 -0
  28. package/dist/react-native.js +2820 -181
  29. package/dist/react-native.js.map +1 -1
  30. package/dist/react-native.mjs +125 -60
  31. package/dist/react-native.mjs.map +1 -1
  32. package/dist/{renderPopup-SFDIFFUT.mjs → renderPopup-I565DNZX.mjs} +18 -29
  33. package/dist/renderPopup-I565DNZX.mjs.map +1 -0
  34. package/dist/{renderPopup-L5TROMDQ.mjs → renderPopup-KWAMONIN.mjs} +1210 -1149
  35. package/dist/renderPopup-KWAMONIN.mjs.map +1 -0
  36. package/dist/{renderPopup-UXD7L3FX.mjs → renderPopup-USTJXQJ6.mjs} +1210 -1149
  37. package/dist/renderPopup-USTJXQJ6.mjs.map +1 -0
  38. package/package.json +2 -2
  39. package/dist/chunk-4TNJ2IBB.mjs.map +0 -1
  40. package/dist/chunk-5UURWEOR.mjs.map +0 -1
  41. package/dist/chunk-6HPKIMVM.mjs.map +0 -1
  42. package/dist/renderPopup-L5TROMDQ.mjs.map +0 -1
  43. package/dist/renderPopup-SFDIFFUT.mjs.map +0 -1
  44. package/dist/renderPopup-UXD7L3FX.mjs.map +0 -1
@@ -214,6 +214,13 @@ interface DeepdotsInitParams {
214
214
  * logged when `debug` is true.
215
215
  */
216
216
  analytics?: AnalyticsKeys;
217
+ /**
218
+ * Send analytics (events, crashes, page views) when the page runs on a local dev host
219
+ * (`localhost`, `*.localhost`, `127.x.x.x`, `0.0.0.0`, `::1`). Default `false`: there the
220
+ * analytics channel stays in dry-run, so local development does not land in your
221
+ * production project. Popups, surveys and answers work the same. Web only.
222
+ */
223
+ trackLocalhost?: boolean;
217
224
  /**
218
225
  * Called when the analytics channel opens or closes a session (needs `analytics`), with the
219
226
  * id the Deepdots API stores as `sdkSessionId` on the feedback the session becomes: send it
@@ -359,6 +366,16 @@ interface PopupFont {
359
366
  interface PopupStyle {
360
367
  theme: 'light' | 'dark';
361
368
  position: 'bottom' | 'bottom-right' | 'bottom-left' | 'top' | 'top-right' | 'top-left' | 'center';
369
+ /**
370
+ * Card size (DD-334). `regular` (default) is up to 600px wide; `small` up to 360px, for one
371
+ * short question that should not cover the page.
372
+ */
373
+ size?: 'small' | 'regular';
374
+ /**
375
+ * Cover the page with a backdrop and keep the clicks while the popup is open (DD-334).
376
+ * Default `false`. Ignored for `center`, which always blocks the page.
377
+ */
378
+ blockPage?: boolean;
362
379
  /** @deprecated Not used by the SDK; kept only for API compatibility */
363
380
  imageUrl?: string | null;
364
381
  /** Fuente personalizada. Si falta, se mantiene el comportamiento actual. */
@@ -538,6 +555,8 @@ declare class DeepdotsPopups {
538
555
  private engagement;
539
556
  /** Atributos internos del usuario identificado → POST /sdk/popups/contact. Null si no hay userId. */
540
557
  private contact;
558
+ /** DD-561: contact POST of `init()`, awaited (with a cap) by the popups GET. Null if none. */
559
+ private contactSync;
541
560
  /** Storage resuelto en init() (inyectado por el host o localStorage). Reusado al cambiar de usuario. */
542
561
  private storage;
543
562
  /** Marca si ya se inició la navegación manual (setScreen) — para RN sin History API. */
@@ -908,6 +927,12 @@ declare class DeepdotsPopups {
908
927
  private setDeferredExitQueue;
909
928
  /** Fetch al servidor para obtener popups. `null` si la carga falló (red, no-2xx, payload inválido). */
910
929
  private fetchPopupsFromServer;
930
+ /**
931
+ * DD-561: espera al POST de contact de `init()` antes del GET de popups, como mucho
932
+ * `CONTACT_SYNC_TIMEOUT_MS`. Sin atributos nuevos la promesa ya está resuelta y no hay espera.
933
+ * Nunca rechaza.
934
+ */
935
+ private waitForContactSync;
911
936
  /**
912
937
  * Envía los atributos de contact a la API (`POST /sdk/popups/contact`). Rechaza si no se
913
938
  * pudo enviar (sin red o respuesta no-2xx), para que `ContactManager` no guarde la caché
@@ -214,6 +214,13 @@ interface DeepdotsInitParams {
214
214
  * logged when `debug` is true.
215
215
  */
216
216
  analytics?: AnalyticsKeys;
217
+ /**
218
+ * Send analytics (events, crashes, page views) when the page runs on a local dev host
219
+ * (`localhost`, `*.localhost`, `127.x.x.x`, `0.0.0.0`, `::1`). Default `false`: there the
220
+ * analytics channel stays in dry-run, so local development does not land in your
221
+ * production project. Popups, surveys and answers work the same. Web only.
222
+ */
223
+ trackLocalhost?: boolean;
217
224
  /**
218
225
  * Called when the analytics channel opens or closes a session (needs `analytics`), with the
219
226
  * id the Deepdots API stores as `sdkSessionId` on the feedback the session becomes: send it
@@ -359,6 +366,16 @@ interface PopupFont {
359
366
  interface PopupStyle {
360
367
  theme: 'light' | 'dark';
361
368
  position: 'bottom' | 'bottom-right' | 'bottom-left' | 'top' | 'top-right' | 'top-left' | 'center';
369
+ /**
370
+ * Card size (DD-334). `regular` (default) is up to 600px wide; `small` up to 360px, for one
371
+ * short question that should not cover the page.
372
+ */
373
+ size?: 'small' | 'regular';
374
+ /**
375
+ * Cover the page with a backdrop and keep the clicks while the popup is open (DD-334).
376
+ * Default `false`. Ignored for `center`, which always blocks the page.
377
+ */
378
+ blockPage?: boolean;
362
379
  /** @deprecated Not used by the SDK; kept only for API compatibility */
363
380
  imageUrl?: string | null;
364
381
  /** Fuente personalizada. Si falta, se mantiene el comportamiento actual. */
@@ -538,6 +555,8 @@ declare class DeepdotsPopups {
538
555
  private engagement;
539
556
  /** Atributos internos del usuario identificado → POST /sdk/popups/contact. Null si no hay userId. */
540
557
  private contact;
558
+ /** DD-561: contact POST of `init()`, awaited (with a cap) by the popups GET. Null if none. */
559
+ private contactSync;
541
560
  /** Storage resuelto en init() (inyectado por el host o localStorage). Reusado al cambiar de usuario. */
542
561
  private storage;
543
562
  /** Marca si ya se inició la navegación manual (setScreen) — para RN sin History API. */
@@ -908,6 +927,12 @@ declare class DeepdotsPopups {
908
927
  private setDeferredExitQueue;
909
928
  /** Fetch al servidor para obtener popups. `null` si la carga falló (red, no-2xx, payload inválido). */
910
929
  private fetchPopupsFromServer;
930
+ /**
931
+ * DD-561: espera al POST de contact de `init()` antes del GET de popups, como mucho
932
+ * `CONTACT_SYNC_TIMEOUT_MS`. Sin atributos nuevos la promesa ya está resuelta y no hay espera.
933
+ * Nunca rechaza.
934
+ */
935
+ private waitForContactSync;
911
936
  /**
912
937
  * Envía los atributos de contact a la API (`POST /sdk/popups/contact`). Rechaza si no se
913
938
  * pudo enviar (sin red o respuesta no-2xx), para que `ContactManager` no guarde la caché