@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.js
CHANGED
|
@@ -35234,6 +35234,39 @@ function InteriorCarousel({
|
|
|
35234
35234
|
}
|
|
35235
35235
|
var IG_TILE_WIDTH = 320;
|
|
35236
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
|
+
// Hiding captions for now until we build in
|
|
35254
|
+
// the dynamic behavior that clients can dictate
|
|
35255
|
+
display: "none"
|
|
35256
|
+
};
|
|
35257
|
+
var CAPTION_TEXT_STYLE = {
|
|
35258
|
+
color: "#fff",
|
|
35259
|
+
fontSize: 13,
|
|
35260
|
+
lineHeight: 1.4,
|
|
35261
|
+
fontWeight: 600,
|
|
35262
|
+
letterSpacing: "0.005em",
|
|
35263
|
+
textShadow: "0 1px 2px rgba(0, 0, 0, 0.35)",
|
|
35264
|
+
display: "-webkit-box",
|
|
35265
|
+
WebkitLineClamp: 2,
|
|
35266
|
+
WebkitBoxOrient: "vertical",
|
|
35267
|
+
overflow: "hidden",
|
|
35268
|
+
height: "2.8em"
|
|
35269
|
+
};
|
|
35237
35270
|
var TITLE_MAX = 90;
|
|
35238
35271
|
function truncate(text, max = TITLE_MAX) {
|
|
35239
35272
|
const trimmed = text.trim();
|
|
@@ -35283,19 +35316,23 @@ function likeBadge(likeCount) {
|
|
|
35283
35316
|
style: {
|
|
35284
35317
|
display: "inline-flex",
|
|
35285
35318
|
alignItems: "center",
|
|
35286
|
-
gap:
|
|
35287
|
-
|
|
35319
|
+
gap: 6,
|
|
35320
|
+
// Breathing room from the tile's top-left corner (refinement #1).
|
|
35321
|
+
margin: 6,
|
|
35322
|
+
padding: "6px 11px",
|
|
35288
35323
|
borderRadius: 999,
|
|
35289
|
-
background: "rgba(8,12,24,0.
|
|
35290
|
-
backdropFilter: "blur(
|
|
35291
|
-
WebkitBackdropFilter: "blur(
|
|
35324
|
+
background: "rgba(8, 12, 24, 0.55)",
|
|
35325
|
+
backdropFilter: "blur(8px)",
|
|
35326
|
+
WebkitBackdropFilter: "blur(8px)",
|
|
35327
|
+
border: "1px solid rgba(255, 255, 255, 0.14)",
|
|
35292
35328
|
color: "#fff",
|
|
35293
|
-
fontSize:
|
|
35294
|
-
fontWeight:
|
|
35295
|
-
lineHeight: 1
|
|
35329
|
+
fontSize: 13,
|
|
35330
|
+
fontWeight: 600,
|
|
35331
|
+
lineHeight: 1,
|
|
35332
|
+
letterSpacing: "0.01em"
|
|
35296
35333
|
},
|
|
35297
35334
|
children: [
|
|
35298
|
-
/* @__PURE__ */ jsx(DynamicIcon, { name: "
|
|
35335
|
+
/* @__PURE__ */ jsx(DynamicIcon, { name: "mdi/cards-heart", size: 15, "aria-hidden": "true" }),
|
|
35299
35336
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: likeCount.toLocaleString() })
|
|
35300
35337
|
]
|
|
35301
35338
|
}
|
|
@@ -35304,66 +35341,15 @@ function likeBadge(likeCount) {
|
|
|
35304
35341
|
var VIEWER_ACTIONS = [
|
|
35305
35342
|
{
|
|
35306
35343
|
id: "open-in-instagram",
|
|
35307
|
-
icon: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/
|
|
35344
|
+
icon: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/instagram", size: 22, "aria-hidden": "true" }),
|
|
35308
35345
|
label: "Instagram",
|
|
35309
35346
|
ariaLabel: "Open in Instagram",
|
|
35310
35347
|
onPress: (item) => openPermalink(item)
|
|
35311
35348
|
}
|
|
35312
35349
|
];
|
|
35313
|
-
function RailStat({
|
|
35314
|
-
iconName,
|
|
35315
|
-
count,
|
|
35316
|
-
label,
|
|
35317
|
-
onPress
|
|
35318
|
-
}) {
|
|
35319
|
-
return /* @__PURE__ */ jsxs(
|
|
35320
|
-
"button",
|
|
35321
|
-
{
|
|
35322
|
-
type: "button",
|
|
35323
|
-
"aria-label": `${count.toLocaleString()} ${label}`,
|
|
35324
|
-
onClick: (e) => {
|
|
35325
|
-
e.stopPropagation();
|
|
35326
|
-
onPress();
|
|
35327
|
-
},
|
|
35328
|
-
style: {
|
|
35329
|
-
display: "flex",
|
|
35330
|
-
flexDirection: "column",
|
|
35331
|
-
alignItems: "center",
|
|
35332
|
-
gap: 5,
|
|
35333
|
-
padding: 0,
|
|
35334
|
-
border: "none",
|
|
35335
|
-
background: "transparent",
|
|
35336
|
-
color: "inherit",
|
|
35337
|
-
cursor: "pointer",
|
|
35338
|
-
font: "inherit"
|
|
35339
|
-
},
|
|
35340
|
-
children: [
|
|
35341
|
-
/* @__PURE__ */ jsx(
|
|
35342
|
-
"span",
|
|
35343
|
-
{
|
|
35344
|
-
style: {
|
|
35345
|
-
width: 46,
|
|
35346
|
-
height: 46,
|
|
35347
|
-
borderRadius: "50%",
|
|
35348
|
-
background: "var(--psmi-chrome-bg, rgba(255,255,255,0.14))",
|
|
35349
|
-
backdropFilter: "blur(6px)",
|
|
35350
|
-
WebkitBackdropFilter: "blur(6px)",
|
|
35351
|
-
display: "flex",
|
|
35352
|
-
alignItems: "center",
|
|
35353
|
-
justifyContent: "center"
|
|
35354
|
-
},
|
|
35355
|
-
children: /* @__PURE__ */ jsx(DynamicIcon, { name: iconName, size: 22, "aria-hidden": "true" })
|
|
35356
|
-
}
|
|
35357
|
-
),
|
|
35358
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: { fontSize: 11, fontWeight: 600 }, children: count.toLocaleString() })
|
|
35359
|
-
]
|
|
35360
|
-
}
|
|
35361
|
-
);
|
|
35362
|
-
}
|
|
35363
35350
|
function InstagramViewerRail({ item }) {
|
|
35364
35351
|
const meta = item.meta ?? {};
|
|
35365
|
-
|
|
35366
|
-
return /* @__PURE__ */ jsxs(
|
|
35352
|
+
return /* @__PURE__ */ jsx(
|
|
35367
35353
|
"div",
|
|
35368
35354
|
{
|
|
35369
35355
|
style: {
|
|
@@ -35377,84 +35363,126 @@ function InstagramViewerRail({ item }) {
|
|
|
35377
35363
|
color: "var(--psmi-chrome-fg, #fff)",
|
|
35378
35364
|
zIndex: 3
|
|
35379
35365
|
},
|
|
35366
|
+
children: meta.href ? /* @__PURE__ */ jsx(
|
|
35367
|
+
"a",
|
|
35368
|
+
{
|
|
35369
|
+
href: meta.href,
|
|
35370
|
+
target: "_blank",
|
|
35371
|
+
rel: "noopener noreferrer",
|
|
35372
|
+
"aria-label": "Open in Instagram",
|
|
35373
|
+
onClick: (e) => e.stopPropagation(),
|
|
35374
|
+
style: {
|
|
35375
|
+
display: "flex",
|
|
35376
|
+
flexDirection: "column",
|
|
35377
|
+
alignItems: "center",
|
|
35378
|
+
padding: 0,
|
|
35379
|
+
border: "none",
|
|
35380
|
+
background: "transparent",
|
|
35381
|
+
color: "inherit",
|
|
35382
|
+
cursor: "pointer",
|
|
35383
|
+
font: "inherit",
|
|
35384
|
+
textDecoration: "none"
|
|
35385
|
+
},
|
|
35386
|
+
children: /* @__PURE__ */ jsx(
|
|
35387
|
+
"span",
|
|
35388
|
+
{
|
|
35389
|
+
style: {
|
|
35390
|
+
width: 46,
|
|
35391
|
+
height: 46,
|
|
35392
|
+
borderRadius: "50%",
|
|
35393
|
+
background: "var(--psmi-chrome-bg, rgba(255,255,255,0.14))",
|
|
35394
|
+
backdropFilter: "blur(6px)",
|
|
35395
|
+
WebkitBackdropFilter: "blur(6px)",
|
|
35396
|
+
display: "flex",
|
|
35397
|
+
alignItems: "center",
|
|
35398
|
+
justifyContent: "center"
|
|
35399
|
+
},
|
|
35400
|
+
children: /* @__PURE__ */ jsx(
|
|
35401
|
+
DynamicIcon,
|
|
35402
|
+
{
|
|
35403
|
+
name: "lucide/instagram",
|
|
35404
|
+
size: 22,
|
|
35405
|
+
"aria-hidden": "true"
|
|
35406
|
+
}
|
|
35407
|
+
)
|
|
35408
|
+
}
|
|
35409
|
+
)
|
|
35410
|
+
}
|
|
35411
|
+
) : null
|
|
35412
|
+
}
|
|
35413
|
+
);
|
|
35414
|
+
}
|
|
35415
|
+
function profileUrl(username) {
|
|
35416
|
+
return `https://www.instagram.com/${username.replace(/^@+/, "")}/`;
|
|
35417
|
+
}
|
|
35418
|
+
var USERNAME_BADGE_STYLE = {
|
|
35419
|
+
display: "inline-flex",
|
|
35420
|
+
alignItems: "center",
|
|
35421
|
+
gap: 7,
|
|
35422
|
+
marginBottom: 10,
|
|
35423
|
+
padding: "7px 12px",
|
|
35424
|
+
borderRadius: 999,
|
|
35425
|
+
background: "var(--psmi-chrome-bg, rgba(255,255,255,0.16))",
|
|
35426
|
+
backdropFilter: "blur(8px)",
|
|
35427
|
+
WebkitBackdropFilter: "blur(8px)",
|
|
35428
|
+
border: "1px solid rgba(255, 255, 255, 0.18)",
|
|
35429
|
+
color: "inherit",
|
|
35430
|
+
fontSize: 13,
|
|
35431
|
+
fontWeight: 700,
|
|
35432
|
+
lineHeight: 1,
|
|
35433
|
+
letterSpacing: "0.01em",
|
|
35434
|
+
textDecoration: "none",
|
|
35435
|
+
pointerEvents: "auto"
|
|
35436
|
+
};
|
|
35437
|
+
var VIEWER_TITLE_STYLE = {
|
|
35438
|
+
fontSize: 16,
|
|
35439
|
+
fontWeight: 700,
|
|
35440
|
+
lineHeight: 1.35,
|
|
35441
|
+
textShadow: "0 1px 2px rgba(0, 0, 0, 0.4)",
|
|
35442
|
+
display: "-webkit-box",
|
|
35443
|
+
WebkitLineClamp: 2,
|
|
35444
|
+
WebkitBoxOrient: "vertical",
|
|
35445
|
+
overflow: "hidden"
|
|
35446
|
+
};
|
|
35447
|
+
function InstagramViewerCaption({
|
|
35448
|
+
item,
|
|
35449
|
+
username
|
|
35450
|
+
}) {
|
|
35451
|
+
const handle = username?.replace(/^@+/, "");
|
|
35452
|
+
const badgeContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35453
|
+
/* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/instagram", size: 14, "aria-hidden": "true" }),
|
|
35454
|
+
/* @__PURE__ */ jsx("span", { children: handle ? `@${handle}` : "Instagram" })
|
|
35455
|
+
] });
|
|
35456
|
+
return /* @__PURE__ */ jsxs(
|
|
35457
|
+
"div",
|
|
35458
|
+
{
|
|
35459
|
+
style: {
|
|
35460
|
+
position: "absolute",
|
|
35461
|
+
left: 16,
|
|
35462
|
+
// Mirrors the library caption card's clearance for the actions rail.
|
|
35463
|
+
right: 78,
|
|
35464
|
+
bottom: 34,
|
|
35465
|
+
color: "var(--psmi-chrome-fg, #fff)",
|
|
35466
|
+
zIndex: 2
|
|
35467
|
+
},
|
|
35380
35468
|
children: [
|
|
35381
|
-
|
|
35382
|
-
RailStat,
|
|
35383
|
-
{
|
|
35384
|
-
iconName: "lucide/heart",
|
|
35385
|
-
count: meta.likeCount,
|
|
35386
|
-
label: "likes",
|
|
35387
|
-
onPress: open
|
|
35388
|
-
}
|
|
35389
|
-
) : null,
|
|
35390
|
-
typeof meta.commentCount === "number" ? /* @__PURE__ */ jsx(
|
|
35391
|
-
RailStat,
|
|
35392
|
-
{
|
|
35393
|
-
iconName: "lucide/message-circle",
|
|
35394
|
-
count: meta.commentCount,
|
|
35395
|
-
label: "comments",
|
|
35396
|
-
onPress: open
|
|
35397
|
-
}
|
|
35398
|
-
) : null,
|
|
35399
|
-
typeof meta.viewCount === "number" ? /* @__PURE__ */ jsx(
|
|
35400
|
-
RailStat,
|
|
35401
|
-
{
|
|
35402
|
-
iconName: "lucide/eye",
|
|
35403
|
-
count: meta.viewCount,
|
|
35404
|
-
label: "views",
|
|
35405
|
-
onPress: open
|
|
35406
|
-
}
|
|
35407
|
-
) : null,
|
|
35408
|
-
meta.href ? /* @__PURE__ */ jsxs(
|
|
35469
|
+
handle ? /* @__PURE__ */ jsx(
|
|
35409
35470
|
"a",
|
|
35410
35471
|
{
|
|
35411
|
-
href:
|
|
35472
|
+
href: profileUrl(handle),
|
|
35412
35473
|
target: "_blank",
|
|
35413
35474
|
rel: "noopener noreferrer",
|
|
35414
|
-
"aria-label":
|
|
35475
|
+
"aria-label": `Open @${handle} on Instagram`,
|
|
35415
35476
|
onClick: (e) => e.stopPropagation(),
|
|
35416
|
-
style: {
|
|
35417
|
-
|
|
35418
|
-
flexDirection: "column",
|
|
35419
|
-
alignItems: "center",
|
|
35420
|
-
gap: 5,
|
|
35421
|
-
padding: 0,
|
|
35422
|
-
border: "none",
|
|
35423
|
-
background: "transparent",
|
|
35424
|
-
color: "inherit",
|
|
35425
|
-
cursor: "pointer",
|
|
35426
|
-
font: "inherit",
|
|
35427
|
-
textDecoration: "none"
|
|
35428
|
-
},
|
|
35429
|
-
children: [
|
|
35430
|
-
/* @__PURE__ */ jsx(
|
|
35431
|
-
"span",
|
|
35432
|
-
{
|
|
35433
|
-
style: {
|
|
35434
|
-
width: 46,
|
|
35435
|
-
height: 46,
|
|
35436
|
-
borderRadius: "50%",
|
|
35437
|
-
background: "var(--psmi-chrome-bg, rgba(255,255,255,0.14))",
|
|
35438
|
-
backdropFilter: "blur(6px)",
|
|
35439
|
-
WebkitBackdropFilter: "blur(6px)",
|
|
35440
|
-
display: "flex",
|
|
35441
|
-
alignItems: "center",
|
|
35442
|
-
justifyContent: "center"
|
|
35443
|
-
},
|
|
35444
|
-
children: /* @__PURE__ */ jsx(
|
|
35445
|
-
DynamicIcon,
|
|
35446
|
-
{
|
|
35447
|
-
name: "lucide/external-link",
|
|
35448
|
-
size: 22,
|
|
35449
|
-
"aria-hidden": "true"
|
|
35450
|
-
}
|
|
35451
|
-
)
|
|
35452
|
-
}
|
|
35453
|
-
),
|
|
35454
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: { fontSize: 11, fontWeight: 600 }, children: "Instagram" })
|
|
35455
|
-
]
|
|
35477
|
+
style: { ...USERNAME_BADGE_STYLE, cursor: "pointer" },
|
|
35478
|
+
children: badgeContent
|
|
35456
35479
|
}
|
|
35457
|
-
) :
|
|
35480
|
+
) : (
|
|
35481
|
+
// No username supplied: never fabricate a handle — degrade to a
|
|
35482
|
+
// non-interactive "Instagram" chip in the same position.
|
|
35483
|
+
/* @__PURE__ */ jsx("span", { style: USERNAME_BADGE_STYLE, children: badgeContent })
|
|
35484
|
+
),
|
|
35485
|
+
/* @__PURE__ */ jsx("div", { style: VIEWER_TITLE_STYLE, children: item.title })
|
|
35458
35486
|
]
|
|
35459
35487
|
}
|
|
35460
35488
|
);
|
|
@@ -35464,7 +35492,8 @@ function InstagramFeedGrid({
|
|
|
35464
35492
|
gridClassName,
|
|
35465
35493
|
itemClassName,
|
|
35466
35494
|
imageClassName,
|
|
35467
|
-
optixFlowConfig
|
|
35495
|
+
optixFlowConfig,
|
|
35496
|
+
showLikeBadges = false
|
|
35468
35497
|
}) {
|
|
35469
35498
|
const { open } = useImmersiveFeed();
|
|
35470
35499
|
const posterImgProps = useMemo(() => {
|
|
@@ -35477,26 +35506,39 @@ function InstagramFeedGrid({
|
|
|
35477
35506
|
"div",
|
|
35478
35507
|
{
|
|
35479
35508
|
className: cn(
|
|
35480
|
-
"grid grid-cols-2 gap-
|
|
35509
|
+
"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",
|
|
35481
35510
|
gridClassName
|
|
35482
35511
|
),
|
|
35483
35512
|
children: mediaItems.map((mediaItem) => {
|
|
35484
35513
|
const likeCount = mediaItem.meta?.likeCount;
|
|
35485
|
-
return
|
|
35486
|
-
|
|
35487
|
-
|
|
35488
|
-
|
|
35489
|
-
|
|
35490
|
-
|
|
35491
|
-
|
|
35492
|
-
|
|
35493
|
-
|
|
35494
|
-
|
|
35495
|
-
|
|
35496
|
-
|
|
35497
|
-
|
|
35498
|
-
|
|
35499
|
-
|
|
35514
|
+
return (
|
|
35515
|
+
// The wrapper owns the tile's outer chrome (subtle boundary shadow,
|
|
35516
|
+
// matching radius) and the block's own caption overlay — the card's
|
|
35517
|
+
// built-in caption is hidden so 1- and 2-line captions can share a
|
|
35518
|
+
// fixed-height, top-aligned text box (annotated refinements #2–#4).
|
|
35519
|
+
/* @__PURE__ */ jsxs("div", { className: itemClassName, style: TILE_WRAPPER_STYLE, children: [
|
|
35520
|
+
/* @__PURE__ */ jsx(
|
|
35521
|
+
ThumbnailCard,
|
|
35522
|
+
{
|
|
35523
|
+
item: mediaItem,
|
|
35524
|
+
onOpen: open,
|
|
35525
|
+
size: IG_TILE_WIDTH,
|
|
35526
|
+
style: IG_TILE_STYLE,
|
|
35527
|
+
elevated: false,
|
|
35528
|
+
hideCaption: true,
|
|
35529
|
+
hideProgressHint: true,
|
|
35530
|
+
showDuration: false,
|
|
35531
|
+
glyphMode: "hover",
|
|
35532
|
+
posterImgProps,
|
|
35533
|
+
badgeSlot: showLikeBadges && typeof likeCount === "number" ? likeBadge(likeCount) : void 0
|
|
35534
|
+
}
|
|
35535
|
+
),
|
|
35536
|
+
mediaItem.title ? (
|
|
35537
|
+
// aria-hidden: the card already announces the post title; this
|
|
35538
|
+
// overlay is purely visual. pointer-events pass through to the card.
|
|
35539
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: CAPTION_SCRIM_STYLE, children: /* @__PURE__ */ jsx("div", { style: CAPTION_TEXT_STYLE, children: mediaItem.title }) })
|
|
35540
|
+
) : null
|
|
35541
|
+
] }, mediaItem.id)
|
|
35500
35542
|
);
|
|
35501
35543
|
})
|
|
35502
35544
|
}
|
|
@@ -35509,7 +35551,8 @@ function InstagramPostGrid({
|
|
|
35509
35551
|
items,
|
|
35510
35552
|
itemsSlot,
|
|
35511
35553
|
className,
|
|
35512
|
-
containerClassName,
|
|
35554
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
35555
|
+
spacing = "py-12 md:py-32",
|
|
35513
35556
|
headerClassName,
|
|
35514
35557
|
headingClassName,
|
|
35515
35558
|
subheadingClassName,
|
|
@@ -35517,15 +35560,24 @@ function InstagramPostGrid({
|
|
|
35517
35560
|
itemClassName,
|
|
35518
35561
|
imageClassName,
|
|
35519
35562
|
optixFlowConfig,
|
|
35563
|
+
username,
|
|
35564
|
+
showLikeBadges = false,
|
|
35520
35565
|
background,
|
|
35521
|
-
spacing,
|
|
35522
35566
|
pattern,
|
|
35523
35567
|
patternOpacity,
|
|
35524
35568
|
patternClassName
|
|
35525
35569
|
}) {
|
|
35526
35570
|
const mediaItems = useMemo(() => {
|
|
35527
35571
|
if (itemsSlot || !items) return [];
|
|
35528
|
-
|
|
35572
|
+
const withImage = items.filter((item) => Boolean(item.image));
|
|
35573
|
+
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production" && withImage.length < items.length) {
|
|
35574
|
+
const skipped = items.filter((item) => !item.image);
|
|
35575
|
+
const skippedIds = skipped.map((item) => item.id).join(", ");
|
|
35576
|
+
console.warn(
|
|
35577
|
+
`[instagram-post-grid] skipped ${skipped.length} item(s) without a resolvable image: ${skippedIds}`
|
|
35578
|
+
);
|
|
35579
|
+
}
|
|
35580
|
+
return withImage.map(toMediaItem);
|
|
35529
35581
|
}, [items, itemsSlot]);
|
|
35530
35582
|
if (!itemsSlot && (!items || items.length === 0)) {
|
|
35531
35583
|
return null;
|
|
@@ -35547,7 +35599,7 @@ function InstagramPostGrid({
|
|
|
35547
35599
|
"h2",
|
|
35548
35600
|
{
|
|
35549
35601
|
className: cn(
|
|
35550
|
-
"text-xl font-medium tracking-tight md:text-
|
|
35602
|
+
"text-xl font-medium tracking-tight md:text-3xl lg:text-5xl text-balance",
|
|
35551
35603
|
headingClassName
|
|
35552
35604
|
),
|
|
35553
35605
|
children: heading
|
|
@@ -35557,7 +35609,7 @@ function InstagramPostGrid({
|
|
|
35557
35609
|
"p",
|
|
35558
35610
|
{
|
|
35559
35611
|
className: cn(
|
|
35560
|
-
"max-w-2xl text-balance
|
|
35612
|
+
"max-w-full md:max-w-2xl text-balance opacity-75",
|
|
35561
35613
|
subheadingClassName
|
|
35562
35614
|
),
|
|
35563
35615
|
children: subheading
|
|
@@ -35568,7 +35620,7 @@ function InstagramPostGrid({
|
|
|
35568
35620
|
"div",
|
|
35569
35621
|
{
|
|
35570
35622
|
className: cn(
|
|
35571
|
-
"grid grid-cols-2 gap-
|
|
35623
|
+
"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",
|
|
35572
35624
|
gridClassName
|
|
35573
35625
|
),
|
|
35574
35626
|
children: itemsSlot
|
|
@@ -35581,14 +35633,16 @@ function InstagramPostGrid({
|
|
|
35581
35633
|
gridClassName,
|
|
35582
35634
|
itemClassName,
|
|
35583
35635
|
imageClassName,
|
|
35584
|
-
optixFlowConfig
|
|
35636
|
+
optixFlowConfig,
|
|
35637
|
+
showLikeBadges
|
|
35585
35638
|
}
|
|
35586
35639
|
),
|
|
35587
35640
|
/* @__PURE__ */ jsx(
|
|
35588
35641
|
ImmersiveViewer,
|
|
35589
35642
|
{
|
|
35590
35643
|
ariaLabel: "Instagram post viewer",
|
|
35591
|
-
renderActions: ({ item }) => /* @__PURE__ */ jsx(InstagramViewerRail, { item })
|
|
35644
|
+
renderActions: ({ item }) => /* @__PURE__ */ jsx(InstagramViewerRail, { item }),
|
|
35645
|
+
renderCaption: (item) => /* @__PURE__ */ jsx(InstagramViewerCaption, { item, username })
|
|
35592
35646
|
}
|
|
35593
35647
|
)
|
|
35594
35648
|
] })
|
|
@@ -111472,8 +111526,8 @@ var interiorCarousel = {
|
|
|
111472
111526
|
}
|
|
111473
111527
|
};
|
|
111474
111528
|
var instagramPostGrid = {
|
|
111475
|
-
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.
|
|
111476
|
-
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')
|
|
111529
|
+
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').",
|
|
111530
|
+
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).`,
|
|
111477
111531
|
usageRequirements: {
|
|
111478
111532
|
requiredProps: ["items"],
|
|
111479
111533
|
requiresSiteCapabilities: galleryCapabilities(
|
|
@@ -111481,9 +111535,12 @@ var instagramPostGrid = {
|
|
|
111481
111535
|
"media_library"
|
|
111482
111536
|
),
|
|
111483
111537
|
propConstraints: {
|
|
111538
|
+
heading: { maxLength: 60 },
|
|
111484
111539
|
items: {
|
|
111485
|
-
|
|
111486
|
-
|
|
111540
|
+
required: true,
|
|
111541
|
+
minItems: 4,
|
|
111542
|
+
maxItems: 16,
|
|
111543
|
+
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)."
|
|
111487
111544
|
}
|
|
111488
111545
|
},
|
|
111489
111546
|
mediaSlots: {
|
|
@@ -111502,6 +111559,7 @@ var instagramPostGrid = {
|
|
|
111502
111559
|
exampleProps: {
|
|
111503
111560
|
heading: "Follow us on Instagram",
|
|
111504
111561
|
subheading: "The latest from our feed.",
|
|
111562
|
+
username: "acmecafe",
|
|
111505
111563
|
background: "white",
|
|
111506
111564
|
spacing: "lg",
|
|
111507
111565
|
items: [
|
|
@@ -111509,33 +111567,90 @@ var instagramPostGrid = {
|
|
|
111509
111567
|
id: "1",
|
|
111510
111568
|
href: "https://www.instagram.com/p/CxAmpLe001/",
|
|
111511
111569
|
image: GALLERY_EXAMPLE_IMAGE_URL,
|
|
111512
|
-
imageAlt: "Espresso being
|
|
111570
|
+
imageAlt: "Espresso being pulled at the counter",
|
|
111513
111571
|
caption: "Morning pours before the rush \u2615\uFE0F",
|
|
111514
|
-
date: "Jul
|
|
111515
|
-
likeCount:
|
|
111516
|
-
commentCount:
|
|
111572
|
+
date: "Jul 6, 2026",
|
|
111573
|
+
likeCount: 428,
|
|
111574
|
+
commentCount: 34
|
|
111517
111575
|
},
|
|
111518
111576
|
{
|
|
111519
111577
|
id: "2",
|
|
111520
111578
|
href: "https://www.instagram.com/p/CxAmpLe002/",
|
|
111521
|
-
image:
|
|
111522
|
-
imageAlt: "
|
|
111523
|
-
caption: "Behind the
|
|
111524
|
-
date: "
|
|
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",
|
|
111525
111583
|
isVideo: true,
|
|
111526
|
-
videoUrl: "https://toastability-production.s3.amazonaws.com/
|
|
111527
|
-
likeCount:
|
|
111528
|
-
commentCount:
|
|
111529
|
-
viewCount:
|
|
111584
|
+
videoUrl: "https://toastability-production.s3.amazonaws.com/b555hwjt7ltr81et05v5254q1ak6",
|
|
111585
|
+
likeCount: 1203,
|
|
111586
|
+
commentCount: 88,
|
|
111587
|
+
viewCount: 12840
|
|
111530
111588
|
},
|
|
111531
111589
|
{
|
|
111532
111590
|
id: "3",
|
|
111533
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/",
|
|
111534
111615
|
image: GALLERY_EXAMPLE_IMAGE_URL,
|
|
111535
|
-
imageAlt: "
|
|
111536
|
-
caption: "
|
|
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}",
|
|
111537
111628
|
date: "Jun 24, 2026",
|
|
111538
|
-
|
|
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
|
|
111539
111654
|
}
|
|
111540
111655
|
]
|
|
111541
111656
|
}
|
|
@@ -124955,7 +125070,7 @@ var BLOCK_REGISTRY = {
|
|
|
124955
125070
|
"instagram-post-grid": {
|
|
124956
125071
|
id: "instagram-post-grid",
|
|
124957
125072
|
name: "Instagram Post Grid",
|
|
124958
|
-
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
|
|
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 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.",
|
|
124959
125074
|
semanticTags: [
|
|
124960
125075
|
"gallery",
|
|
124961
125076
|
"instagram",
|