@reblu/site-blocks 0.9.0 → 0.10.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/dist/index.d.cts CHANGED
@@ -252,22 +252,50 @@ interface TreatmentProps {
252
252
  declare function Treatment({ page, className }: TreatmentProps): react_jsx_runtime.JSX.Element;
253
253
 
254
254
  /**
255
- * `Specialty` — specialty page organism over a `PageDetail`. Like `Treatment` it
256
- * renders a hero and content sections, but a specialty groups treatments, so it
257
- * also renders an optional grid of the treatment pages under it (links to each
258
- * treatment). Token-driven, RSC-safe.
255
+ * `ParentPage` — page organism over a `PageDetail` that groups other pages. Like
256
+ * `Treatment` it renders a hero and content sections, then an optional linked
257
+ * grid of its child pages (cover image, title, excerpt). Token-driven, RSC-safe.
258
+ *
259
+ * REB-853: formerly `Specialty`, which remains a deprecated alias.
259
260
  */
260
- interface SpecialtyProps {
261
+ interface ParentPageProps {
261
262
  page: PageDetail;
262
- /** Treatment pages under this specialty. Rendered as a linked grid when present. */
263
+ /** Child pages under this page. Rendered as a linked grid when present. */
264
+ childPages?: PageListItem[];
265
+ /** Builds the href for a child page from its slug. Defaults to `/{slug}`. */
266
+ childPageHref?: (slug: string) => string;
267
+ /** Heading for the child-pages grid. Defaults to "Treatments" (unchanged from `Specialty`). */
268
+ childPagesLabel?: string;
269
+ /**
270
+ * @deprecated Use `childPages`. Removed in the next major, not before 2027-03-31.
271
+ * Ignored when `childPages` is passed.
272
+ */
263
273
  treatments?: PageListItem[];
264
- /** Builds the href for a treatment page from its slug. Defaults to `/{slug}`. */
274
+ /**
275
+ * @deprecated Use `childPageHref`. Removed in the next major, not before 2027-03-31.
276
+ * Ignored when `childPageHref` is passed.
277
+ */
265
278
  treatmentHref?: (slug: string) => string;
266
- /** Heading for the treatments grid. Defaults to "Treatments". */
279
+ /**
280
+ * @deprecated Use `childPagesLabel`. Removed in the next major, not before 2027-03-31.
281
+ * Ignored when `childPagesLabel` is passed.
282
+ */
267
283
  treatmentsLabel?: string;
268
284
  className?: string;
269
285
  }
270
- declare function Specialty({ page, treatments, treatmentHref, treatmentsLabel, className, }: SpecialtyProps): react_jsx_runtime.JSX.Element;
286
+ declare function ParentPage({ page, childPages, childPageHref, childPagesLabel, treatments, treatmentHref, treatmentsLabel, className, }: ParentPageProps): react_jsx_runtime.JSX.Element;
287
+
288
+ /**
289
+ * @deprecated Renamed to `ParentPage` (REB-853) — the SDK is niche-agnostic.
290
+ * Removed in the next major, not before 2027-03-31.
291
+ * Same reference as `ParentPage`, not a copy.
292
+ */
293
+ declare const Specialty: typeof ParentPage;
294
+ /**
295
+ * @deprecated Renamed to `ParentPageProps` (REB-853).
296
+ * Removed in the next major, not before 2027-03-31.
297
+ */
298
+ type SpecialtyProps = ParentPageProps;
271
299
 
272
300
  /**
273
301
  * `ProfileCard` — presentational professional/team-member card (the clinic
@@ -838,4 +866,4 @@ interface OrderConfirmationProps {
838
866
  }
839
867
  declare function OrderConfirmation({ status, order, sessionId, cartHref, onRecheck, labels, currencyCode, locale, className, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element;
840
868
 
841
- export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, FaqAccordion, type FaqAccordionProps, FaqItem, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, PageBlocks, type PageBlocksComponents, type PageBlocksProps, ProductCard, type ProductCardProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, markdownToSafeHtml, readingTime, sanitizeHtml, shouldRenderShopFilters };
869
+ export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, FaqAccordion, type FaqAccordionProps, FaqItem, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, PageBlocks, type PageBlocksComponents, type PageBlocksProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, markdownToSafeHtml, readingTime, sanitizeHtml, shouldRenderShopFilters };
package/dist/index.d.ts CHANGED
@@ -252,22 +252,50 @@ interface TreatmentProps {
252
252
  declare function Treatment({ page, className }: TreatmentProps): react_jsx_runtime.JSX.Element;
253
253
 
254
254
  /**
255
- * `Specialty` — specialty page organism over a `PageDetail`. Like `Treatment` it
256
- * renders a hero and content sections, but a specialty groups treatments, so it
257
- * also renders an optional grid of the treatment pages under it (links to each
258
- * treatment). Token-driven, RSC-safe.
255
+ * `ParentPage` — page organism over a `PageDetail` that groups other pages. Like
256
+ * `Treatment` it renders a hero and content sections, then an optional linked
257
+ * grid of its child pages (cover image, title, excerpt). Token-driven, RSC-safe.
258
+ *
259
+ * REB-853: formerly `Specialty`, which remains a deprecated alias.
259
260
  */
260
- interface SpecialtyProps {
261
+ interface ParentPageProps {
261
262
  page: PageDetail;
262
- /** Treatment pages under this specialty. Rendered as a linked grid when present. */
263
+ /** Child pages under this page. Rendered as a linked grid when present. */
264
+ childPages?: PageListItem[];
265
+ /** Builds the href for a child page from its slug. Defaults to `/{slug}`. */
266
+ childPageHref?: (slug: string) => string;
267
+ /** Heading for the child-pages grid. Defaults to "Treatments" (unchanged from `Specialty`). */
268
+ childPagesLabel?: string;
269
+ /**
270
+ * @deprecated Use `childPages`. Removed in the next major, not before 2027-03-31.
271
+ * Ignored when `childPages` is passed.
272
+ */
263
273
  treatments?: PageListItem[];
264
- /** Builds the href for a treatment page from its slug. Defaults to `/{slug}`. */
274
+ /**
275
+ * @deprecated Use `childPageHref`. Removed in the next major, not before 2027-03-31.
276
+ * Ignored when `childPageHref` is passed.
277
+ */
265
278
  treatmentHref?: (slug: string) => string;
266
- /** Heading for the treatments grid. Defaults to "Treatments". */
279
+ /**
280
+ * @deprecated Use `childPagesLabel`. Removed in the next major, not before 2027-03-31.
281
+ * Ignored when `childPagesLabel` is passed.
282
+ */
267
283
  treatmentsLabel?: string;
268
284
  className?: string;
269
285
  }
270
- declare function Specialty({ page, treatments, treatmentHref, treatmentsLabel, className, }: SpecialtyProps): react_jsx_runtime.JSX.Element;
286
+ declare function ParentPage({ page, childPages, childPageHref, childPagesLabel, treatments, treatmentHref, treatmentsLabel, className, }: ParentPageProps): react_jsx_runtime.JSX.Element;
287
+
288
+ /**
289
+ * @deprecated Renamed to `ParentPage` (REB-853) — the SDK is niche-agnostic.
290
+ * Removed in the next major, not before 2027-03-31.
291
+ * Same reference as `ParentPage`, not a copy.
292
+ */
293
+ declare const Specialty: typeof ParentPage;
294
+ /**
295
+ * @deprecated Renamed to `ParentPageProps` (REB-853).
296
+ * Removed in the next major, not before 2027-03-31.
297
+ */
298
+ type SpecialtyProps = ParentPageProps;
271
299
 
272
300
  /**
273
301
  * `ProfileCard` — presentational professional/team-member card (the clinic
@@ -838,4 +866,4 @@ interface OrderConfirmationProps {
838
866
  }
839
867
  declare function OrderConfirmation({ status, order, sessionId, cartHref, onRecheck, labels, currencyCode, locale, className, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element;
840
868
 
841
- export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, FaqAccordion, type FaqAccordionProps, FaqItem, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, PageBlocks, type PageBlocksComponents, type PageBlocksProps, ProductCard, type ProductCardProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, markdownToSafeHtml, readingTime, sanitizeHtml, shouldRenderShopFilters };
869
+ export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, FaqAccordion, type FaqAccordionProps, FaqItem, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, PageBlocks, type PageBlocksComponents, type PageBlocksProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, markdownToSafeHtml, readingTime, sanitizeHtml, shouldRenderShopFilters };
package/dist/index.js CHANGED
@@ -13327,25 +13327,32 @@ function Treatment({ page, className }) {
13327
13327
  ] });
13328
13328
  }
13329
13329
 
13330
- // src/components/specialty.tsx
13330
+ // src/components/parent-page.tsx
13331
13331
  import { cn as cn4 } from "@reblu/site-ui/utils";
13332
13332
  import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
13333
- function Specialty({
13333
+ var defaultChildPageHref = (slug) => `/${slug}`;
13334
+ function ParentPage({
13334
13335
  page,
13335
- treatments = [],
13336
- treatmentHref = (slug) => `/${slug}`,
13337
- treatmentsLabel = "Treatments",
13336
+ childPages,
13337
+ childPageHref,
13338
+ childPagesLabel,
13339
+ treatments,
13340
+ treatmentHref,
13341
+ treatmentsLabel,
13338
13342
  className
13339
13343
  }) {
13344
+ const pages = childPages ?? treatments ?? [];
13345
+ const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
13346
+ const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
13340
13347
  return /* @__PURE__ */ jsxs3("article", { className: cn4("space-y-12", className), "data-slot": "specialty", children: [
13341
13348
  /* @__PURE__ */ jsx4(PageHero, { page }),
13342
13349
  /* @__PURE__ */ jsx4(PageSectionList, { sections: page.sections }),
13343
- treatments.length > 0 && /* @__PURE__ */ jsxs3("section", { className: "space-y-6", children: [
13344
- /* @__PURE__ */ jsx4("h2", { className: "text-2xl font-bold", children: treatmentsLabel }),
13345
- /* @__PURE__ */ jsx4("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: treatments.map((t) => /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(
13350
+ pages.length > 0 && /* @__PURE__ */ jsxs3("section", { className: "space-y-6", children: [
13351
+ /* @__PURE__ */ jsx4("h2", { className: "text-2xl font-bold", children: label }),
13352
+ /* @__PURE__ */ jsx4("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((t) => /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(
13346
13353
  "a",
13347
13354
  {
13348
- href: treatmentHref(t.slug),
13355
+ href: hrefFor(t.slug),
13349
13356
  className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
13350
13357
  children: [
13351
13358
  t.coverImageUrl && /* @__PURE__ */ jsx4("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx4(
@@ -13368,6 +13375,9 @@ function Specialty({
13368
13375
  ] });
13369
13376
  }
13370
13377
 
13378
+ // src/components/specialty.tsx
13379
+ var Specialty = ParentPage;
13380
+
13371
13381
  // src/components/profile-card.tsx
13372
13382
  import { cn as cn5 } from "@reblu/site-ui/utils";
13373
13383
  import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
@@ -14593,6 +14603,7 @@ export {
14593
14603
  MarkdownRenderer,
14594
14604
  OrderConfirmation,
14595
14605
  PageBlocks,
14606
+ ParentPage,
14596
14607
  ProductCard,
14597
14608
  ProfileCard,
14598
14609
  SafeHtml,