@dreamsengine/dreams-ad-engine 0.1.6 → 0.2.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/CHANGELOG.md +36 -1
- package/README.md +465 -182
- package/dist/dreams-ad-engine.js +978 -16
- package/package.json +11 -1
- package/types/features/config/config.provider.d.ts +20 -0
- package/types/features/config/config.types.d.ts +22 -0
- package/types/features/config/default-mappings.d.ts +2 -0
- package/types/features/config/index.d.ts +3 -0
- package/types/features/dreamsAdEngine/components/ad.component.d.ts +37 -0
- package/types/features/dreamsAdEngine/index.d.ts +1 -0
- package/types/features/dreamsAdEngine/types/interfaces.d.ts +50 -0
- package/types/features/index.d.ts +3 -0
- package/types/features/targeting/index.d.ts +2 -0
- package/types/features/targeting/targeting.service.d.ts +12 -0
- package/types/features/targeting/targeting.types.d.ts +29 -0
- package/types/main.d.ts +1 -0
- package/dist/index.html +0 -62
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.2.0] - 2025-01-09
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Configuration Provider (`DreamsAdConfig`)**: Centralized configuration management for ad settings
|
|
12
|
+
- Initialize once with `DreamsAdConfig.init()` and use throughout your application
|
|
13
|
+
- Built-in slot presets for common ad positions (top-1 through top-5, box-1 through box-5, footer, interstitial)
|
|
14
|
+
- Runtime slot registration with `registerSlot()`
|
|
15
|
+
- Methods: `getNetworkId()`, `getSitePrefix()`, `getPubId()`, `getSlot()`, `buildAdUnit()`, etc.
|
|
16
|
+
|
|
17
|
+
- **Targeting Service (`DreamsTargetingService`)**: Automatic targeting with caching and retry logic
|
|
18
|
+
- Polls for `window.dfp["@context"]` with configurable retry settings
|
|
19
|
+
- Caches targeting per URL to avoid redundant polling
|
|
20
|
+
- Builds targeting from page context (postId, catId, tagId, typeId, catName, author, URL)
|
|
21
|
+
- Support for retargeting segments via `window._rl_gen_sg()`
|
|
22
|
+
- Methods: `getTargeting()`, `getTargetingSync()`, `buildFromContext()`, `clearCache()`
|
|
23
|
+
|
|
24
|
+
- **New component properties**:
|
|
25
|
+
- `slot`: Use named slot configurations (e.g., `slot="top-1"`)
|
|
26
|
+
- `autoTargeting`: Enable automatic targeting from page context
|
|
27
|
+
|
|
28
|
+
- **TypeScript exports**: Full type definitions for all new interfaces
|
|
29
|
+
- `DFPContext`, `TargetingOptions`, `TargetingResult`
|
|
30
|
+
- `AdConfigInit`, `LazyLoadConfig`, `SlotConfig`
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- Updated Vite configuration for proper library build output
|
|
35
|
+
- Improved TypeScript types for `mapping`, `sizing`, and `targeting` properties
|
|
36
|
+
- Component now uses `resolvedTargeting` internally for better state management
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- Build configuration now correctly outputs ES module library format
|
|
41
|
+
|
|
7
42
|
## [0.0.9] - 2024-10-28
|
|
8
43
|
|
|
9
44
|
### Added
|