@reblu/site-blocks 0.11.0 → 0.12.1

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @reblu/site-blocks
2
2
 
3
+ ## 0.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b75f066: Docs (REB-834): `CheckoutLoginPrompt` and `CheckoutForm` must never branch on whether an email has an account. Wire `onSubmitEmail` to carry the typed email into the checkout and keep the «Iniciar sesión o continuar como invitado» offer identical for every email; the deprecated `client.shop.checkEmail` always answers `{ exists: false }`.
8
+ - Updated dependencies [92e0f6f]
9
+ - Updated dependencies [b75f066]
10
+ - @reblu/site-contracts@1.14.0
11
+
12
+ ## 0.12.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 7a00471: Featured pages per page category (REB-869). `@reblu/site-contracts` adds `PagesListQuery`, the query of `GET /api/site/pages`, including the new `featured` flag. `@reblu/site-client`: `pages.list({ category, featured: true })` returns that category's featured pages (max 3) in the tenant's order, skipping unpublished, deleted or moved pages, and an empty list when nothing is featured; the new `pages.featured(category, { limit?, fallback?, cache? })` helper returns the featured pages, or the category's first `limit` pages in normal order when none are featured, so a landing teaser is never empty. `limit` must be an integer >= 1: above 3 it is clamped to 3; 0, negative, fractional or NaN throw a `RangeError` before any request. Against an API that predates `featured`, the flag is ignored and `pages.featured()` silently degrades to the category's first `limit` pages. `@reblu/site-blocks` adds `PageCardGrid`, the page-card grid `ParentPage` already rendered for its child pages, as a drop-in (`pages`, `pageHref`, `heading`); cards are keyed by category + slug, an empty `heading` renders no `<h2>`. `ParentPage` now renders through it with unchanged markup (including the empty `<h2>` for `childPagesLabel=''`).
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [7a00471]
21
+ - @reblu/site-contracts@1.13.0
22
+
3
23
  ## 0.11.0
4
24
 
5
25
  ### Minor Changes
package/README.md CHANGED
@@ -313,6 +313,17 @@ const { status } = useCheckoutReturn()
313
313
  <CartSummary {...summaryProps} notice={status === 'cancelled'} />
314
314
  ```
315
315
 
316
+ **Never reveal whether an account exists (REB-834).** `CheckoutLoginPrompt`
317
+ and `CheckoutForm`'s `loginPrompt` slot are a static «Iniciar sesión o
318
+ continuar como invitado» offer, identical for every email. Do not call
319
+ `client.shop.checkEmail` / mount `createShopCheckEmailRoute` (both deprecated:
320
+ the endpoint always answers `{ exists: false }`) and never build UI on an
321
+ `exists` answer — it was an account-enumeration oracle on the tenant's customer
322
+ list. Wire `onSubmitEmail` to carry the typed email into the checkout (or to
323
+ your login page) and `onContinueAsGuest` to proceed without it. When a guest's
324
+ email belongs to an account, the server links the order to that account after
325
+ payment; the browser is never told before.
326
+
316
327
  `CheckoutForm` intentionally does NOT collect shipping/billing addresses —
317
328
  those field sets vary by tenant shop config far more than the guest-email +
318
329
  discount-code flow. Render them via `CheckoutForm`'s `children` slot
@@ -483,6 +494,30 @@ counterpart are both passed, the new one wins. The default grid heading stays
483
494
  `"Treatments"` and the root keeps `data-slot="specialty"` until that major, so
484
495
  the rename changes no markup — pass `childPagesLabel` to set your own heading.
485
496
 
497
+ ## `PageCardGrid` — featured pages teaser (REB-869)
498
+
499
+ The linked page-card grid `ParentPage` uses for its child pages, as a
500
+ standalone drop-in over any `PageListItem[]`, rendered in the order given (and
501
+ nothing at all for an empty list). Its natural feed is
502
+ `client.pages.featured(category)` from `@reblu/site-client`: the up-to-3 pages
503
+ the tenant featured on that category in nexus («Destacadas en la portada»), in
504
+ the tenant's order — or the category's first pages when none are featured yet.
505
+
506
+ ```tsx
507
+ import { PageCardGrid } from '@reblu/site-blocks'
508
+
509
+ export async function ServicesTeaser() {
510
+ const pages = await client.pages.featured('servicios')
511
+ return (
512
+ <PageCardGrid
513
+ pages={pages}
514
+ heading='Servicios'
515
+ pageHref={(page) => `/${page.category?.slug}/${page.slug}`} // default: `/${slug}`
516
+ />
517
+ )
518
+ }
519
+ ```
520
+
486
521
  ## Page blocks
487
522
 
488
523
  `PageBlocks` renders a page's registry blocks (`PageDetail.blocks` from