@magicfeedback/popup-sdk 1.5.0 → 1.6.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.
@@ -9,7 +9,7 @@ import {
9
9
  sdkWarn,
10
10
  setLogger,
11
11
  style_default
12
- } from "./chunk-D7QAGWGC.mjs";
12
+ } from "./chunk-Z3LLJMSH.mjs";
13
13
 
14
14
  // src/react-native/index.tsx
15
15
  import { createContext, useContext, useEffect, useRef, useState } from "react";
@@ -219,7 +219,7 @@ function jsonForScript(value) {
219
219
  }
220
220
  function buildSurveyHtml(opts) {
221
221
  const env = opts.env === "development" ? "dev" : "prod";
222
- const version = opts.version ?? "2.2.4";
222
+ const version = opts.version ?? "2.2.8";
223
223
  const cdn = `https://cdn.jsdelivr.net/npm/@magicfeedback/native@${version}/dist/magicfeedback-sdk.browser.js`;
224
224
  const sid = jsonForScript(opts.surveyId);
225
225
  const pid = jsonForScript(opts.productId);
@@ -296,7 +296,7 @@ body{display:${bodyDisplay};justify-content:${pos.justifyContent};align-items:${
296
296
  #dd-form-wrapper{width:100%;flex:1 1 auto}
297
297
  #mf{width:100%;box-sizing:border-box;visibility:hidden}
298
298
  .deepdots-popup-main *{max-width:100%;box-sizing:border-box}
299
- #dd-logo{max-height:40px;max-width:100%;object-fit:contain}
299
+ #dd-logo{max-height:40px;max-width:100%;object-fit:contain;display:block;margin:12px 0 0 0}
300
300
  .deepdots-error-hint{display:none;margin:12px 0 0 0;padding:10px 12px;border-radius:6px;background:#FEF3C7;color:#92400E;border:1px solid #FCD34D;font-size:13px}
301
301
  /* Pantalla final: el HTML del editor de la plataforma (imagen + texto), centrado. */
302
302
  .deepdots-success{display:none;width:100%;text-align:center;padding:24px 0;color:${textPrimary}}
@@ -329,8 +329,8 @@ ${customCss}
329
329
  <div class="deepdots-popup-header">
330
330
  <h2 id="dd-title" class="deepdots-popup-title" hidden></h2>
331
331
  <button type="button" id="dd-close" aria-label="Close popup">
332
- <svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
333
- <path d="M6 6L18 18M6 18L18 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
332
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
333
+ <path d="M5 5L19 19M5 19L19 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="butt"/>
334
334
  </svg>
335
335
  </button>
336
336
  </div>
@@ -554,10 +554,12 @@ ${customCss}
554
554
  if(s.logoSize==='small'){ logoImg.style.maxHeight='30px'; }
555
555
  else if(s.logoSize==='medium'){ logoImg.style.maxHeight='50px'; }
556
556
  else if(s.logoSize==='large'){ logoImg.style.maxHeight='70px'; }
557
- if(s.logoPosition==='left'){ logoImg.style.margin='0 16px 20px 0'; logoImg.style.display='block'; logoImg.style.marginLeft='0'; }
558
- else if(s.logoPosition==='right'){ logoImg.style.margin='0 0 20px 16px'; logoImg.style.display='block'; logoImg.style.marginLeft='auto'; }
559
- else if(s.logoPosition==='center'){ logoImg.style.margin='0 auto 20px auto'; logoImg.style.display='block'; }
560
- main.insertBefore(logoImg, document.getElementById('dd-form-wrapper'));
557
+ if(s.logoPosition==='left'){ logoImg.style.margin='12px 16px 0 0'; logoImg.style.marginLeft='0'; }
558
+ else if(s.logoPosition==='right'){ logoImg.style.margin='12px 0 0 16px'; logoImg.style.marginLeft='auto'; }
559
+ else if(s.logoPosition==='center'){ logoImg.style.margin='12px auto 0 auto'; }
560
+ // Encima de la barra de progreso, como hermano del header (espejo de ui/logo.ts en
561
+ // web). Fuera de #dd-main, as\xED el logo no se va con el scroll del formulario.
562
+ popup.insertBefore(logoImg, progressEl);
561
563
  }
562
564
  if(s.startMessage && s.startMessage!==''){ onStartPage=true; updateButtons('start'); }
563
565
  else { updateButtons('in_progress_first'); }
@@ -752,7 +754,7 @@ var BrowserPopupRenderer = class {
752
754
  if (!this.container) return;
753
755
  this.visible = true;
754
756
  const container = this.container;
755
- void import("./renderPopup-4WZ7V435.mjs").then(({ renderPopup }) => {
757
+ void import("./renderPopup-SELXQ3UE.mjs").then(({ renderPopup }) => {
756
758
  renderPopup(container, surveyId, productId, actions, emit, onClose, env, userId, style, sessionId, miniService, analyticsFeedbackSessionId, options);
757
759
  });
758
760
  }
@@ -2468,7 +2470,7 @@ var DeepdotsPopups = class {
2468
2470
  }
2469
2471
  if (!this.popupContainer) return;
2470
2472
  const container = this.popupContainer;
2471
- void import("./renderPopup-4WZ7V435.mjs").then(({ renderPopup }) => {
2473
+ void import("./renderPopup-SELXQ3UE.mjs").then(({ renderPopup }) => {
2472
2474
  renderPopup(
2473
2475
  container,
2474
2476
  surveyId,