powered-ad-config 0.1.98 → 0.1.100
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 +47 -1
- package/dist/powered-ad-config.es.js +420 -167
- package/dist/powered-ad-config.umd.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,7 +118,7 @@ const cleanup = initAd({
|
|
|
118
118
|
|
|
119
119
|
| Option | Type | Default | Used by | Description |
|
|
120
120
|
|---|---|---:|---|---|
|
|
121
|
-
| `adFormat` | `string` | `''` | all | Format selector. Supported: `fireplace`, `fireplace-collant`, `logomorph`, `interscroller` |
|
|
121
|
+
| `adFormat` | `string` | `''` | all | Format selector. Supported: `fireplace`, `fireplace-collant`, `logomorph`, `interscroller`, `liquidframe`, `mobilefireplace`, `bottomscroller` |
|
|
122
122
|
| `stickyOffset` | `number` | `0` | fireplace, fireplace-collant | Extra offset added to sticky/scroll threshold calculations. On the modern Nine/WWOS shell, `0` means no initial masthead scroll. |
|
|
123
123
|
| `logoPosX` | `number` | `0` | logomorph | Scroll threshold where logo transitions to small state |
|
|
124
124
|
| `logoHeight` | `number` | `0` | logomorph | Height (px) for large logo state |
|
|
@@ -134,6 +134,52 @@ const cleanup = initAd({
|
|
|
134
134
|
- `fireplace-collant`: Fireplace behavior with collant transition and content masking.
|
|
135
135
|
- `logomorph`: Large-to-small logo takeover behavior on scroll.
|
|
136
136
|
- `interscroller`: Full-viewport scroll-through ad with sticky bands, GSAP stretch animation, and scroll progress callbacks.
|
|
137
|
+
- `liquidframe`: Viewport-adaptive mobile banner slot expansion.
|
|
138
|
+
- `mobilefireplace`: Mobile wallpaper takeover with in-flow or sticky billboard.
|
|
139
|
+
- `bottomscroller`: Bottom-fixed mobile banner (180px → 50px collapse) with scroll-gated timer.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Bottomscroller
|
|
144
|
+
|
|
145
|
+
Pins a 320×50 mobile banner iframe to the bottom of the viewport at `expandedHeight` (default 180px). Once the user scrolls, a collapse clock runs (time and/or scroll distance — whichever limit is reached first). The bar animates to `collapsedHeight` (default 50px) and stays sticky. Page content receives matching `padding-bottom`.
|
|
146
|
+
|
|
147
|
+
### Quick start
|
|
148
|
+
|
|
149
|
+
```js
|
|
150
|
+
import initAd from 'powered-ad-config';
|
|
151
|
+
|
|
152
|
+
initAd({
|
|
153
|
+
adFormat: 'bottomscroller',
|
|
154
|
+
expandedHeight: 180,
|
|
155
|
+
collapsedHeight: 50,
|
|
156
|
+
collapseDurationMs: 8000,
|
|
157
|
+
collapseScrollDistance: 5600,
|
|
158
|
+
onAdapt() {
|
|
159
|
+
startEntranceAnimation();
|
|
160
|
+
},
|
|
161
|
+
onProgress({ phase, progress, remainingMs, height }) {
|
|
162
|
+
driveScrollScrub(progress);
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### CONFIG options
|
|
168
|
+
|
|
169
|
+
| Option | Type | Default | Description |
|
|
170
|
+
|---|---|---|---|
|
|
171
|
+
| `expandedHeight` | `number` | `180` | Initial bar height in px |
|
|
172
|
+
| `collapsedHeight` | `number` | `50` | Collapsed bar height in px |
|
|
173
|
+
| `zIndex` | `number` | `10000` | Shell z-index |
|
|
174
|
+
| `collapseDurationMs` | `number` | `8000` | Max expanded time while scrolling |
|
|
175
|
+
| `collapseScrollDistance` | `number` | `5600` | Max `scrollY` while expanded |
|
|
176
|
+
| `collapseTransitionMs` | `number` | `400` | Height transition duration |
|
|
177
|
+
| `onAdapt` | `function` | `null` | Fired once shell is mounted |
|
|
178
|
+
| `onProgress` | `function` | `null` | Fired each RAF tick with `{ phase, progress, remainingMs, height, active }` |
|
|
179
|
+
|
|
180
|
+
### postMessage
|
|
181
|
+
|
|
182
|
+
The creative iframe receives `bottomscroller:progress` messages with the same payload as `onProgress`.
|
|
137
183
|
|
|
138
184
|
---
|
|
139
185
|
|