@opensite/ui 3.11.0 → 3.12.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/instagram-post-grid.cjs +211 -157
- package/dist/instagram-post-grid.d.cts +17 -1
- package/dist/instagram-post-grid.d.ts +17 -1
- package/dist/instagram-post-grid.js +211 -157
- package/dist/registry.cjs +293 -178
- package/dist/registry.js +293 -178
- package/package.json +1 -1
package/dist/registry.cjs
CHANGED
|
@@ -35274,6 +35274,39 @@ function InteriorCarousel({
|
|
|
35274
35274
|
}
|
|
35275
35275
|
var IG_TILE_WIDTH = 320;
|
|
35276
35276
|
var IG_TILE_STYLE = { width: "100%" };
|
|
35277
|
+
var IG_TILE_RADIUS = 18;
|
|
35278
|
+
var TILE_WRAPPER_STYLE = {
|
|
35279
|
+
position: "relative",
|
|
35280
|
+
borderRadius: IG_TILE_RADIUS,
|
|
35281
|
+
boxShadow: "0 1px 2px rgba(15, 23, 42, 0.08), 0 6px 16px rgba(15, 23, 42, 0.10)"
|
|
35282
|
+
};
|
|
35283
|
+
var CAPTION_SCRIM_STYLE = {
|
|
35284
|
+
position: "absolute",
|
|
35285
|
+
left: 0,
|
|
35286
|
+
right: 0,
|
|
35287
|
+
bottom: 0,
|
|
35288
|
+
padding: "28px 14px 13px",
|
|
35289
|
+
background: "linear-gradient(180deg, rgba(8,12,24,0) 0%, rgba(8,12,24,0.55) 45%, rgba(8,12,24,0.78) 100%)",
|
|
35290
|
+
borderBottomLeftRadius: IG_TILE_RADIUS,
|
|
35291
|
+
borderBottomRightRadius: IG_TILE_RADIUS,
|
|
35292
|
+
pointerEvents: "none",
|
|
35293
|
+
// Hiding captions for now until we build in
|
|
35294
|
+
// the dynamic behavior that clients can dictate
|
|
35295
|
+
display: "none"
|
|
35296
|
+
};
|
|
35297
|
+
var CAPTION_TEXT_STYLE = {
|
|
35298
|
+
color: "#fff",
|
|
35299
|
+
fontSize: 13,
|
|
35300
|
+
lineHeight: 1.4,
|
|
35301
|
+
fontWeight: 600,
|
|
35302
|
+
letterSpacing: "0.005em",
|
|
35303
|
+
textShadow: "0 1px 2px rgba(0, 0, 0, 0.35)",
|
|
35304
|
+
display: "-webkit-box",
|
|
35305
|
+
WebkitLineClamp: 2,
|
|
35306
|
+
WebkitBoxOrient: "vertical",
|
|
35307
|
+
overflow: "hidden",
|
|
35308
|
+
height: "2.8em"
|
|
35309
|
+
};
|
|
35277
35310
|
var TITLE_MAX = 90;
|
|
35278
35311
|
function truncate(text, max = TITLE_MAX) {
|
|
35279
35312
|
const trimmed = text.trim();
|
|
@@ -35323,19 +35356,23 @@ function likeBadge(likeCount) {
|
|
|
35323
35356
|
style: {
|
|
35324
35357
|
display: "inline-flex",
|
|
35325
35358
|
alignItems: "center",
|
|
35326
|
-
gap:
|
|
35327
|
-
|
|
35359
|
+
gap: 6,
|
|
35360
|
+
// Breathing room from the tile's top-left corner (refinement #1).
|
|
35361
|
+
margin: 6,
|
|
35362
|
+
padding: "6px 11px",
|
|
35328
35363
|
borderRadius: 999,
|
|
35329
|
-
background: "rgba(8,12,24,0.
|
|
35330
|
-
backdropFilter: "blur(
|
|
35331
|
-
WebkitBackdropFilter: "blur(
|
|
35364
|
+
background: "rgba(8, 12, 24, 0.55)",
|
|
35365
|
+
backdropFilter: "blur(8px)",
|
|
35366
|
+
WebkitBackdropFilter: "blur(8px)",
|
|
35367
|
+
border: "1px solid rgba(255, 255, 255, 0.14)",
|
|
35332
35368
|
color: "#fff",
|
|
35333
|
-
fontSize:
|
|
35334
|
-
fontWeight:
|
|
35335
|
-
lineHeight: 1
|
|
35369
|
+
fontSize: 13,
|
|
35370
|
+
fontWeight: 600,
|
|
35371
|
+
lineHeight: 1,
|
|
35372
|
+
letterSpacing: "0.01em"
|
|
35336
35373
|
},
|
|
35337
35374
|
children: [
|
|
35338
|
-
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "
|
|
35375
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "mdi/cards-heart", size: 15, "aria-hidden": "true" }),
|
|
35339
35376
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: likeCount.toLocaleString() })
|
|
35340
35377
|
]
|
|
35341
35378
|
}
|
|
@@ -35344,66 +35381,15 @@ function likeBadge(likeCount) {
|
|
|
35344
35381
|
var VIEWER_ACTIONS = [
|
|
35345
35382
|
{
|
|
35346
35383
|
id: "open-in-instagram",
|
|
35347
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/
|
|
35384
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/instagram", size: 22, "aria-hidden": "true" }),
|
|
35348
35385
|
label: "Instagram",
|
|
35349
35386
|
ariaLabel: "Open in Instagram",
|
|
35350
35387
|
onPress: (item) => openPermalink(item)
|
|
35351
35388
|
}
|
|
35352
35389
|
];
|
|
35353
|
-
function RailStat({
|
|
35354
|
-
iconName,
|
|
35355
|
-
count,
|
|
35356
|
-
label,
|
|
35357
|
-
onPress
|
|
35358
|
-
}) {
|
|
35359
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35360
|
-
"button",
|
|
35361
|
-
{
|
|
35362
|
-
type: "button",
|
|
35363
|
-
"aria-label": `${count.toLocaleString()} ${label}`,
|
|
35364
|
-
onClick: (e) => {
|
|
35365
|
-
e.stopPropagation();
|
|
35366
|
-
onPress();
|
|
35367
|
-
},
|
|
35368
|
-
style: {
|
|
35369
|
-
display: "flex",
|
|
35370
|
-
flexDirection: "column",
|
|
35371
|
-
alignItems: "center",
|
|
35372
|
-
gap: 5,
|
|
35373
|
-
padding: 0,
|
|
35374
|
-
border: "none",
|
|
35375
|
-
background: "transparent",
|
|
35376
|
-
color: "inherit",
|
|
35377
|
-
cursor: "pointer",
|
|
35378
|
-
font: "inherit"
|
|
35379
|
-
},
|
|
35380
|
-
children: [
|
|
35381
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35382
|
-
"span",
|
|
35383
|
-
{
|
|
35384
|
-
style: {
|
|
35385
|
-
width: 46,
|
|
35386
|
-
height: 46,
|
|
35387
|
-
borderRadius: "50%",
|
|
35388
|
-
background: "var(--psmi-chrome-bg, rgba(255,255,255,0.14))",
|
|
35389
|
-
backdropFilter: "blur(6px)",
|
|
35390
|
-
WebkitBackdropFilter: "blur(6px)",
|
|
35391
|
-
display: "flex",
|
|
35392
|
-
alignItems: "center",
|
|
35393
|
-
justifyContent: "center"
|
|
35394
|
-
},
|
|
35395
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: iconName, size: 22, "aria-hidden": "true" })
|
|
35396
|
-
}
|
|
35397
|
-
),
|
|
35398
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", style: { fontSize: 11, fontWeight: 600 }, children: count.toLocaleString() })
|
|
35399
|
-
]
|
|
35400
|
-
}
|
|
35401
|
-
);
|
|
35402
|
-
}
|
|
35403
35390
|
function InstagramViewerRail({ item }) {
|
|
35404
35391
|
const meta = item.meta ?? {};
|
|
35405
|
-
|
|
35406
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35392
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35407
35393
|
"div",
|
|
35408
35394
|
{
|
|
35409
35395
|
style: {
|
|
@@ -35417,84 +35403,126 @@ function InstagramViewerRail({ item }) {
|
|
|
35417
35403
|
color: "var(--psmi-chrome-fg, #fff)",
|
|
35418
35404
|
zIndex: 3
|
|
35419
35405
|
},
|
|
35406
|
+
children: meta.href ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
35407
|
+
"a",
|
|
35408
|
+
{
|
|
35409
|
+
href: meta.href,
|
|
35410
|
+
target: "_blank",
|
|
35411
|
+
rel: "noopener noreferrer",
|
|
35412
|
+
"aria-label": "Open in Instagram",
|
|
35413
|
+
onClick: (e) => e.stopPropagation(),
|
|
35414
|
+
style: {
|
|
35415
|
+
display: "flex",
|
|
35416
|
+
flexDirection: "column",
|
|
35417
|
+
alignItems: "center",
|
|
35418
|
+
padding: 0,
|
|
35419
|
+
border: "none",
|
|
35420
|
+
background: "transparent",
|
|
35421
|
+
color: "inherit",
|
|
35422
|
+
cursor: "pointer",
|
|
35423
|
+
font: "inherit",
|
|
35424
|
+
textDecoration: "none"
|
|
35425
|
+
},
|
|
35426
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35427
|
+
"span",
|
|
35428
|
+
{
|
|
35429
|
+
style: {
|
|
35430
|
+
width: 46,
|
|
35431
|
+
height: 46,
|
|
35432
|
+
borderRadius: "50%",
|
|
35433
|
+
background: "var(--psmi-chrome-bg, rgba(255,255,255,0.14))",
|
|
35434
|
+
backdropFilter: "blur(6px)",
|
|
35435
|
+
WebkitBackdropFilter: "blur(6px)",
|
|
35436
|
+
display: "flex",
|
|
35437
|
+
alignItems: "center",
|
|
35438
|
+
justifyContent: "center"
|
|
35439
|
+
},
|
|
35440
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35441
|
+
DynamicIcon,
|
|
35442
|
+
{
|
|
35443
|
+
name: "lucide/instagram",
|
|
35444
|
+
size: 22,
|
|
35445
|
+
"aria-hidden": "true"
|
|
35446
|
+
}
|
|
35447
|
+
)
|
|
35448
|
+
}
|
|
35449
|
+
)
|
|
35450
|
+
}
|
|
35451
|
+
) : null
|
|
35452
|
+
}
|
|
35453
|
+
);
|
|
35454
|
+
}
|
|
35455
|
+
function profileUrl(username) {
|
|
35456
|
+
return `https://www.instagram.com/${username.replace(/^@+/, "")}/`;
|
|
35457
|
+
}
|
|
35458
|
+
var USERNAME_BADGE_STYLE = {
|
|
35459
|
+
display: "inline-flex",
|
|
35460
|
+
alignItems: "center",
|
|
35461
|
+
gap: 7,
|
|
35462
|
+
marginBottom: 10,
|
|
35463
|
+
padding: "7px 12px",
|
|
35464
|
+
borderRadius: 999,
|
|
35465
|
+
background: "var(--psmi-chrome-bg, rgba(255,255,255,0.16))",
|
|
35466
|
+
backdropFilter: "blur(8px)",
|
|
35467
|
+
WebkitBackdropFilter: "blur(8px)",
|
|
35468
|
+
border: "1px solid rgba(255, 255, 255, 0.18)",
|
|
35469
|
+
color: "inherit",
|
|
35470
|
+
fontSize: 13,
|
|
35471
|
+
fontWeight: 700,
|
|
35472
|
+
lineHeight: 1,
|
|
35473
|
+
letterSpacing: "0.01em",
|
|
35474
|
+
textDecoration: "none",
|
|
35475
|
+
pointerEvents: "auto"
|
|
35476
|
+
};
|
|
35477
|
+
var VIEWER_TITLE_STYLE = {
|
|
35478
|
+
fontSize: 16,
|
|
35479
|
+
fontWeight: 700,
|
|
35480
|
+
lineHeight: 1.35,
|
|
35481
|
+
textShadow: "0 1px 2px rgba(0, 0, 0, 0.4)",
|
|
35482
|
+
display: "-webkit-box",
|
|
35483
|
+
WebkitLineClamp: 2,
|
|
35484
|
+
WebkitBoxOrient: "vertical",
|
|
35485
|
+
overflow: "hidden"
|
|
35486
|
+
};
|
|
35487
|
+
function InstagramViewerCaption({
|
|
35488
|
+
item,
|
|
35489
|
+
username
|
|
35490
|
+
}) {
|
|
35491
|
+
const handle = username?.replace(/^@+/, "");
|
|
35492
|
+
const badgeContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
35493
|
+
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/instagram", size: 14, "aria-hidden": "true" }),
|
|
35494
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: handle ? `@${handle}` : "Instagram" })
|
|
35495
|
+
] });
|
|
35496
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35497
|
+
"div",
|
|
35498
|
+
{
|
|
35499
|
+
style: {
|
|
35500
|
+
position: "absolute",
|
|
35501
|
+
left: 16,
|
|
35502
|
+
// Mirrors the library caption card's clearance for the actions rail.
|
|
35503
|
+
right: 78,
|
|
35504
|
+
bottom: 34,
|
|
35505
|
+
color: "var(--psmi-chrome-fg, #fff)",
|
|
35506
|
+
zIndex: 2
|
|
35507
|
+
},
|
|
35420
35508
|
children: [
|
|
35421
|
-
|
|
35422
|
-
RailStat,
|
|
35423
|
-
{
|
|
35424
|
-
iconName: "lucide/heart",
|
|
35425
|
-
count: meta.likeCount,
|
|
35426
|
-
label: "likes",
|
|
35427
|
-
onPress: open
|
|
35428
|
-
}
|
|
35429
|
-
) : null,
|
|
35430
|
-
typeof meta.commentCount === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
35431
|
-
RailStat,
|
|
35432
|
-
{
|
|
35433
|
-
iconName: "lucide/message-circle",
|
|
35434
|
-
count: meta.commentCount,
|
|
35435
|
-
label: "comments",
|
|
35436
|
-
onPress: open
|
|
35437
|
-
}
|
|
35438
|
-
) : null,
|
|
35439
|
-
typeof meta.viewCount === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
35440
|
-
RailStat,
|
|
35441
|
-
{
|
|
35442
|
-
iconName: "lucide/eye",
|
|
35443
|
-
count: meta.viewCount,
|
|
35444
|
-
label: "views",
|
|
35445
|
-
onPress: open
|
|
35446
|
-
}
|
|
35447
|
-
) : null,
|
|
35448
|
-
meta.href ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35509
|
+
handle ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
35449
35510
|
"a",
|
|
35450
35511
|
{
|
|
35451
|
-
href:
|
|
35512
|
+
href: profileUrl(handle),
|
|
35452
35513
|
target: "_blank",
|
|
35453
35514
|
rel: "noopener noreferrer",
|
|
35454
|
-
"aria-label":
|
|
35515
|
+
"aria-label": `Open @${handle} on Instagram`,
|
|
35455
35516
|
onClick: (e) => e.stopPropagation(),
|
|
35456
|
-
style: {
|
|
35457
|
-
|
|
35458
|
-
flexDirection: "column",
|
|
35459
|
-
alignItems: "center",
|
|
35460
|
-
gap: 5,
|
|
35461
|
-
padding: 0,
|
|
35462
|
-
border: "none",
|
|
35463
|
-
background: "transparent",
|
|
35464
|
-
color: "inherit",
|
|
35465
|
-
cursor: "pointer",
|
|
35466
|
-
font: "inherit",
|
|
35467
|
-
textDecoration: "none"
|
|
35468
|
-
},
|
|
35469
|
-
children: [
|
|
35470
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35471
|
-
"span",
|
|
35472
|
-
{
|
|
35473
|
-
style: {
|
|
35474
|
-
width: 46,
|
|
35475
|
-
height: 46,
|
|
35476
|
-
borderRadius: "50%",
|
|
35477
|
-
background: "var(--psmi-chrome-bg, rgba(255,255,255,0.14))",
|
|
35478
|
-
backdropFilter: "blur(6px)",
|
|
35479
|
-
WebkitBackdropFilter: "blur(6px)",
|
|
35480
|
-
display: "flex",
|
|
35481
|
-
alignItems: "center",
|
|
35482
|
-
justifyContent: "center"
|
|
35483
|
-
},
|
|
35484
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35485
|
-
DynamicIcon,
|
|
35486
|
-
{
|
|
35487
|
-
name: "lucide/external-link",
|
|
35488
|
-
size: 22,
|
|
35489
|
-
"aria-hidden": "true"
|
|
35490
|
-
}
|
|
35491
|
-
)
|
|
35492
|
-
}
|
|
35493
|
-
),
|
|
35494
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", style: { fontSize: 11, fontWeight: 600 }, children: "Instagram" })
|
|
35495
|
-
]
|
|
35517
|
+
style: { ...USERNAME_BADGE_STYLE, cursor: "pointer" },
|
|
35518
|
+
children: badgeContent
|
|
35496
35519
|
}
|
|
35497
|
-
) :
|
|
35520
|
+
) : (
|
|
35521
|
+
// No username supplied: never fabricate a handle — degrade to a
|
|
35522
|
+
// non-interactive "Instagram" chip in the same position.
|
|
35523
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: USERNAME_BADGE_STYLE, children: badgeContent })
|
|
35524
|
+
),
|
|
35525
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: VIEWER_TITLE_STYLE, children: item.title })
|
|
35498
35526
|
]
|
|
35499
35527
|
}
|
|
35500
35528
|
);
|
|
@@ -35504,7 +35532,8 @@ function InstagramFeedGrid({
|
|
|
35504
35532
|
gridClassName,
|
|
35505
35533
|
itemClassName,
|
|
35506
35534
|
imageClassName,
|
|
35507
|
-
optixFlowConfig
|
|
35535
|
+
optixFlowConfig,
|
|
35536
|
+
showLikeBadges = false
|
|
35508
35537
|
}) {
|
|
35509
35538
|
const { open } = mediaImmersive.useImmersiveFeed();
|
|
35510
35539
|
const posterImgProps = React30.useMemo(() => {
|
|
@@ -35517,26 +35546,39 @@ function InstagramFeedGrid({
|
|
|
35517
35546
|
"div",
|
|
35518
35547
|
{
|
|
35519
35548
|
className: cn(
|
|
35520
|
-
"grid grid-cols-2 gap-
|
|
35549
|
+
"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",
|
|
35521
35550
|
gridClassName
|
|
35522
35551
|
),
|
|
35523
35552
|
children: mediaItems.map((mediaItem) => {
|
|
35524
35553
|
const likeCount = mediaItem.meta?.likeCount;
|
|
35525
|
-
return
|
|
35526
|
-
|
|
35527
|
-
|
|
35528
|
-
|
|
35529
|
-
|
|
35530
|
-
|
|
35531
|
-
|
|
35532
|
-
|
|
35533
|
-
|
|
35534
|
-
|
|
35535
|
-
|
|
35536
|
-
|
|
35537
|
-
|
|
35538
|
-
|
|
35539
|
-
|
|
35554
|
+
return (
|
|
35555
|
+
// The wrapper owns the tile's outer chrome (subtle boundary shadow,
|
|
35556
|
+
// matching radius) and the block's own caption overlay — the card's
|
|
35557
|
+
// built-in caption is hidden so 1- and 2-line captions can share a
|
|
35558
|
+
// fixed-height, top-aligned text box (annotated refinements #2–#4).
|
|
35559
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: itemClassName, style: TILE_WRAPPER_STYLE, children: [
|
|
35560
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35561
|
+
mediaImmersive.ThumbnailCard,
|
|
35562
|
+
{
|
|
35563
|
+
item: mediaItem,
|
|
35564
|
+
onOpen: open,
|
|
35565
|
+
size: IG_TILE_WIDTH,
|
|
35566
|
+
style: IG_TILE_STYLE,
|
|
35567
|
+
elevated: false,
|
|
35568
|
+
hideCaption: true,
|
|
35569
|
+
hideProgressHint: true,
|
|
35570
|
+
showDuration: false,
|
|
35571
|
+
glyphMode: "hover",
|
|
35572
|
+
posterImgProps,
|
|
35573
|
+
badgeSlot: showLikeBadges && typeof likeCount === "number" ? likeBadge(likeCount) : void 0
|
|
35574
|
+
}
|
|
35575
|
+
),
|
|
35576
|
+
mediaItem.title ? (
|
|
35577
|
+
// aria-hidden: the card already announces the post title; this
|
|
35578
|
+
// overlay is purely visual. pointer-events pass through to the card.
|
|
35579
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", style: CAPTION_SCRIM_STYLE, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: CAPTION_TEXT_STYLE, children: mediaItem.title }) })
|
|
35580
|
+
) : null
|
|
35581
|
+
] }, mediaItem.id)
|
|
35540
35582
|
);
|
|
35541
35583
|
})
|
|
35542
35584
|
}
|
|
@@ -35549,7 +35591,8 @@ function InstagramPostGrid({
|
|
|
35549
35591
|
items,
|
|
35550
35592
|
itemsSlot,
|
|
35551
35593
|
className,
|
|
35552
|
-
containerClassName,
|
|
35594
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
35595
|
+
spacing = "py-12 md:py-32",
|
|
35553
35596
|
headerClassName,
|
|
35554
35597
|
headingClassName,
|
|
35555
35598
|
subheadingClassName,
|
|
@@ -35557,15 +35600,24 @@ function InstagramPostGrid({
|
|
|
35557
35600
|
itemClassName,
|
|
35558
35601
|
imageClassName,
|
|
35559
35602
|
optixFlowConfig,
|
|
35603
|
+
username,
|
|
35604
|
+
showLikeBadges = false,
|
|
35560
35605
|
background,
|
|
35561
|
-
spacing,
|
|
35562
35606
|
pattern,
|
|
35563
35607
|
patternOpacity,
|
|
35564
35608
|
patternClassName
|
|
35565
35609
|
}) {
|
|
35566
35610
|
const mediaItems = React30.useMemo(() => {
|
|
35567
35611
|
if (itemsSlot || !items) return [];
|
|
35568
|
-
|
|
35612
|
+
const withImage = items.filter((item) => Boolean(item.image));
|
|
35613
|
+
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production" && withImage.length < items.length) {
|
|
35614
|
+
const skipped = items.filter((item) => !item.image);
|
|
35615
|
+
const skippedIds = skipped.map((item) => item.id).join(", ");
|
|
35616
|
+
console.warn(
|
|
35617
|
+
`[instagram-post-grid] skipped ${skipped.length} item(s) without a resolvable image: ${skippedIds}`
|
|
35618
|
+
);
|
|
35619
|
+
}
|
|
35620
|
+
return withImage.map(toMediaItem);
|
|
35569
35621
|
}, [items, itemsSlot]);
|
|
35570
35622
|
if (!itemsSlot && (!items || items.length === 0)) {
|
|
35571
35623
|
return null;
|
|
@@ -35587,7 +35639,7 @@ function InstagramPostGrid({
|
|
|
35587
35639
|
"h2",
|
|
35588
35640
|
{
|
|
35589
35641
|
className: cn(
|
|
35590
|
-
"text-xl font-medium tracking-tight md:text-
|
|
35642
|
+
"text-xl font-medium tracking-tight md:text-3xl lg:text-5xl text-balance",
|
|
35591
35643
|
headingClassName
|
|
35592
35644
|
),
|
|
35593
35645
|
children: heading
|
|
@@ -35597,7 +35649,7 @@ function InstagramPostGrid({
|
|
|
35597
35649
|
"p",
|
|
35598
35650
|
{
|
|
35599
35651
|
className: cn(
|
|
35600
|
-
"max-w-2xl text-balance
|
|
35652
|
+
"max-w-full md:max-w-2xl text-balance opacity-75",
|
|
35601
35653
|
subheadingClassName
|
|
35602
35654
|
),
|
|
35603
35655
|
children: subheading
|
|
@@ -35608,7 +35660,7 @@ function InstagramPostGrid({
|
|
|
35608
35660
|
"div",
|
|
35609
35661
|
{
|
|
35610
35662
|
className: cn(
|
|
35611
|
-
"grid grid-cols-2 gap-
|
|
35663
|
+
"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",
|
|
35612
35664
|
gridClassName
|
|
35613
35665
|
),
|
|
35614
35666
|
children: itemsSlot
|
|
@@ -35621,14 +35673,16 @@ function InstagramPostGrid({
|
|
|
35621
35673
|
gridClassName,
|
|
35622
35674
|
itemClassName,
|
|
35623
35675
|
imageClassName,
|
|
35624
|
-
optixFlowConfig
|
|
35676
|
+
optixFlowConfig,
|
|
35677
|
+
showLikeBadges
|
|
35625
35678
|
}
|
|
35626
35679
|
),
|
|
35627
35680
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35628
35681
|
mediaImmersive.ImmersiveViewer,
|
|
35629
35682
|
{
|
|
35630
35683
|
ariaLabel: "Instagram post viewer",
|
|
35631
|
-
renderActions: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(InstagramViewerRail, { item })
|
|
35684
|
+
renderActions: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(InstagramViewerRail, { item }),
|
|
35685
|
+
renderCaption: (item) => /* @__PURE__ */ jsxRuntime.jsx(InstagramViewerCaption, { item, username })
|
|
35632
35686
|
}
|
|
35633
35687
|
)
|
|
35634
35688
|
] })
|
|
@@ -111512,8 +111566,8 @@ var interiorCarousel = {
|
|
|
111512
111566
|
}
|
|
111513
111567
|
};
|
|
111514
111568
|
var instagramPostGrid = {
|
|
111515
|
-
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.
|
|
111516
|
-
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')
|
|
111569
|
+
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. Tiles show no duration timestamp and a center glyph on hover only (a play triangle for reels, an expand icon for photos); like-count pills are hidden by default (opt back in via 'showLikeBadges' once per-client dynamic visibility ships). The fullscreen viewer shows a prominent clickable '@username' profile badge (set the 'username' prop) above the post title and a single Instagram-glyph egress to the post's permalink (a real anchor opening in a new tab). Data is hydrated from the toastability Instagram feed (dataSource type 'instagram_feed', bindTo 'items').",
|
|
111570
|
+
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') are carried in the data but NOT currently displayed: the tile like-count pill is hidden by default ('showLikeBadges' opts back in; never fabricate a zero for a missing metric) and the viewer's engagement rail was removed per design review. Set 'username' to the account's handle (leading '@' tolerated) \u2014 it renders as the viewer caption's prominent clickable '@username' badge linking to the profile in a new tab; when omitted the badge degrades to a non-clickable 'Instagram' chip (a handle is never fabricated). 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 single Instagram-glyph 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).`,
|
|
111517
111571
|
usageRequirements: {
|
|
111518
111572
|
requiredProps: ["items"],
|
|
111519
111573
|
requiresSiteCapabilities: galleryCapabilities(
|
|
@@ -111521,9 +111575,12 @@ var instagramPostGrid = {
|
|
|
111521
111575
|
"media_library"
|
|
111522
111576
|
),
|
|
111523
111577
|
propConstraints: {
|
|
111578
|
+
heading: { maxLength: 60 },
|
|
111524
111579
|
items: {
|
|
111525
|
-
|
|
111526
|
-
|
|
111580
|
+
required: true,
|
|
111581
|
+
minItems: 4,
|
|
111582
|
+
maxItems: 16,
|
|
111583
|
+
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)."
|
|
111527
111584
|
}
|
|
111528
111585
|
},
|
|
111529
111586
|
mediaSlots: {
|
|
@@ -111542,6 +111599,7 @@ var instagramPostGrid = {
|
|
|
111542
111599
|
exampleProps: {
|
|
111543
111600
|
heading: "Follow us on Instagram",
|
|
111544
111601
|
subheading: "The latest from our feed.",
|
|
111602
|
+
username: "acmecafe",
|
|
111545
111603
|
background: "white",
|
|
111546
111604
|
spacing: "lg",
|
|
111547
111605
|
items: [
|
|
@@ -111549,33 +111607,90 @@ var instagramPostGrid = {
|
|
|
111549
111607
|
id: "1",
|
|
111550
111608
|
href: "https://www.instagram.com/p/CxAmpLe001/",
|
|
111551
111609
|
image: GALLERY_EXAMPLE_IMAGE_URL,
|
|
111552
|
-
imageAlt: "Espresso being
|
|
111610
|
+
imageAlt: "Espresso being pulled at the counter",
|
|
111553
111611
|
caption: "Morning pours before the rush \u2615\uFE0F",
|
|
111554
|
-
date: "Jul
|
|
111555
|
-
likeCount:
|
|
111556
|
-
commentCount:
|
|
111612
|
+
date: "Jul 6, 2026",
|
|
111613
|
+
likeCount: 428,
|
|
111614
|
+
commentCount: 34
|
|
111557
111615
|
},
|
|
111558
111616
|
{
|
|
111559
111617
|
id: "2",
|
|
111560
111618
|
href: "https://www.instagram.com/p/CxAmpLe002/",
|
|
111561
|
-
image:
|
|
111562
|
-
imageAlt: "
|
|
111563
|
-
caption: "Behind the
|
|
111564
|
-
date: "
|
|
111619
|
+
image: "https://toastability-production.s3.amazonaws.com/z9u4sdrj2oq3eds0qyui0nxsus3j",
|
|
111620
|
+
imageAlt: "Line cook plating on a busy Friday service",
|
|
111621
|
+
caption: "Behind the pass on a Friday night service \u{1F525}",
|
|
111622
|
+
date: "Jul 4, 2026",
|
|
111565
111623
|
isVideo: true,
|
|
111566
|
-
videoUrl: "https://toastability-production.s3.amazonaws.com/
|
|
111567
|
-
likeCount:
|
|
111568
|
-
commentCount:
|
|
111569
|
-
viewCount:
|
|
111624
|
+
videoUrl: "https://toastability-production.s3.amazonaws.com/b555hwjt7ltr81et05v5254q1ak6",
|
|
111625
|
+
likeCount: 1203,
|
|
111626
|
+
commentCount: 88,
|
|
111627
|
+
viewCount: 12840
|
|
111570
111628
|
},
|
|
111571
111629
|
{
|
|
111572
111630
|
id: "3",
|
|
111573
111631
|
href: "https://www.instagram.com/p/CxAmpLe003/",
|
|
111632
|
+
image: "https://toastability-production.s3.amazonaws.com/63aotyt2pb4gqpccej2kkw8reson",
|
|
111633
|
+
imageAlt: "House pancakes with maple butter",
|
|
111634
|
+
caption: "Weekend brunch is back \u2014 house pancakes + maple butter",
|
|
111635
|
+
date: "Jul 2, 2026",
|
|
111636
|
+
likeCount: 356,
|
|
111637
|
+
commentCount: 27
|
|
111638
|
+
},
|
|
111639
|
+
{
|
|
111640
|
+
id: "4",
|
|
111641
|
+
href: "https://www.instagram.com/p/CxAmpLe004/",
|
|
111642
|
+
image: "https://toastability-production.s3.amazonaws.com/we9r4e711an6d0bd3dwbl9tb9z7q",
|
|
111643
|
+
imageAlt: "Barista finishing latte art",
|
|
111644
|
+
caption: "60 seconds of latte art, no cuts \u2728",
|
|
111645
|
+
date: "Jun 29, 2026",
|
|
111646
|
+
isVideo: true,
|
|
111647
|
+
videoUrl: "https://toastability-production.s3.amazonaws.com/dvz0441h9fxjhh88lzqbwdoyxv52",
|
|
111648
|
+
likeCount: 942,
|
|
111649
|
+
commentCount: 61,
|
|
111650
|
+
viewCount: 8675
|
|
111651
|
+
},
|
|
111652
|
+
{
|
|
111653
|
+
id: "5",
|
|
111654
|
+
href: "https://www.instagram.com/p/CxAmpLe005/",
|
|
111574
111655
|
image: GALLERY_EXAMPLE_IMAGE_URL,
|
|
111575
|
-
imageAlt: "
|
|
111576
|
-
caption: "
|
|
111656
|
+
imageAlt: "Fresh sourdough loaves out of the oven",
|
|
111657
|
+
caption: "Fresh sourdough out of the oven at 6am \u{1F956}",
|
|
111658
|
+
date: "Jun 27, 2026",
|
|
111659
|
+
likeCount: 512,
|
|
111660
|
+
commentCount: 41
|
|
111661
|
+
},
|
|
111662
|
+
{
|
|
111663
|
+
id: "6",
|
|
111664
|
+
href: "https://www.instagram.com/p/CxAmpLe006/",
|
|
111665
|
+
image: "https://toastability-production.s3.amazonaws.com/c4sgsy0g7o2rrjmvm9x7evxems82",
|
|
111666
|
+
imageAlt: "Chef plating a summer heirloom tomato salad",
|
|
111667
|
+
caption: "Plating the summer heirloom tomato salad \u{1F345}",
|
|
111577
111668
|
date: "Jun 24, 2026",
|
|
111578
|
-
|
|
111669
|
+
isVideo: true,
|
|
111670
|
+
videoUrl: "https://toastability-production.s3.amazonaws.com/jhjfvkmdzktacyijd9fh6acc7o2c",
|
|
111671
|
+
likeCount: 731,
|
|
111672
|
+
commentCount: 45,
|
|
111673
|
+
viewCount: 6390
|
|
111674
|
+
},
|
|
111675
|
+
{
|
|
111676
|
+
id: "7",
|
|
111677
|
+
href: "https://www.instagram.com/p/CxAmpLe007/",
|
|
111678
|
+
image: "https://toastability-production.s3.amazonaws.com/kh1p8y15v55ctp5ulobm4pd77etm",
|
|
111679
|
+
imageAlt: "Sunny patio seating with fresh flowers",
|
|
111680
|
+
caption: "Patio season is officially open \u2600\uFE0F",
|
|
111681
|
+
date: "Jun 21, 2026",
|
|
111682
|
+
likeCount: 289,
|
|
111683
|
+
commentCount: 19
|
|
111684
|
+
},
|
|
111685
|
+
{
|
|
111686
|
+
id: "8",
|
|
111687
|
+
href: "https://www.instagram.com/p/CxAmpLe008/",
|
|
111688
|
+
image: "https://toastability-production.s3.amazonaws.com/2d4k8d5shwg82276hzj2ztbj7mxq",
|
|
111689
|
+
imageAlt: "Charred corn elote on a plate",
|
|
111690
|
+
caption: "New on the menu: charred corn elote, our way \u{1F33D}",
|
|
111691
|
+
date: "Jun 18, 2026",
|
|
111692
|
+
likeCount: 634,
|
|
111693
|
+
commentCount: 52
|
|
111579
111694
|
}
|
|
111580
111695
|
]
|
|
111581
111696
|
}
|
|
@@ -124995,7 +125110,7 @@ var BLOCK_REGISTRY = {
|
|
|
124995
125110
|
"instagram-post-grid": {
|
|
124996
125111
|
id: "instagram-post-grid",
|
|
124997
125112
|
name: "Instagram Post Grid",
|
|
124998
|
-
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
|
|
125113
|
+
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 a clickable @username profile badge, the post title, and a single Instagram-glyph link to the post. Photos and reels are both first-class media; tiles use a hover-only center glyph (play for reels, expand for photos), with like-count pills hidden by default. Content is hydrated dynamically from the connected Instagram profile. Ideal for social proof sections, footers, and community pages that showcase a live Instagram presence.",
|
|
124999
125114
|
semanticTags: [
|
|
125000
125115
|
"gallery",
|
|
125001
125116
|
"instagram",
|