@opensite/ui 3.10.0 → 3.11.2

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/registry.js CHANGED
@@ -26,6 +26,7 @@ import Autoplay from 'embla-carousel-autoplay';
26
26
  import * as ProgressPrimitive from '@radix-ui/react-progress';
27
27
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
28
28
  import AutoScroll3 from 'embla-carousel-auto-scroll';
29
+ import { ImmersiveFeedProvider, ImmersiveViewer, useImmersiveFeed, ThumbnailCard } from '@page-speed/media-immersive';
29
30
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
30
31
  import * as LabelPrimitive from '@radix-ui/react-label';
31
32
  import { SocialShare } from '@page-speed/social-share';
@@ -35231,23 +35232,323 @@ function InteriorCarousel({
35231
35232
  }
35232
35233
  );
35233
35234
  }
35234
- function EngagementBadge({
35235
+ var IG_TILE_WIDTH = 320;
35236
+ var IG_TILE_STYLE = { width: "100%" };
35237
+ var IG_TILE_RADIUS = 18;
35238
+ var TILE_WRAPPER_STYLE = {
35239
+ position: "relative",
35240
+ borderRadius: IG_TILE_RADIUS,
35241
+ boxShadow: "0 1px 2px rgba(15, 23, 42, 0.08), 0 6px 16px rgba(15, 23, 42, 0.10)"
35242
+ };
35243
+ var CAPTION_SCRIM_STYLE = {
35244
+ position: "absolute",
35245
+ left: 0,
35246
+ right: 0,
35247
+ bottom: 0,
35248
+ padding: "28px 14px 13px",
35249
+ background: "linear-gradient(180deg, rgba(8,12,24,0) 0%, rgba(8,12,24,0.55) 45%, rgba(8,12,24,0.78) 100%)",
35250
+ borderBottomLeftRadius: IG_TILE_RADIUS,
35251
+ borderBottomRightRadius: IG_TILE_RADIUS,
35252
+ pointerEvents: "none"
35253
+ };
35254
+ var CAPTION_TEXT_STYLE = {
35255
+ color: "#fff",
35256
+ fontSize: 13,
35257
+ lineHeight: 1.4,
35258
+ fontWeight: 600,
35259
+ letterSpacing: "0.005em",
35260
+ textShadow: "0 1px 2px rgba(0, 0, 0, 0.35)",
35261
+ display: "-webkit-box",
35262
+ WebkitLineClamp: 2,
35263
+ WebkitBoxOrient: "vertical",
35264
+ overflow: "hidden",
35265
+ height: "2.8em"
35266
+ };
35267
+ var TITLE_MAX = 90;
35268
+ function truncate(text, max = TITLE_MAX) {
35269
+ const trimmed = text.trim();
35270
+ if (trimmed.length <= max) return trimmed;
35271
+ const slice = trimmed.slice(0, max);
35272
+ const lastSpace = slice.lastIndexOf(" ");
35273
+ const head = lastSpace > max * 0.6 ? slice.slice(0, lastSpace) : slice;
35274
+ return `${head.trimEnd()}\u2026`;
35275
+ }
35276
+ function captionToString(caption) {
35277
+ return typeof caption === "string" ? caption : "";
35278
+ }
35279
+ function toMediaItem(item) {
35280
+ const isVideo = Boolean(item.isVideo && item.videoUrl);
35281
+ const fullCaption = captionToString(item.caption);
35282
+ const title = truncate(fullCaption) || item.imageAlt || "Instagram post";
35283
+ const meta = {
35284
+ href: item.href,
35285
+ likeCount: item.likeCount,
35286
+ commentCount: item.commentCount,
35287
+ viewCount: item.viewCount,
35288
+ date: item.date
35289
+ };
35290
+ return {
35291
+ id: item.id,
35292
+ type: isVideo ? "video" : "image",
35293
+ poster: item.image,
35294
+ // Video source only when the post is a real video (image posts ignore it).
35295
+ src: isVideo ? item.videoUrl : void 0,
35296
+ title,
35297
+ caption: fullCaption || void 0,
35298
+ kind: "Instagram",
35299
+ meta
35300
+ };
35301
+ }
35302
+ function openPermalink(item) {
35303
+ if (typeof window === "undefined") return;
35304
+ const href = item.meta?.href;
35305
+ if (!href) return;
35306
+ window.open(href, "_blank", "noopener,noreferrer");
35307
+ }
35308
+ function likeBadge(likeCount) {
35309
+ return /* @__PURE__ */ jsxs(
35310
+ "span",
35311
+ {
35312
+ "aria-label": `${likeCount.toLocaleString()} likes`,
35313
+ style: {
35314
+ display: "inline-flex",
35315
+ alignItems: "center",
35316
+ gap: 6,
35317
+ // Breathing room from the tile's top-left corner (refinement #1).
35318
+ margin: 6,
35319
+ padding: "6px 11px",
35320
+ borderRadius: 999,
35321
+ background: "rgba(8, 12, 24, 0.55)",
35322
+ backdropFilter: "blur(8px)",
35323
+ WebkitBackdropFilter: "blur(8px)",
35324
+ border: "1px solid rgba(255, 255, 255, 0.14)",
35325
+ color: "#fff",
35326
+ fontSize: 13,
35327
+ fontWeight: 600,
35328
+ lineHeight: 1,
35329
+ letterSpacing: "0.01em"
35330
+ },
35331
+ children: [
35332
+ /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/heart", size: 15, "aria-hidden": "true" }),
35333
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: likeCount.toLocaleString() })
35334
+ ]
35335
+ }
35336
+ );
35337
+ }
35338
+ var VIEWER_ACTIONS = [
35339
+ {
35340
+ id: "open-in-instagram",
35341
+ icon: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/external-link", size: 22, "aria-hidden": "true" }),
35342
+ label: "Instagram",
35343
+ ariaLabel: "Open in Instagram",
35344
+ onPress: (item) => openPermalink(item)
35345
+ }
35346
+ ];
35347
+ function RailStat({
35235
35348
  iconName,
35236
35349
  count,
35237
- label
35350
+ label,
35351
+ onPress
35238
35352
  }) {
35239
35353
  return /* @__PURE__ */ jsxs(
35240
- "span",
35354
+ "button",
35241
35355
  {
35242
- className: "inline-flex items-center gap-1",
35356
+ type: "button",
35243
35357
  "aria-label": `${count.toLocaleString()} ${label}`,
35358
+ onClick: (e) => {
35359
+ e.stopPropagation();
35360
+ onPress();
35361
+ },
35362
+ style: {
35363
+ display: "flex",
35364
+ flexDirection: "column",
35365
+ alignItems: "center",
35366
+ gap: 5,
35367
+ padding: 0,
35368
+ border: "none",
35369
+ background: "transparent",
35370
+ color: "inherit",
35371
+ cursor: "pointer",
35372
+ font: "inherit"
35373
+ },
35374
+ children: [
35375
+ /* @__PURE__ */ jsx(
35376
+ "span",
35377
+ {
35378
+ style: {
35379
+ width: 46,
35380
+ height: 46,
35381
+ borderRadius: "50%",
35382
+ background: "var(--psmi-chrome-bg, rgba(255,255,255,0.14))",
35383
+ backdropFilter: "blur(6px)",
35384
+ WebkitBackdropFilter: "blur(6px)",
35385
+ display: "flex",
35386
+ alignItems: "center",
35387
+ justifyContent: "center"
35388
+ },
35389
+ children: /* @__PURE__ */ jsx(DynamicIcon, { name: iconName, size: 22, "aria-hidden": "true" })
35390
+ }
35391
+ ),
35392
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: { fontSize: 11, fontWeight: 600 }, children: count.toLocaleString() })
35393
+ ]
35394
+ }
35395
+ );
35396
+ }
35397
+ function InstagramViewerRail({ item }) {
35398
+ const meta = item.meta ?? {};
35399
+ const open = () => openPermalink(item);
35400
+ return /* @__PURE__ */ jsxs(
35401
+ "div",
35402
+ {
35403
+ style: {
35404
+ position: "absolute",
35405
+ right: 11,
35406
+ bottom: 135,
35407
+ display: "flex",
35408
+ flexDirection: "column",
35409
+ alignItems: "center",
35410
+ gap: 18,
35411
+ color: "var(--psmi-chrome-fg, #fff)",
35412
+ zIndex: 3
35413
+ },
35244
35414
  children: [
35245
- /* @__PURE__ */ jsx(DynamicIcon, { name: iconName, size: 16, "aria-hidden": "true" }),
35246
- /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: count.toLocaleString() })
35415
+ typeof meta.likeCount === "number" ? /* @__PURE__ */ jsx(
35416
+ RailStat,
35417
+ {
35418
+ iconName: "lucide/heart",
35419
+ count: meta.likeCount,
35420
+ label: "likes",
35421
+ onPress: open
35422
+ }
35423
+ ) : null,
35424
+ typeof meta.commentCount === "number" ? /* @__PURE__ */ jsx(
35425
+ RailStat,
35426
+ {
35427
+ iconName: "lucide/message-circle",
35428
+ count: meta.commentCount,
35429
+ label: "comments",
35430
+ onPress: open
35431
+ }
35432
+ ) : null,
35433
+ typeof meta.viewCount === "number" ? /* @__PURE__ */ jsx(
35434
+ RailStat,
35435
+ {
35436
+ iconName: "lucide/eye",
35437
+ count: meta.viewCount,
35438
+ label: "views",
35439
+ onPress: open
35440
+ }
35441
+ ) : null,
35442
+ meta.href ? /* @__PURE__ */ jsxs(
35443
+ "a",
35444
+ {
35445
+ href: meta.href,
35446
+ target: "_blank",
35447
+ rel: "noopener noreferrer",
35448
+ "aria-label": "Open in Instagram",
35449
+ onClick: (e) => e.stopPropagation(),
35450
+ style: {
35451
+ display: "flex",
35452
+ flexDirection: "column",
35453
+ alignItems: "center",
35454
+ gap: 5,
35455
+ padding: 0,
35456
+ border: "none",
35457
+ background: "transparent",
35458
+ color: "inherit",
35459
+ cursor: "pointer",
35460
+ font: "inherit",
35461
+ textDecoration: "none"
35462
+ },
35463
+ children: [
35464
+ /* @__PURE__ */ jsx(
35465
+ "span",
35466
+ {
35467
+ style: {
35468
+ width: 46,
35469
+ height: 46,
35470
+ borderRadius: "50%",
35471
+ background: "var(--psmi-chrome-bg, rgba(255,255,255,0.14))",
35472
+ backdropFilter: "blur(6px)",
35473
+ WebkitBackdropFilter: "blur(6px)",
35474
+ display: "flex",
35475
+ alignItems: "center",
35476
+ justifyContent: "center"
35477
+ },
35478
+ children: /* @__PURE__ */ jsx(
35479
+ DynamicIcon,
35480
+ {
35481
+ name: "lucide/external-link",
35482
+ size: 22,
35483
+ "aria-hidden": "true"
35484
+ }
35485
+ )
35486
+ }
35487
+ ),
35488
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: { fontSize: 11, fontWeight: 600 }, children: "Instagram" })
35489
+ ]
35490
+ }
35491
+ ) : null
35247
35492
  ]
35248
35493
  }
35249
35494
  );
35250
35495
  }
35496
+ function InstagramFeedGrid({
35497
+ mediaItems,
35498
+ gridClassName,
35499
+ itemClassName,
35500
+ imageClassName,
35501
+ optixFlowConfig
35502
+ }) {
35503
+ const { open } = useImmersiveFeed();
35504
+ const posterImgProps = useMemo(() => {
35505
+ const next = {};
35506
+ if (imageClassName) next.className = imageClassName;
35507
+ if (optixFlowConfig) next.optixFlowConfig = optixFlowConfig;
35508
+ return Object.keys(next).length > 0 ? next : void 0;
35509
+ }, [imageClassName, optixFlowConfig]);
35510
+ return /* @__PURE__ */ jsx(
35511
+ "div",
35512
+ {
35513
+ className: cn(
35514
+ "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",
35515
+ gridClassName
35516
+ ),
35517
+ children: mediaItems.map((mediaItem) => {
35518
+ const likeCount = mediaItem.meta?.likeCount;
35519
+ return (
35520
+ // The wrapper owns the tile's outer chrome (subtle boundary shadow,
35521
+ // matching radius) and the block's own caption overlay — the card's
35522
+ // built-in caption is hidden so 1- and 2-line captions can share a
35523
+ // fixed-height, top-aligned text box (annotated refinements #2–#4).
35524
+ /* @__PURE__ */ jsxs("div", { className: itemClassName, style: TILE_WRAPPER_STYLE, children: [
35525
+ /* @__PURE__ */ jsx(
35526
+ ThumbnailCard,
35527
+ {
35528
+ item: mediaItem,
35529
+ onOpen: open,
35530
+ size: IG_TILE_WIDTH,
35531
+ style: IG_TILE_STYLE,
35532
+ elevated: false,
35533
+ hideCaption: true,
35534
+ hideProgressHint: true,
35535
+ showDuration: false,
35536
+ glyphMode: "hover",
35537
+ posterImgProps,
35538
+ badgeSlot: typeof likeCount === "number" ? likeBadge(likeCount) : void 0
35539
+ }
35540
+ ),
35541
+ mediaItem.title ? (
35542
+ // aria-hidden: the card already announces the post title; this
35543
+ // overlay is purely visual. pointer-events pass through to the card.
35544
+ /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: CAPTION_SCRIM_STYLE, children: /* @__PURE__ */ jsx("div", { style: CAPTION_TEXT_STYLE, children: mediaItem.title }) })
35545
+ ) : null
35546
+ ] }, mediaItem.id)
35547
+ );
35548
+ })
35549
+ }
35550
+ );
35551
+ }
35251
35552
  function InstagramPostGrid({
35252
35553
  sectionId = "instagram-post-grid",
35253
35554
  heading,
@@ -35255,118 +35556,32 @@ function InstagramPostGrid({
35255
35556
  items,
35256
35557
  itemsSlot,
35257
35558
  className,
35258
- containerClassName,
35559
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
35560
+ spacing = "py-12 md:py-32",
35259
35561
  headerClassName,
35260
35562
  headingClassName,
35261
35563
  subheadingClassName,
35262
35564
  gridClassName,
35263
35565
  itemClassName,
35264
35566
  imageClassName,
35567
+ optixFlowConfig,
35265
35568
  background,
35266
- spacing,
35267
35569
  pattern,
35268
35570
  patternOpacity,
35269
- patternClassName,
35270
- optixFlowConfig
35571
+ patternClassName
35271
35572
  }) {
35272
- const tiles = useMemo(() => {
35273
- if (itemsSlot) return itemsSlot;
35274
- if (!items || items.length === 0) return null;
35275
- const visibleItems = items.filter((item) => Boolean(item.image));
35276
- return visibleItems.map((item) => {
35277
- const altText = item.imageAlt || (typeof item.caption === "string" ? item.caption : "") || "Instagram post";
35278
- const showVideo = Boolean(item.isVideo && item.videoUrl);
35279
- return /* @__PURE__ */ jsxs(
35280
- Pressable,
35281
- {
35282
- href: item.href,
35283
- "aria-label": typeof item.caption === "string" && item.caption.length > 0 ? item.caption : "View Instagram post",
35284
- className: cn(
35285
- "group relative block aspect-square overflow-hidden rounded-md bg-muted",
35286
- item.className,
35287
- itemClassName
35288
- ),
35289
- children: [
35290
- /* @__PURE__ */ jsx(
35291
- Img,
35292
- {
35293
- src: item.image,
35294
- alt: altText,
35295
- loading: "lazy",
35296
- className: cn(
35297
- "h-full w-full object-cover object-center transition-transform duration-300 group-hover:scale-105 motion-reduce:transform-none motion-reduce:transition-none",
35298
- imageClassName
35299
- ),
35300
- optixFlowConfig
35301
- }
35302
- ),
35303
- showVideo && /* @__PURE__ */ jsx(
35304
- Video,
35305
- {
35306
- src: item.videoUrl,
35307
- poster: item.image,
35308
- controls: false,
35309
- muted: true,
35310
- loop: true,
35311
- playsInline: true,
35312
- preload: "metadata",
35313
- onMouseEnter: (e) => {
35314
- void e.currentTarget.play().catch(() => void 0);
35315
- },
35316
- onMouseLeave: (e) => {
35317
- e.currentTarget.pause();
35318
- e.currentTarget.currentTime = 0;
35319
- },
35320
- className: cn(
35321
- "absolute inset-0 h-full w-full object-cover object-center opacity-0 transition-opacity duration-300 group-hover:opacity-100 motion-reduce:transition-none",
35322
- imageClassName
35323
- )
35324
- }
35325
- ),
35326
- item.isVideo && /* @__PURE__ */ jsx(
35327
- "span",
35328
- {
35329
- className: "absolute right-2 top-2 text-white drop-shadow-md",
35330
- "aria-hidden": "true",
35331
- children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/play", size: 18 })
35332
- }
35333
- ),
35334
- (item.caption || item.date || typeof item.likeCount === "number" || typeof item.commentCount === "number" || typeof item.viewCount === "number") && /* @__PURE__ */ jsxs("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 flex flex-col gap-1 bg-linear-to-t from-black/70 to-transparent p-3 text-left text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100 motion-reduce:transition-none", children: [
35335
- item.caption && (typeof item.caption === "string" ? /* @__PURE__ */ jsx("p", { className: "line-clamp-2 text-xs leading-snug wrap-break-word", children: item.caption }) : /* @__PURE__ */ jsx("div", { className: "line-clamp-2 text-xs leading-snug", children: item.caption })),
35336
- (typeof item.likeCount === "number" || typeof item.commentCount === "number" || typeof item.viewCount === "number" || item.date) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-xs font-medium", children: [
35337
- typeof item.likeCount === "number" && /* @__PURE__ */ jsx(
35338
- EngagementBadge,
35339
- {
35340
- iconName: "lucide/heart",
35341
- count: item.likeCount,
35342
- label: "likes"
35343
- }
35344
- ),
35345
- typeof item.commentCount === "number" && /* @__PURE__ */ jsx(
35346
- EngagementBadge,
35347
- {
35348
- iconName: "lucide/message-circle",
35349
- count: item.commentCount,
35350
- label: "comments"
35351
- }
35352
- ),
35353
- typeof item.viewCount === "number" && /* @__PURE__ */ jsx(
35354
- EngagementBadge,
35355
- {
35356
- iconName: "lucide/eye",
35357
- count: item.viewCount,
35358
- label: "views"
35359
- }
35360
- ),
35361
- item.date && /* @__PURE__ */ jsx("span", { className: "ml-auto opacity-80", children: item.date })
35362
- ] })
35363
- ] })
35364
- ]
35365
- },
35366
- item.id
35573
+ const mediaItems = useMemo(() => {
35574
+ if (itemsSlot || !items) return [];
35575
+ const withImage = items.filter((item) => Boolean(item.image));
35576
+ if (process.env.NODE_ENV !== "production" && withImage.length < items.length) {
35577
+ const skipped = items.filter((item) => !item.image);
35578
+ const skippedIds = skipped.map((item) => item.id).join(", ");
35579
+ console.warn(
35580
+ `[instagram-post-grid] skipped ${skipped.length} item(s) without a resolvable image: ${skippedIds}`
35367
35581
  );
35368
- });
35369
- }, [itemsSlot, items, itemClassName, imageClassName, optixFlowConfig]);
35582
+ }
35583
+ return withImage.map(toMediaItem);
35584
+ }, [items, itemsSlot]);
35370
35585
  if (!itemsSlot && (!items || items.length === 0)) {
35371
35586
  return null;
35372
35587
  }
@@ -35404,16 +35619,34 @@ function InstagramPostGrid({
35404
35619
  }
35405
35620
  ) : /* @__PURE__ */ jsx("div", { className: subheadingClassName, children: subheading }))
35406
35621
  ] }),
35407
- /* @__PURE__ */ jsx(
35622
+ itemsSlot ? /* @__PURE__ */ jsx(
35408
35623
  "div",
35409
35624
  {
35410
35625
  className: cn(
35411
- "grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4",
35626
+ "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",
35412
35627
  gridClassName
35413
35628
  ),
35414
- children: tiles
35629
+ children: itemsSlot
35415
35630
  }
35416
- )
35631
+ ) : /* @__PURE__ */ jsxs(ImmersiveFeedProvider, { items: mediaItems, actions: VIEWER_ACTIONS, children: [
35632
+ /* @__PURE__ */ jsx(
35633
+ InstagramFeedGrid,
35634
+ {
35635
+ mediaItems,
35636
+ gridClassName,
35637
+ itemClassName,
35638
+ imageClassName,
35639
+ optixFlowConfig
35640
+ }
35641
+ ),
35642
+ /* @__PURE__ */ jsx(
35643
+ ImmersiveViewer,
35644
+ {
35645
+ ariaLabel: "Instagram post viewer",
35646
+ renderActions: ({ item }) => /* @__PURE__ */ jsx(InstagramViewerRail, { item })
35647
+ }
35648
+ )
35649
+ ] })
35417
35650
  ]
35418
35651
  }
35419
35652
  );
@@ -111294,8 +111527,8 @@ var interiorCarousel = {
111294
111527
  }
111295
111528
  };
111296
111529
  var instagramPostGrid = {
111297
- exampleUsage: "Display a website's Instagram feed as a responsive grid of square tiles. Each tile links out to the post's instagram.com permalink in a new tab, shows the caption and post date on hover, and renders like/comment/view counts when available. Video posts play muted on hover. Data is hydrated from the toastability Instagram feed (dataSource type 'instagram_feed', bindTo 'items').",
111298
- importantUsageNotes: `${GALLERY_MEDIA_NOTE} This is a DYNAMIC feed block: its 'items' are hydrated at routing-build time from the connected Instagram profile \u2014 do NOT hand-author post content. 'items[].image' and 'items[].videoUrl' MUST be the re-hosted MediaRecord CDN URLs served by the feed; expiring Instagram CDN URLs must never be used. Engagement counts ('likeCount', 'commentCount', 'viewCount') render only when the value is present \u2014 never fabricate a zero for a missing metric. Each 'items[].href' is an external instagram.com permalink and opens in a new tab. Items without an 'image' are skipped; an empty or missing 'items' array renders nothing. Requires the site to have a connected, fully-imported Instagram profile ('instagram_media' capability).`,
111530
+ exampleUsage: "Display a website's Instagram feed as a responsive grid of vertical (9:16) tiles that open a fullscreen, swipeable immersive viewer (TikTok/Reels-style). Photos and reels are both first-class media \u2014 reels play a muted preview and open with playback; photos open as a full-bleed still. Each tile shows a like-count pill top-left (when available), no duration timestamp, and a center glyph on hover only (a play triangle for reels, an expand icon for photos). The fullscreen viewer carries the caption plus a read-only engagement rail (likes/comments/views) and an explicit 'Open in Instagram' link (a real anchor opening in a new tab). Data is hydrated from the toastability Instagram feed (dataSource type 'instagram_feed', bindTo 'items').",
111531
+ importantUsageNotes: `${GALLERY_MEDIA_NOTE} This is a DYNAMIC feed block: its 'items' are hydrated at routing-build time from the connected Instagram profile \u2014 do NOT hand-author post content. 'items[].image' and 'items[].videoUrl' MUST be the re-hosted MediaRecord CDN URLs served by the feed; expiring Instagram CDN URLs must never be used. Tiles are VERTICAL (9:16) and render both photos and reels; a post is treated as a reel only when 'isVideo' is true AND 'videoUrl' is present. Engagement counts ('likeCount', 'commentCount', 'viewCount') render only when the value is present \u2014 never fabricate a zero for a missing metric; 'likeCount' surfaces as the tile's top-left pill and, with comments/views, in the viewer rail. Tapping a tile OPENS THE FULLSCREEN VIEWER (the whole-tile link-out was replaced); the instagram.com permalink ('items[].href') opens from the viewer's 'Open in Instagram' egress, which is rendered as a REAL anchor (target=_blank, rel=noopener noreferrer) \u2014 a crawlable, affordance-correct link, not a scripted window.open button. 'items[].caption' should be a plain STRING when rendered immersively \u2014 it flows through as the tile/viewer title text; a rich ReactNode caption cannot be threaded through the immersive card/viewer and falls back to 'items[].imageAlt' (then a generic label). Consumer image styling is honored: 'imageClassName' and 'optixFlowConfig' are forwarded onto each tile's poster image. Items without an 'image' are skipped; an empty or missing 'items' array renders nothing. Requires the site to have a connected, fully-imported Instagram profile ('instagram_media' capability).`,
111299
111532
  usageRequirements: {
111300
111533
  requiredProps: ["items"],
111301
111534
  requiresSiteCapabilities: galleryCapabilities(
@@ -111303,9 +111536,12 @@ var instagramPostGrid = {
111303
111536
  "media_library"
111304
111537
  ),
111305
111538
  propConstraints: {
111539
+ heading: { maxLength: 60 },
111306
111540
  items: {
111307
- minItems: 3,
111308
- maxItems: 24
111541
+ required: true,
111542
+ minItems: 4,
111543
+ maxItems: 16,
111544
+ note: "Use multiples of the 4-column desktop grid (8 or 12) so rows fill cleanly. Every item must carry a re-hosted CDN image URL \u2014 imageless items are skipped at render (dev builds warn)."
111309
111545
  }
111310
111546
  },
111311
111547
  mediaSlots: {
@@ -111331,33 +111567,90 @@ var instagramPostGrid = {
111331
111567
  id: "1",
111332
111568
  href: "https://www.instagram.com/p/CxAmpLe001/",
111333
111569
  image: GALLERY_EXAMPLE_IMAGE_URL,
111334
- imageAlt: "Espresso being poured at the counter",
111570
+ imageAlt: "Espresso being pulled at the counter",
111335
111571
  caption: "Morning pours before the rush \u2615\uFE0F",
111336
- date: "Jul 1, 2026",
111337
- likeCount: 128,
111338
- commentCount: 12
111572
+ date: "Jul 6, 2026",
111573
+ likeCount: 428,
111574
+ commentCount: 34
111339
111575
  },
111340
111576
  {
111341
111577
  id: "2",
111342
111578
  href: "https://www.instagram.com/p/CxAmpLe002/",
111343
- image: GALLERY_EXAMPLE_IMAGE_URL,
111344
- imageAlt: "Behind the scenes reel",
111345
- caption: "Behind the scenes of today's bake #freshbread",
111346
- date: "Jun 28, 2026",
111579
+ image: "https://toastability-production.s3.amazonaws.com/z9u4sdrj2oq3eds0qyui0nxsus3j",
111580
+ imageAlt: "Line cook plating on a busy Friday service",
111581
+ caption: "Behind the pass on a Friday night service \u{1F525}",
111582
+ date: "Jul 4, 2026",
111347
111583
  isVideo: true,
111348
- videoUrl: "https://toastability-production.s3.amazonaws.com/4kox2ux0ye1wlqkdwg03s08a67i1",
111349
- likeCount: 342,
111350
- commentCount: 21,
111351
- viewCount: 4820
111584
+ videoUrl: "https://toastability-production.s3.amazonaws.com/b555hwjt7ltr81et05v5254q1ak6",
111585
+ likeCount: 1203,
111586
+ commentCount: 88,
111587
+ viewCount: 12840
111352
111588
  },
111353
111589
  {
111354
111590
  id: "3",
111355
111591
  href: "https://www.instagram.com/p/CxAmpLe003/",
111592
+ image: "https://toastability-production.s3.amazonaws.com/63aotyt2pb4gqpccej2kkw8reson",
111593
+ imageAlt: "House pancakes with maple butter",
111594
+ caption: "Weekend brunch is back \u2014 house pancakes + maple butter",
111595
+ date: "Jul 2, 2026",
111596
+ likeCount: 356,
111597
+ commentCount: 27
111598
+ },
111599
+ {
111600
+ id: "4",
111601
+ href: "https://www.instagram.com/p/CxAmpLe004/",
111602
+ image: "https://toastability-production.s3.amazonaws.com/we9r4e711an6d0bd3dwbl9tb9z7q",
111603
+ imageAlt: "Barista finishing latte art",
111604
+ caption: "60 seconds of latte art, no cuts \u2728",
111605
+ date: "Jun 29, 2026",
111606
+ isVideo: true,
111607
+ videoUrl: "https://toastability-production.s3.amazonaws.com/dvz0441h9fxjhh88lzqbwdoyxv52",
111608
+ likeCount: 942,
111609
+ commentCount: 61,
111610
+ viewCount: 8675
111611
+ },
111612
+ {
111613
+ id: "5",
111614
+ href: "https://www.instagram.com/p/CxAmpLe005/",
111356
111615
  image: GALLERY_EXAMPLE_IMAGE_URL,
111357
- imageAlt: "Weekend brunch spread",
111358
- caption: "Weekend brunch is back on the menu",
111616
+ imageAlt: "Fresh sourdough loaves out of the oven",
111617
+ caption: "Fresh sourdough out of the oven at 6am \u{1F956}",
111618
+ date: "Jun 27, 2026",
111619
+ likeCount: 512,
111620
+ commentCount: 41
111621
+ },
111622
+ {
111623
+ id: "6",
111624
+ href: "https://www.instagram.com/p/CxAmpLe006/",
111625
+ image: "https://toastability-production.s3.amazonaws.com/c4sgsy0g7o2rrjmvm9x7evxems82",
111626
+ imageAlt: "Chef plating a summer heirloom tomato salad",
111627
+ caption: "Plating the summer heirloom tomato salad \u{1F345}",
111359
111628
  date: "Jun 24, 2026",
111360
- likeCount: 96
111629
+ isVideo: true,
111630
+ videoUrl: "https://toastability-production.s3.amazonaws.com/jhjfvkmdzktacyijd9fh6acc7o2c",
111631
+ likeCount: 731,
111632
+ commentCount: 45,
111633
+ viewCount: 6390
111634
+ },
111635
+ {
111636
+ id: "7",
111637
+ href: "https://www.instagram.com/p/CxAmpLe007/",
111638
+ image: "https://toastability-production.s3.amazonaws.com/kh1p8y15v55ctp5ulobm4pd77etm",
111639
+ imageAlt: "Sunny patio seating with fresh flowers",
111640
+ caption: "Patio season is officially open \u2600\uFE0F",
111641
+ date: "Jun 21, 2026",
111642
+ likeCount: 289,
111643
+ commentCount: 19
111644
+ },
111645
+ {
111646
+ id: "8",
111647
+ href: "https://www.instagram.com/p/CxAmpLe008/",
111648
+ image: "https://toastability-production.s3.amazonaws.com/2d4k8d5shwg82276hzj2ztbj7mxq",
111649
+ imageAlt: "Charred corn elote on a plate",
111650
+ caption: "New on the menu: charred corn elote, our way \u{1F33D}",
111651
+ date: "Jun 18, 2026",
111652
+ likeCount: 634,
111653
+ commentCount: 52
111361
111654
  }
111362
111655
  ]
111363
111656
  }
@@ -124777,7 +125070,7 @@ var BLOCK_REGISTRY = {
124777
125070
  "instagram-post-grid": {
124778
125071
  id: "instagram-post-grid",
124779
125072
  name: "Instagram Post Grid",
124780
- description: "A responsive grid of square tiles rendering a website's Instagram feed. Each tile links out to the post's instagram.com permalink in a new tab, reveals the caption, date, and like/comment/view counts on hover, and plays video posts muted on hover. Content is hydrated dynamically from the connected Instagram profile. Ideal for social proof sections, footers, and community pages that showcase a live Instagram presence.",
125073
+ description: "A responsive grid of vertical (9:16) tiles rendering a website's Instagram feed. Tapping a tile opens a fullscreen, swipeable immersive viewer (TikTok/Reels-style) with the caption, a read-only engagement rail (likes/comments/views), and an 'Open in Instagram' action. Photos and reels are both first-class media; each tile shows a like-count pill and a hover-only center glyph (play for reels, expand for photos). Content is hydrated dynamically from the connected Instagram profile. Ideal for social proof sections, footers, and community pages that showcase a live Instagram presence.",
124781
125074
  semanticTags: [
124782
125075
  "gallery",
124783
125076
  "instagram",
@@ -77,6 +77,6 @@ interface SocialLinkIconProps extends Omit<PressableProps, "children">, SocialLi
77
77
  * />
78
78
  * ```
79
79
  */
80
- declare const SocialLinkIcon: React.ForwardRefExoticComponent<SocialLinkIconProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>>;
80
+ declare const SocialLinkIcon: React.ForwardRefExoticComponent<SocialLinkIconProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement | HTMLSpanElement>>;
81
81
 
82
82
  export { SocialLinkIcon, type SocialLinkIconDynamicIconProps, type SocialLinkIconProps };
@@ -77,6 +77,6 @@ interface SocialLinkIconProps extends Omit<PressableProps, "children">, SocialLi
77
77
  * />
78
78
  * ```
79
79
  */
80
- declare const SocialLinkIcon: React.ForwardRefExoticComponent<SocialLinkIconProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>>;
80
+ declare const SocialLinkIcon: React.ForwardRefExoticComponent<SocialLinkIconProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement | HTMLSpanElement>>;
81
81
 
82
82
  export { SocialLinkIcon, type SocialLinkIconDynamicIconProps, type SocialLinkIconProps };