@magicfeedback/popup-sdk 1.22.0 → 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.
- package/README.md +8 -2
- package/dist/2.2.47-BYEZ6PUX.mjs +2428 -0
- package/dist/2.2.47-BYEZ6PUX.mjs.map +1 -0
- package/dist/2.2.47-ZZQRJNYY.mjs +2428 -0
- package/dist/2.2.47-ZZQRJNYY.mjs.map +1 -0
- package/dist/assets/assets/style.css +8 -1
- package/dist/assets/assets/survey-css/2.2.47.css +2420 -0
- package/dist/{chunk-36KEHE2P.mjs → chunk-7PNQVCOR.mjs} +156 -5
- package/dist/chunk-7PNQVCOR.mjs.map +1 -0
- package/dist/{chunk-7PVEXIUG.mjs → chunk-HDCZ2QGX.mjs} +156 -5
- package/dist/chunk-HDCZ2QGX.mjs.map +1 -0
- package/dist/{chunk-4MUHUL7W.mjs → chunk-OXAYYIUH.mjs} +156 -5
- package/dist/chunk-OXAYYIUH.mjs.map +1 -0
- package/dist/index.d.mts +36 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +4028 -1312
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +128 -61
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.d.mts +36 -0
- package/dist/index.native.d.ts +36 -0
- package/dist/index.native.js +4028 -1312
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +128 -61
- package/dist/index.native.mjs.map +1 -1
- package/dist/react-native.d.mts +25 -0
- package/dist/react-native.d.ts +25 -0
- package/dist/react-native.js +2826 -182
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +128 -61
- package/dist/react-native.mjs.map +1 -1
- package/dist/{renderPopup-I3LIC3W3.mjs → renderPopup-I565DNZX.mjs} +21 -29
- package/dist/renderPopup-I565DNZX.mjs.map +1 -0
- package/dist/{renderPopup-5VVYPKXP.mjs → renderPopup-KWAMONIN.mjs} +1213 -1149
- package/dist/renderPopup-KWAMONIN.mjs.map +1 -0
- package/dist/{renderPopup-VS5XFGTI.mjs → renderPopup-USTJXQJ6.mjs} +1213 -1149
- package/dist/renderPopup-USTJXQJ6.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/chunk-36KEHE2P.mjs.map +0 -1
- package/dist/chunk-4MUHUL7W.mjs.map +0 -1
- package/dist/chunk-7PVEXIUG.mjs.map +0 -1
- package/dist/renderPopup-5VVYPKXP.mjs.map +0 -1
- package/dist/renderPopup-I3LIC3W3.mjs.map +0 -1
- package/dist/renderPopup-VS5XFGTI.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -123,6 +123,10 @@ Config fields:
|
|
|
123
123
|
- `analytics?: { publicKey: string; integration: string }` — enables the real analytics
|
|
124
124
|
delivery. Without it the analytics channel stays in dry-run: nothing is sent, and the
|
|
125
125
|
payload is only logged when `debug` is on.
|
|
126
|
+
- `trackLocalhost?: boolean` — default `false`: on a local dev host (`localhost`, `*.localhost`,
|
|
127
|
+
`127.x.x.x`, `0.0.0.0`, `::1`) the analytics channel stays in dry-run even with `analytics`
|
|
128
|
+
set, so local development does not land in your production project. Popups and surveys work
|
|
129
|
+
the same. Pass `true` to send from localhost (for example to test analytics against DEV).
|
|
126
130
|
- `onFeedbackSession?: (session: { sessionId: string; status: 'open' | 'closed' }) => void` —
|
|
127
131
|
called when an analytics session opens or closes, with the id the Deepdots API stores as
|
|
128
132
|
`sdkSessionId` on the feedback the session becomes. See
|
|
@@ -236,7 +240,7 @@ because the HTML reveals itself; the container just appears a few hundred ms bef
|
|
|
236
240
|
|
|
237
241
|
Each popup draws its survey with the survey version assigned to it in the Admin (*Survey frontend version*: latest or pinned), like the survey page does. The API sends it per popup as `surveyFrontend.sdkVersion`, the `@magicfeedback/native` version that survey release was built with.
|
|
238
242
|
|
|
239
|
-
- Supported versions: `SUPPORTED_SURVEY_SDK_VERSIONS` (now 2.2.38, 2.2.39, 2.2.44), the ones whose survey CSS this SDK vendors (`src/assets/survey-css/<v>.css`, scoped to `.deepdots-popup` like `style.css`). JS and CSS follow the version together.
|
|
243
|
+
- Supported versions: `SUPPORTED_SURVEY_SDK_VERSIONS` (now 2.2.38, 2.2.39, 2.2.44, 2.2.47), the ones whose survey CSS this SDK vendors (`src/assets/survey-css/<v>.css`, scoped to `.deepdots-popup` like `style.css`). JS and CSS follow the version together.
|
|
240
244
|
- DOM popup: the browser bundle of that exact version comes from jsDelivr (then unpkg); its CSS ships inside this SDK as a lazy chunk. React Native's WebView loads both from the CDN (the CSS from this package's `dist/assets/assets/survey-css`).
|
|
241
245
|
- Missing (older API, survey release without `sdkVersion`), unsupported, or failing to load (no network, a CSP without `cdn.jsdelivr.net`/`unpkg.com` in `script-src`): the bundled JS and CSS (`BUNDLED_SURVEY_SDK_VERSION`), as before. Never one version's JS with another's CSS.
|
|
242
246
|
- With `debug: true` the choice is logged (`[Deepdots] survey SDK 2.2.38 (assigned)`); an invalid version or a load failure is always logged as a warning (unsupported is debug-only: it is normal for older survey versions). The popup element carries it in `data-survey-sdk`.
|
|
@@ -509,7 +513,9 @@ interface PopupDefinition {
|
|
|
509
513
|
productId: string;
|
|
510
514
|
style?: {
|
|
511
515
|
theme: 'light' | 'dark';
|
|
512
|
-
position: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'center';
|
|
516
|
+
position: 'top' | 'bottom' | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'center';
|
|
517
|
+
size?: 'small' | 'regular'; // card up to 360px / 600px (default regular)
|
|
518
|
+
blockPage?: boolean; // backdrop + keeps the clicks; center always blocks (default false)
|
|
513
519
|
imageUrl: string | null;
|
|
514
520
|
font?: {
|
|
515
521
|
family: string; // clean family name, not a stack
|