@opensite/ui 3.8.2 → 3.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/registry.cjs CHANGED
@@ -35271,6 +35271,193 @@ function InteriorCarousel({
35271
35271
  }
35272
35272
  );
35273
35273
  }
35274
+ function EngagementBadge({
35275
+ iconName,
35276
+ count,
35277
+ label
35278
+ }) {
35279
+ return /* @__PURE__ */ jsxRuntime.jsxs(
35280
+ "span",
35281
+ {
35282
+ className: "inline-flex items-center gap-1",
35283
+ "aria-label": `${count.toLocaleString()} ${label}`,
35284
+ children: [
35285
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: iconName, size: 16, "aria-hidden": "true" }),
35286
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: count.toLocaleString() })
35287
+ ]
35288
+ }
35289
+ );
35290
+ }
35291
+ function InstagramPostGrid({
35292
+ sectionId = "instagram-post-grid",
35293
+ heading,
35294
+ subheading,
35295
+ items,
35296
+ itemsSlot,
35297
+ className,
35298
+ containerClassName,
35299
+ headerClassName,
35300
+ headingClassName,
35301
+ subheadingClassName,
35302
+ gridClassName,
35303
+ itemClassName,
35304
+ imageClassName,
35305
+ background,
35306
+ spacing,
35307
+ pattern,
35308
+ patternOpacity,
35309
+ patternClassName,
35310
+ optixFlowConfig
35311
+ }) {
35312
+ const tiles = React30.useMemo(() => {
35313
+ if (itemsSlot) return itemsSlot;
35314
+ if (!items || items.length === 0) return null;
35315
+ const visibleItems = items.filter((item) => Boolean(item.image));
35316
+ return visibleItems.map((item) => {
35317
+ const altText = item.imageAlt || (typeof item.caption === "string" ? item.caption : "") || "Instagram post";
35318
+ const showVideo = Boolean(item.isVideo && item.videoUrl);
35319
+ return /* @__PURE__ */ jsxRuntime.jsxs(
35320
+ pressable.Pressable,
35321
+ {
35322
+ href: item.href,
35323
+ "aria-label": typeof item.caption === "string" && item.caption.length > 0 ? item.caption : "View Instagram post",
35324
+ className: cn(
35325
+ "group relative block aspect-square overflow-hidden rounded-md bg-muted",
35326
+ item.className,
35327
+ itemClassName
35328
+ ),
35329
+ children: [
35330
+ /* @__PURE__ */ jsxRuntime.jsx(
35331
+ img$1.Img,
35332
+ {
35333
+ src: item.image,
35334
+ alt: altText,
35335
+ loading: "lazy",
35336
+ className: cn(
35337
+ "h-full w-full object-cover object-center transition-transform duration-300 group-hover:scale-105 motion-reduce:transform-none motion-reduce:transition-none",
35338
+ imageClassName
35339
+ ),
35340
+ optixFlowConfig
35341
+ }
35342
+ ),
35343
+ showVideo && /* @__PURE__ */ jsxRuntime.jsx(
35344
+ video.Video,
35345
+ {
35346
+ src: item.videoUrl,
35347
+ poster: item.image,
35348
+ controls: false,
35349
+ muted: true,
35350
+ loop: true,
35351
+ playsInline: true,
35352
+ preload: "metadata",
35353
+ onMouseEnter: (e) => {
35354
+ void e.currentTarget.play().catch(() => void 0);
35355
+ },
35356
+ onMouseLeave: (e) => {
35357
+ e.currentTarget.pause();
35358
+ e.currentTarget.currentTime = 0;
35359
+ },
35360
+ className: cn(
35361
+ "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",
35362
+ imageClassName
35363
+ )
35364
+ }
35365
+ ),
35366
+ item.isVideo && /* @__PURE__ */ jsxRuntime.jsx(
35367
+ "span",
35368
+ {
35369
+ className: "absolute right-2 top-2 text-white drop-shadow-md",
35370
+ "aria-hidden": "true",
35371
+ children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/play", size: 18 })
35372
+ }
35373
+ ),
35374
+ (item.caption || item.date || typeof item.likeCount === "number" || typeof item.commentCount === "number" || typeof item.viewCount === "number") && /* @__PURE__ */ jsxRuntime.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: [
35375
+ item.caption && (typeof item.caption === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-2 text-xs leading-snug wrap-break-word", children: item.caption }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "line-clamp-2 text-xs leading-snug", children: item.caption })),
35376
+ (typeof item.likeCount === "number" || typeof item.commentCount === "number" || typeof item.viewCount === "number" || item.date) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-xs font-medium", children: [
35377
+ typeof item.likeCount === "number" && /* @__PURE__ */ jsxRuntime.jsx(
35378
+ EngagementBadge,
35379
+ {
35380
+ iconName: "lucide/heart",
35381
+ count: item.likeCount,
35382
+ label: "likes"
35383
+ }
35384
+ ),
35385
+ typeof item.commentCount === "number" && /* @__PURE__ */ jsxRuntime.jsx(
35386
+ EngagementBadge,
35387
+ {
35388
+ iconName: "lucide/message-circle",
35389
+ count: item.commentCount,
35390
+ label: "comments"
35391
+ }
35392
+ ),
35393
+ typeof item.viewCount === "number" && /* @__PURE__ */ jsxRuntime.jsx(
35394
+ EngagementBadge,
35395
+ {
35396
+ iconName: "lucide/eye",
35397
+ count: item.viewCount,
35398
+ label: "views"
35399
+ }
35400
+ ),
35401
+ item.date && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto opacity-80", children: item.date })
35402
+ ] })
35403
+ ] })
35404
+ ]
35405
+ },
35406
+ item.id
35407
+ );
35408
+ });
35409
+ }, [itemsSlot, items, itemClassName, imageClassName, optixFlowConfig]);
35410
+ if (!itemsSlot && (!items || items.length === 0)) {
35411
+ return null;
35412
+ }
35413
+ return /* @__PURE__ */ jsxRuntime.jsxs(
35414
+ Section,
35415
+ {
35416
+ id: sectionId,
35417
+ background,
35418
+ spacing,
35419
+ pattern,
35420
+ patternOpacity,
35421
+ patternClassName,
35422
+ className,
35423
+ containerClassName,
35424
+ children: [
35425
+ (heading || subheading) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-8 flex flex-col gap-2", headerClassName), children: [
35426
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
35427
+ "h2",
35428
+ {
35429
+ className: cn(
35430
+ "text-xl font-medium tracking-tight md:text-2xl lg:text-3xl text-balance",
35431
+ headingClassName
35432
+ ),
35433
+ children: heading
35434
+ }
35435
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
35436
+ subheading && (typeof subheading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
35437
+ "p",
35438
+ {
35439
+ className: cn(
35440
+ "max-w-2xl text-balance text-muted-foreground",
35441
+ subheadingClassName
35442
+ ),
35443
+ children: subheading
35444
+ }
35445
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: subheadingClassName, children: subheading }))
35446
+ ] }),
35447
+ /* @__PURE__ */ jsxRuntime.jsx(
35448
+ "div",
35449
+ {
35450
+ className: cn(
35451
+ "grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4",
35452
+ gridClassName
35453
+ ),
35454
+ children: tiles
35455
+ }
35456
+ )
35457
+ ]
35458
+ }
35459
+ );
35460
+ }
35274
35461
  function RadialGradientTop({
35275
35462
  className,
35276
35463
  children,
@@ -111146,6 +111333,75 @@ var interiorCarousel = {
111146
111333
  ]
111147
111334
  }
111148
111335
  };
111336
+ var instagramPostGrid = {
111337
+ 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').",
111338
+ 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).`,
111339
+ usageRequirements: {
111340
+ requiredProps: ["items"],
111341
+ requiresSiteCapabilities: galleryCapabilities(
111342
+ "instagram_media",
111343
+ "media_library"
111344
+ ),
111345
+ propConstraints: {
111346
+ items: {
111347
+ minItems: 3,
111348
+ maxItems: 24
111349
+ }
111350
+ },
111351
+ mediaSlots: {
111352
+ "items[].image": {
111353
+ path: "items[].image",
111354
+ roles: ["gallery"],
111355
+ required: true
111356
+ },
111357
+ "items[].videoUrl": {
111358
+ path: "items[].videoUrl",
111359
+ roles: ["gallery"],
111360
+ required: false
111361
+ }
111362
+ }
111363
+ },
111364
+ exampleProps: {
111365
+ heading: "Follow us on Instagram",
111366
+ subheading: "The latest from our feed.",
111367
+ background: "white",
111368
+ spacing: "lg",
111369
+ items: [
111370
+ {
111371
+ id: "1",
111372
+ href: "https://www.instagram.com/p/CxAmpLe001/",
111373
+ image: GALLERY_EXAMPLE_IMAGE_URL,
111374
+ imageAlt: "Espresso being poured at the counter",
111375
+ caption: "Morning pours before the rush \u2615\uFE0F",
111376
+ date: "Jul 1, 2026",
111377
+ likeCount: 128,
111378
+ commentCount: 12
111379
+ },
111380
+ {
111381
+ id: "2",
111382
+ href: "https://www.instagram.com/p/CxAmpLe002/",
111383
+ image: GALLERY_EXAMPLE_IMAGE_URL,
111384
+ imageAlt: "Behind the scenes reel",
111385
+ caption: "Behind the scenes of today's bake #freshbread",
111386
+ date: "Jun 28, 2026",
111387
+ isVideo: true,
111388
+ videoUrl: "https://toastability-production.s3.amazonaws.com/4kox2ux0ye1wlqkdwg03s08a67i1",
111389
+ likeCount: 342,
111390
+ commentCount: 21,
111391
+ viewCount: 4820
111392
+ },
111393
+ {
111394
+ id: "3",
111395
+ href: "https://www.instagram.com/p/CxAmpLe003/",
111396
+ image: GALLERY_EXAMPLE_IMAGE_URL,
111397
+ imageAlt: "Weekend brunch spread",
111398
+ caption: "Weekend brunch is back on the menu",
111399
+ date: "Jun 24, 2026",
111400
+ likeCount: 96
111401
+ }
111402
+ ]
111403
+ }
111404
+ };
111149
111405
  var GALLERY_BLOCK_CONTRACTS = {
111150
111406
  "expandable-case-study-cards": expandableCaseStudyCards,
111151
111407
  "carousel-badge-cards": carouselBadgeCards,
@@ -111162,7 +111418,8 @@ var GALLERY_BLOCK_CONTRACTS = {
111162
111418
  "carousel-scale-focus": carouselScaleFocus,
111163
111419
  "masonry-motion-grid": masonryMotionGrid,
111164
111420
  "blur-vignette-grid": blurVignetteGrid,
111165
- "interior-carousel": interiorCarousel
111421
+ "interior-carousel": interiorCarousel,
111422
+ "instagram-post-grid": instagramPostGrid
111166
111423
  };
111167
111424
  var FOOTER_EXAMPLE_IMAGE_URL = "https://cdn.ing/assets/i/r/308196/g6bbn73f7gxal82uu49m9prfd0u8/workplace-in-cafe.webp";
111168
111425
  var FOOTER_MEDIA_NOTE = "All media src values must be absolute URLs to real assets; relative paths and placeholder media variables are not allowed.";
@@ -124557,6 +124814,26 @@ var BLOCK_REGISTRY = {
124557
124814
  props: "InteriorCarouselProps",
124558
124815
  ...GALLERY_BLOCK_CONTRACTS["interior-carousel"]
124559
124816
  },
124817
+ "instagram-post-grid": {
124818
+ id: "instagram-post-grid",
124819
+ name: "Instagram Post Grid",
124820
+ 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.",
124821
+ semanticTags: [
124822
+ "gallery",
124823
+ "instagram",
124824
+ "social",
124825
+ "feed",
124826
+ "grid",
124827
+ "photos",
124828
+ "video",
124829
+ "dynamic",
124830
+ "community"
124831
+ ],
124832
+ category: "gallery",
124833
+ component: InstagramPostGrid,
124834
+ props: "InstagramPostGridProps",
124835
+ ...GALLERY_BLOCK_CONTRACTS["instagram-post-grid"]
124836
+ },
124560
124837
  "radial-gradient-top": {
124561
124838
  id: "radial-gradient-top",
124562
124839
  name: "Radial Gradient Top",
@@ -135214,7 +135491,51 @@ function createBuilderContractBundle({
135214
135491
  hydrationPhase: "routing-build",
135215
135492
  canonicalPayloadExpectation: "Keep blog feed requests symbolic in canonical page JSON until routing-build hydration resolves them.",
135216
135493
  requiredFields: ["type"],
135217
- optionalFields: ["limit", "offset", "category", "tag", "featuredOnly"]
135494
+ optionalFields: [
135495
+ "limit",
135496
+ "offset",
135497
+ "category",
135498
+ "tag",
135499
+ "featuredOnly",
135500
+ "bindTo"
135501
+ ]
135502
+ },
135503
+ blog_post: {
135504
+ sourceType: "blog_post",
135505
+ symbolic: true,
135506
+ hydrationOwner: "dashtrack-ai",
135507
+ hydrationPhase: "routing-build",
135508
+ canonicalPayloadExpectation: "Keep blog post requests symbolic in canonical page JSON until routing-build hydration resolves them.",
135509
+ requiredFields: ["type"],
135510
+ optionalFields: ["slug", "current", "bindTo"]
135511
+ },
135512
+ testimonials_feed: {
135513
+ sourceType: "testimonials_feed",
135514
+ symbolic: true,
135515
+ hydrationOwner: "dashtrack-ai",
135516
+ hydrationPhase: "routing-build",
135517
+ canonicalPayloadExpectation: "Keep testimonials feed requests symbolic in canonical page JSON until routing-build hydration resolves them.",
135518
+ requiredFields: ["type"],
135519
+ optionalFields: ["limit", "minRating", "platforms", "locationId", "bindTo"]
135520
+ },
135521
+ instagram_feed: {
135522
+ sourceType: "instagram_feed",
135523
+ symbolic: true,
135524
+ hydrationOwner: "dashtrack-ai",
135525
+ hydrationPhase: "routing-build",
135526
+ canonicalPayloadExpectation: "Keep Instagram feed requests symbolic in canonical page JSON until routing-build hydration resolves them.",
135527
+ requiredFields: ["type"],
135528
+ optionalFields: ["limit", "profile", "hashtag", "bindTo"]
135529
+ },
135530
+ events_feed: {
135531
+ sourceType: "events_feed",
135532
+ symbolic: true,
135533
+ hydrationOwner: "dashtrack-ai",
135534
+ hydrationPhase: "routing-build",
135535
+ canonicalPayloadExpectation: "Keep events feed requests symbolic in canonical page JSON until routing-build hydration resolves them.",
135536
+ requiredFields: ["type"],
135537
+ optionalFields: ["limit", "upcomingOnly", "locationIds", "bindTo"],
135538
+ expands: true
135218
135539
  }
135219
135540
  },
135220
135541
  designTokens: {
@@ -72,7 +72,7 @@ interface BlockPropConstraint {
72
72
  * suitable. Consumers (e.g. Octane) gate block selection on these BEFORE the
73
73
  * block is offered to the model, so it cannot fabricate the missing input.
74
74
  */
75
- type SiteCapability = "reviews_or_testimonials" | "pricing" | "pricing_data" | "team_members" | "blog_posts" | "portfolio_items" | "case_studies" | "locations" | "events" | "products" | "services" | "stats_or_metrics" | "metrics_or_stats" | "product_catalog" | "media_library" | "contact_form" | "video_assets" | "contact_info";
75
+ type SiteCapability = "reviews_or_testimonials" | "pricing" | "pricing_data" | "team_members" | "blog_posts" | "portfolio_items" | "case_studies" | "locations" | "events" | "products" | "services" | "stats_or_metrics" | "metrics_or_stats" | "product_catalog" | "media_library" | "contact_form" | "video_assets" | "contact_info" | "instagram_media";
76
76
  /**
77
77
  * Structured usage requirements for a block. This is the executable
78
78
  * complement to `importantUsageNotes` (which remains for human-readable
@@ -234,9 +234,19 @@ interface BuilderContractDynamicSourceDefinition {
234
234
  canonicalPayloadExpectation: string;
235
235
  requiredFields: string[];
236
236
  optionalFields: string[];
237
+ /**
238
+ * When true, hydration may fan a single symbolic block out into N concrete
239
+ * block instances (one-to-many expansion, contract D6). Absent for the
240
+ * one-to-one sources.
241
+ */
242
+ expands?: boolean;
237
243
  }
238
244
  interface BuilderContractDynamicSources {
239
245
  blog_feed: BuilderContractDynamicSourceDefinition;
246
+ blog_post: BuilderContractDynamicSourceDefinition;
247
+ testimonials_feed: BuilderContractDynamicSourceDefinition;
248
+ instagram_feed: BuilderContractDynamicSourceDefinition;
249
+ events_feed: BuilderContractDynamicSourceDefinition;
240
250
  }
241
251
  interface BuilderContractDesignTokens {
242
252
  canonicalSource: "theme_config";
@@ -72,7 +72,7 @@ interface BlockPropConstraint {
72
72
  * suitable. Consumers (e.g. Octane) gate block selection on these BEFORE the
73
73
  * block is offered to the model, so it cannot fabricate the missing input.
74
74
  */
75
- type SiteCapability = "reviews_or_testimonials" | "pricing" | "pricing_data" | "team_members" | "blog_posts" | "portfolio_items" | "case_studies" | "locations" | "events" | "products" | "services" | "stats_or_metrics" | "metrics_or_stats" | "product_catalog" | "media_library" | "contact_form" | "video_assets" | "contact_info";
75
+ type SiteCapability = "reviews_or_testimonials" | "pricing" | "pricing_data" | "team_members" | "blog_posts" | "portfolio_items" | "case_studies" | "locations" | "events" | "products" | "services" | "stats_or_metrics" | "metrics_or_stats" | "product_catalog" | "media_library" | "contact_form" | "video_assets" | "contact_info" | "instagram_media";
76
76
  /**
77
77
  * Structured usage requirements for a block. This is the executable
78
78
  * complement to `importantUsageNotes` (which remains for human-readable
@@ -234,9 +234,19 @@ interface BuilderContractDynamicSourceDefinition {
234
234
  canonicalPayloadExpectation: string;
235
235
  requiredFields: string[];
236
236
  optionalFields: string[];
237
+ /**
238
+ * When true, hydration may fan a single symbolic block out into N concrete
239
+ * block instances (one-to-many expansion, contract D6). Absent for the
240
+ * one-to-one sources.
241
+ */
242
+ expands?: boolean;
237
243
  }
238
244
  interface BuilderContractDynamicSources {
239
245
  blog_feed: BuilderContractDynamicSourceDefinition;
246
+ blog_post: BuilderContractDynamicSourceDefinition;
247
+ testimonials_feed: BuilderContractDynamicSourceDefinition;
248
+ instagram_feed: BuilderContractDynamicSourceDefinition;
249
+ events_feed: BuilderContractDynamicSourceDefinition;
240
250
  }
241
251
  interface BuilderContractDesignTokens {
242
252
  canonicalSource: "theme_config";