baiten3d 0.1.1 → 0.1.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.
@@ -186,7 +186,33 @@ function u(e, n, r, i, a) {
186
186
  blocks: u
187
187
  });
188
188
  else if (u.length !== 0) {
189
- if (r === "full-bleed-image" || u.length === 1 && (u[0]?.article.pages?.length ?? 0) > 0) {
189
+ if (n === "magazine" && u.length === 1 && u[0]?.article.paginateBy === "h2") {
190
+ let e = u[0], t = e.article, n = b(t), a = Math.max(i.page, v(c));
191
+ for (let o = 0; o < n.length; o += 1) {
192
+ let s = n[o];
193
+ if (!s) continue;
194
+ let l = {
195
+ ...t,
196
+ title: o === 0 ? t.title : s.title,
197
+ subtitle: o === 0 ? t.subtitle : void 0,
198
+ heroImage: o === 0 ? t.heroImage : void 0,
199
+ heroCaption: o === 0 ? t.heroCaption : void 0,
200
+ body: s.body,
201
+ bodyHtml: s.bodyHtml
202
+ };
203
+ c.push({
204
+ page: a,
205
+ template: o === 0 ? r : r === "magazine-feature" ? "magazine-editorial" : r,
206
+ sectionLabel: o === 0 ? i.sectionLabel ?? s.sectionLabel ?? t.kicker : s.sectionLabel ?? t.kicker,
207
+ columns: i.columns,
208
+ rows: i.rows,
209
+ blocks: [{
210
+ ...e,
211
+ article: l
212
+ }]
213
+ }), a += 1;
214
+ }
215
+ } else if (r === "full-bleed-image" || u.length === 1 && (u[0]?.article.pages?.length ?? 0) > 0) {
190
216
  let e = i.page;
191
217
  for (let t of u) {
192
218
  let n = t.article.pages;