@betarena/ad-engine 0.3.2 → 0.3.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betarena/ad-engine",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "private": false,
5
5
  "description": "Betarena ad-engine widget",
6
6
  "keywords": [
@@ -907,6 +907,25 @@
907
907
  targetZoneIds = targetZoneIds.filter(id => opts.zoneIds!.includes(id));
908
908
  ;
909
909
 
910
+ // ╭─────
911
+ // │ NOTE:
912
+ // │ |: Zone 1 (global slider/popup) has no DOM element and will never appear
913
+ // │ |: in the DOM scan. On article pages it must still be requested so the
914
+ // │ |: backend returns zone-1 campaigns/creatives.
915
+ // │ |: Zone 1 placement has empty authors/tags — it is globally available on
916
+ // │ |: article pages; creative-level targeting handles device/country/author filtering.
917
+ // │ |: Respect scoped refreshes: only add zone 1 if the caller's scope includes it.
918
+ // ╰─────
919
+ const
920
+ shouldRequestZone1
921
+ = isArticlePage
922
+ && (!opts?.zoneIds || opts.zoneIds.length === 0 || opts.zoneIds.includes(1))
923
+ ;
924
+
925
+ if (shouldRequestZone1 && !targetZoneIds.includes(1))
926
+ targetZoneIds.push(1);
927
+ ;
928
+
910
929
  // ╭─────
911
930
  // │ NOTE:
912
931
  // │ |: Only tear down previously injected global/body components when the