@burdenoff/website-sdk 2026.529.4 → 2026.610.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/index.d.mts CHANGED
@@ -10,7 +10,7 @@ export { SocialLinks, SocialLinksProps, SocialPlatform } from './components/soci
10
10
  export { Resource, ResourceLinks, ResourceLinksProps } from './components/resource-links.mjs';
11
11
  export { RybbitAnalytics, RybbitAnalyticsProps } from './analytics/index.mjs';
12
12
  export { PageHead, PageHeadProps } from './seo/index.mjs';
13
- export { BlogListPage, BlogListPageProps, BlogPostPage, BlogPostPageProps, ContentPageData, ContentPageListData, ContentPageListItem, ContentRenderer, ContractAsset, ContractsPage, ContractsPageProps, PressKitAsset, PressKitAssetCategory, PressKitPage, PressKitPageProps, useContentPage, useContentPages } from './content/index.mjs';
13
+ export { BlogListPage, BlogListPageProps, BlogPostPage, BlogPostPageProps, CaseStudiesListPage, CaseStudiesListPageProps, CaseStudyPage, CaseStudyPageProps, ChangelogPage, ChangelogPageProps, ContentPageData, ContentPageListData, ContentPageListItem, ContentRenderer, ContractAsset, ContractsPage, ContractsPageProps, PressKitAsset, PressKitAssetCategory, PressKitPage, PressKitPageProps, useContentPage, useContentPages } from './content/index.mjs';
14
14
  export { ProductData, ProductProvider, ProductProviderProps, useProduct, useProductConfig } from './product/index.mjs';
15
15
  import * as class_variance_authority_types from 'class-variance-authority/types';
16
16
  import * as React from 'react';
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export { SocialLinks, SocialLinksProps, SocialPlatform } from './components/soci
10
10
  export { Resource, ResourceLinks, ResourceLinksProps } from './components/resource-links.js';
11
11
  export { RybbitAnalytics, RybbitAnalyticsProps } from './analytics/index.js';
12
12
  export { PageHead, PageHeadProps } from './seo/index.js';
13
- export { BlogListPage, BlogListPageProps, BlogPostPage, BlogPostPageProps, ContentPageData, ContentPageListData, ContentPageListItem, ContentRenderer, ContractAsset, ContractsPage, ContractsPageProps, PressKitAsset, PressKitAssetCategory, PressKitPage, PressKitPageProps, useContentPage, useContentPages } from './content/index.js';
13
+ export { BlogListPage, BlogListPageProps, BlogPostPage, BlogPostPageProps, CaseStudiesListPage, CaseStudiesListPageProps, CaseStudyPage, CaseStudyPageProps, ChangelogPage, ChangelogPageProps, ContentPageData, ContentPageListData, ContentPageListItem, ContentRenderer, ContractAsset, ContractsPage, ContractsPageProps, PressKitAsset, PressKitAssetCategory, PressKitPage, PressKitPageProps, useContentPage, useContentPages } from './content/index.js';
14
14
  export { ProductData, ProductProvider, ProductProviderProps, useProduct, useProductConfig } from './product/index.js';
15
15
  import * as class_variance_authority_types from 'class-variance-authority/types';
16
16
  import * as React from 'react';
package/dist/index.js CHANGED
@@ -4314,6 +4314,566 @@ function BlogPostPage(props) {
4314
4314
  ] })
4315
4315
  ] });
4316
4316
  }
4317
+ var CASE_STUDY_TAG = "case-study";
4318
+ var CASE_STUDIES_QUERY = `
4319
+ query CaseStudies($productId: String!, $limit: Int, $offset: Int) {
4320
+ publicContentPages(productId: $productId, limit: $limit, offset: $offset) {
4321
+ items {
4322
+ id
4323
+ title
4324
+ slug
4325
+ lastUpdated
4326
+ tags
4327
+ seoDescription
4328
+ excerpt
4329
+ thumbnail
4330
+ author
4331
+ publishedAt
4332
+ readingTime
4333
+ featured
4334
+ category
4335
+ }
4336
+ total
4337
+ hasMore
4338
+ }
4339
+ }
4340
+ `;
4341
+ var CASE_STUDY_QUERY = `
4342
+ query CaseStudy($slug: String!, $productId: String) {
4343
+ publicContentPage(slug: $slug, productId: $productId) {
4344
+ id
4345
+ title
4346
+ slug
4347
+ content
4348
+ contentFormat
4349
+ seoTitle
4350
+ seoDescription
4351
+ seoKeywords
4352
+ lastUpdated
4353
+ tags
4354
+ excerpt
4355
+ thumbnail
4356
+ author
4357
+ publishedAt
4358
+ readingTime
4359
+ featured
4360
+ category
4361
+ }
4362
+ }
4363
+ `;
4364
+ function CaseStudyCard({
4365
+ post,
4366
+ basePath = "/case-studies"
4367
+ }) {
4368
+ const date = post.publishedAt || post.lastUpdated;
4369
+ const formattedDate = date ? new Date(date).toLocaleDateString("en-US", {
4370
+ year: "numeric",
4371
+ month: "long",
4372
+ day: "numeric"
4373
+ }) : "";
4374
+ const [imgError, setImgError] = React.useState(false);
4375
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4376
+ "a",
4377
+ {
4378
+ href: `${basePath}/${post.slug}`,
4379
+ className: "group block bg-card border rounded-xl overflow-hidden hover:shadow-lg hover:border-primary/30 transition-all duration-300",
4380
+ children: [
4381
+ post.thumbnail && !imgError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
4382
+ "img",
4383
+ {
4384
+ src: post.thumbnail,
4385
+ alt: post.title,
4386
+ className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",
4387
+ loading: "lazy",
4388
+ onError: () => setImgError(true)
4389
+ }
4390
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
4391
+ "svg",
4392
+ {
4393
+ className: "w-12 h-12 text-muted-foreground/20",
4394
+ fill: "none",
4395
+ viewBox: "0 0 24 24",
4396
+ stroke: "currentColor",
4397
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4398
+ "path",
4399
+ {
4400
+ strokeLinecap: "round",
4401
+ strokeLinejoin: "round",
4402
+ strokeWidth: 1.5,
4403
+ d: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"
4404
+ }
4405
+ )
4406
+ }
4407
+ ) }),
4408
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 sm:p-6", children: [
4409
+ post.category && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block text-xs font-medium text-primary bg-primary/10 px-2.5 py-1 rounded-full mb-3", children: post.category }),
4410
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground mb-2 group-hover:text-primary transition-colors line-clamp-2", children: post.title }),
4411
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-4 line-clamp-3", children: post.excerpt || post.seoDescription || "" }),
4412
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-xs text-muted-foreground", children: [
4413
+ post.author && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: post.author }),
4414
+ post.author && formattedDate && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
4415
+ formattedDate && /* @__PURE__ */ jsxRuntime.jsx("span", { children: formattedDate }),
4416
+ post.readingTime && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4417
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
4418
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
4419
+ post.readingTime,
4420
+ " min read"
4421
+ ] })
4422
+ ] })
4423
+ ] })
4424
+ ] })
4425
+ ]
4426
+ }
4427
+ );
4428
+ }
4429
+ function CaseStudiesListPage(props) {
4430
+ const {
4431
+ productName,
4432
+ heroTitle = "Case Studies",
4433
+ heroSubtitle = "Real-world stories of teams building with our platform",
4434
+ caseStudyBasePath = "/case-studies",
4435
+ className = "",
4436
+ seoTitle,
4437
+ seoDescription,
4438
+ seoKeywords
4439
+ } = props;
4440
+ const client = useWebSDK();
4441
+ const config = useWebSDKConfig();
4442
+ const { product } = useProduct();
4443
+ const resolvedProductId = product?.id || config.productId;
4444
+ const [posts, setPosts] = React.useState([]);
4445
+ const [total, setTotal] = React.useState(0);
4446
+ const [loading, setLoading] = React.useState(true);
4447
+ const [error, setError] = React.useState(null);
4448
+ const [offset, setOffset] = React.useState(0);
4449
+ const limit = 12;
4450
+ const fetchPosts = React.useCallback(async () => {
4451
+ if (!resolvedProductId) return;
4452
+ setLoading(true);
4453
+ try {
4454
+ const result = await client.query(CASE_STUDIES_QUERY, {
4455
+ productId: resolvedProductId,
4456
+ limit,
4457
+ offset
4458
+ });
4459
+ if (result.errors?.length) {
4460
+ setError(result.errors[0]?.message ?? "Failed to load case studies");
4461
+ return;
4462
+ }
4463
+ const caseStudies = (result.data?.publicContentPages?.items || []).filter(
4464
+ (p) => p.tags?.includes(CASE_STUDY_TAG)
4465
+ );
4466
+ setPosts(caseStudies);
4467
+ setTotal(result.data?.publicContentPages?.total || 0);
4468
+ setError(null);
4469
+ } catch {
4470
+ setError("Failed to load case studies");
4471
+ } finally {
4472
+ setLoading(false);
4473
+ }
4474
+ }, [client, resolvedProductId, offset]);
4475
+ React.useEffect(() => {
4476
+ fetchPosts();
4477
+ }, [fetchPosts]);
4478
+ const featuredPosts = posts.filter((p) => p.featured);
4479
+ const regularPosts = posts.filter((p) => !p.featured);
4480
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `w-full ${className}`, children: [
4481
+ seoTitle && /* @__PURE__ */ jsxRuntime.jsx(
4482
+ PageHead,
4483
+ {
4484
+ title: seoTitle,
4485
+ description: seoDescription || heroSubtitle,
4486
+ productName,
4487
+ keywords: seoKeywords
4488
+ }
4489
+ ),
4490
+ /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-16 sm:py-20 md:py-24", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center max-w-3xl mx-auto", children: [
4491
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl sm:text-4xl md:text-5xl font-bold tracking-tight text-foreground", children: heroTitle }),
4492
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: heroSubtitle })
4493
+ ] }) }) }),
4494
+ /* @__PURE__ */ jsxRuntime.jsx("section", { className: "pb-16 sm:pb-20", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid md:grid-cols-2 lg:grid-cols-3 gap-6 sm:gap-8", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
4495
+ "div",
4496
+ {
4497
+ className: "bg-card border rounded-xl overflow-hidden animate-pulse",
4498
+ children: [
4499
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] bg-muted" }),
4500
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 space-y-3", children: [
4501
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-1/4" }),
4502
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 bg-muted rounded w-3/4" }),
4503
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded" }),
4504
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-1/2" })
4505
+ ] })
4506
+ ]
4507
+ },
4508
+ i
4509
+ )) }) : error ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: error }) }) : posts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "No case studies yet. Check back soon!" }) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4510
+ featuredPosts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid md:grid-cols-2 gap-6 sm:gap-8 mb-8", children: featuredPosts.map((post) => /* @__PURE__ */ jsxRuntime.jsx(
4511
+ CaseStudyCard,
4512
+ {
4513
+ post,
4514
+ basePath: caseStudyBasePath
4515
+ },
4516
+ post.id
4517
+ )) }),
4518
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid md:grid-cols-2 lg:grid-cols-3 gap-6 sm:gap-8", children: regularPosts.map((post) => /* @__PURE__ */ jsxRuntime.jsx(
4519
+ CaseStudyCard,
4520
+ {
4521
+ post,
4522
+ basePath: caseStudyBasePath
4523
+ },
4524
+ post.id
4525
+ )) }),
4526
+ total > limit && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-center gap-4 mt-12", children: [
4527
+ /* @__PURE__ */ jsxRuntime.jsx(
4528
+ "button",
4529
+ {
4530
+ onClick: () => setOffset(Math.max(0, offset - limit)),
4531
+ disabled: offset === 0,
4532
+ className: "px-5 py-2.5 text-sm font-medium border rounded-lg disabled:opacity-40 hover:bg-muted transition-colors",
4533
+ children: "Previous"
4534
+ }
4535
+ ),
4536
+ /* @__PURE__ */ jsxRuntime.jsx(
4537
+ "button",
4538
+ {
4539
+ onClick: () => setOffset(offset + limit),
4540
+ disabled: offset + limit >= total,
4541
+ className: "px-5 py-2.5 text-sm font-medium border rounded-lg disabled:opacity-40 hover:bg-muted transition-colors",
4542
+ children: "Next"
4543
+ }
4544
+ )
4545
+ ] })
4546
+ ] }) }) })
4547
+ ] });
4548
+ }
4549
+ function CaseStudyPage(props) {
4550
+ const {
4551
+ productName,
4552
+ caseStudiesListUrl = "/case-studies",
4553
+ backLabel = "Back to Case Studies",
4554
+ className = ""
4555
+ } = props;
4556
+ const client = useWebSDK();
4557
+ const config = useWebSDKConfig();
4558
+ const { product } = useProduct();
4559
+ const resolvedProductId = product?.id || config.productId;
4560
+ const [post, setPost] = React.useState(null);
4561
+ const [loading, setLoading] = React.useState(true);
4562
+ const [error, setError] = React.useState(null);
4563
+ const slug = typeof window !== "undefined" ? window.location.pathname.split("/").pop() || "" : "";
4564
+ React.useEffect(() => {
4565
+ if (!slug || !resolvedProductId) return;
4566
+ async function fetchPost() {
4567
+ setLoading(true);
4568
+ try {
4569
+ const result = await client.query(CASE_STUDY_QUERY, {
4570
+ slug,
4571
+ productId: resolvedProductId
4572
+ });
4573
+ if (result.errors?.length) {
4574
+ setError(result.errors[0]?.message ?? "Failed to load case study");
4575
+ return;
4576
+ }
4577
+ setPost(result.data?.publicContentPage ?? null);
4578
+ setError(null);
4579
+ } catch {
4580
+ setError("Failed to load case study");
4581
+ } finally {
4582
+ setLoading(false);
4583
+ }
4584
+ }
4585
+ fetchPost();
4586
+ }, [client, slug, resolvedProductId]);
4587
+ if (loading) {
4588
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-full ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-24", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "animate-pulse space-y-6", children: [
4589
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 bg-muted rounded w-2/3" }),
4590
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-1/3" }),
4591
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] bg-muted rounded-xl" }),
4592
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded" }, i)) })
4593
+ ] }) }) });
4594
+ }
4595
+ if (error || !post) {
4596
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-full ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-24 text-center", children: [
4597
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-4", children: "Case study not found" }),
4598
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-6", children: error || "This case study doesn't exist or has been removed." }),
4599
+ /* @__PURE__ */ jsxRuntime.jsxs(
4600
+ "a",
4601
+ {
4602
+ href: caseStudiesListUrl,
4603
+ className: "text-primary hover:underline font-medium",
4604
+ children: [
4605
+ "\u2190 ",
4606
+ backLabel
4607
+ ]
4608
+ }
4609
+ )
4610
+ ] }) });
4611
+ }
4612
+ const date = post.publishedAt || post.lastUpdated;
4613
+ const formattedDate = date ? new Date(date).toLocaleDateString("en-US", {
4614
+ year: "numeric",
4615
+ month: "long",
4616
+ day: "numeric"
4617
+ }) : "";
4618
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `w-full ${className}`, children: [
4619
+ /* @__PURE__ */ jsxRuntime.jsx(
4620
+ PageHead,
4621
+ {
4622
+ title: post.seoTitle || post.title,
4623
+ description: post.seoDescription || post.excerpt || "",
4624
+ productName,
4625
+ keywords: post.seoKeywords || ""
4626
+ }
4627
+ ),
4628
+ /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16 sm:py-20", children: [
4629
+ /* @__PURE__ */ jsxRuntime.jsxs(
4630
+ "a",
4631
+ {
4632
+ href: caseStudiesListUrl,
4633
+ className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-8 transition-colors",
4634
+ children: [
4635
+ "\u2190 ",
4636
+ backLabel
4637
+ ]
4638
+ }
4639
+ ),
4640
+ post.category && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block text-xs font-medium text-primary bg-primary/10 px-2.5 py-1 rounded-full mb-4", children: post.category }),
4641
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl sm:text-4xl md:text-5xl font-bold tracking-tight text-foreground mb-4", children: post.title }),
4642
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-sm text-muted-foreground mb-8", children: [
4643
+ post.author && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: post.author }),
4644
+ post.author && formattedDate && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
4645
+ formattedDate && /* @__PURE__ */ jsxRuntime.jsx("span", { children: formattedDate }),
4646
+ post.readingTime && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4647
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
4648
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
4649
+ post.readingTime,
4650
+ " min read"
4651
+ ] })
4652
+ ] })
4653
+ ] }),
4654
+ post.thumbnail && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] rounded-xl overflow-hidden mb-10", children: /* @__PURE__ */ jsxRuntime.jsx(
4655
+ "img",
4656
+ {
4657
+ src: post.thumbnail,
4658
+ alt: post.title,
4659
+ className: "w-full h-full object-cover"
4660
+ }
4661
+ ) }),
4662
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose prose-gray dark:prose-invert max-w-none", children: /* @__PURE__ */ jsxRuntime.jsx(ContentRenderer, { content: post.content, format: post.contentFormat }) })
4663
+ ] })
4664
+ ] });
4665
+ }
4666
+ var CHANGELOG_TAG = "changelog";
4667
+ var CHANGELOG_LIST_QUERY = `
4668
+ query ChangelogList($productId: String!, $limit: Int, $offset: Int) {
4669
+ publicContentPages(productId: $productId, limit: $limit, offset: $offset) {
4670
+ items {
4671
+ id
4672
+ title
4673
+ slug
4674
+ lastUpdated
4675
+ tags
4676
+ excerpt
4677
+ seoDescription
4678
+ thumbnail
4679
+ author
4680
+ publishedAt
4681
+ readingTime
4682
+ featured
4683
+ category
4684
+ }
4685
+ total
4686
+ hasMore
4687
+ }
4688
+ }
4689
+ `;
4690
+ var CHANGELOG_ENTRY_QUERY = `
4691
+ query ChangelogEntry($slug: String!, $productId: String) {
4692
+ publicContentPage(slug: $slug, productId: $productId) {
4693
+ content
4694
+ contentFormat
4695
+ }
4696
+ }
4697
+ `;
4698
+ function formatDate(value) {
4699
+ if (!value) return "";
4700
+ return new Date(value).toLocaleDateString("en-US", {
4701
+ year: "numeric",
4702
+ month: "long",
4703
+ day: "numeric"
4704
+ });
4705
+ }
4706
+ function sortByDateDesc(a, b) {
4707
+ const da = new Date(a.publishedAt || a.lastUpdated || 0).getTime();
4708
+ const db = new Date(b.publishedAt || b.lastUpdated || 0).getTime();
4709
+ return db - da;
4710
+ }
4711
+ function ChangelogPage(props) {
4712
+ const {
4713
+ productName,
4714
+ heroEyebrow = "What's new",
4715
+ heroTitle = "Changelog",
4716
+ heroSubtitle = "Platform updates, improvements, and announcements \u2014 newest first.",
4717
+ ctaTitle,
4718
+ ctaSubtitle,
4719
+ ctaHref,
4720
+ ctaLabel,
4721
+ className = "",
4722
+ seoTitle,
4723
+ seoDescription,
4724
+ seoKeywords
4725
+ } = props;
4726
+ const client = useWebSDK();
4727
+ const config = useWebSDKConfig();
4728
+ const { product } = useProduct();
4729
+ const resolvedProductId = product?.id || config.productId;
4730
+ const [entries, setEntries] = React.useState([]);
4731
+ const [loading, setLoading] = React.useState(true);
4732
+ const [error, setError] = React.useState(null);
4733
+ const fetchEntries = React.useCallback(async () => {
4734
+ if (!resolvedProductId) return;
4735
+ setLoading(true);
4736
+ try {
4737
+ const listResult = await client.query(CHANGELOG_LIST_QUERY, {
4738
+ productId: resolvedProductId,
4739
+ limit: 50,
4740
+ offset: 0
4741
+ });
4742
+ if (listResult.errors?.length) {
4743
+ setError(listResult.errors[0]?.message ?? "Failed to load changelog");
4744
+ return;
4745
+ }
4746
+ const changelogItems = (listResult.data?.publicContentPages?.items || []).filter((p) => p.tags?.includes(CHANGELOG_TAG)).sort(sortByDateDesc);
4747
+ const resolved = await Promise.all(
4748
+ changelogItems.map(async (item) => {
4749
+ try {
4750
+ const detail = await client.query(CHANGELOG_ENTRY_QUERY, {
4751
+ slug: item.slug,
4752
+ productId: resolvedProductId
4753
+ });
4754
+ const page = detail.data?.publicContentPage;
4755
+ return {
4756
+ ...item,
4757
+ content: page?.content,
4758
+ contentFormat: page?.contentFormat
4759
+ };
4760
+ } catch {
4761
+ return { ...item };
4762
+ }
4763
+ })
4764
+ );
4765
+ setEntries(resolved);
4766
+ setError(null);
4767
+ } catch {
4768
+ setError("Failed to load changelog");
4769
+ } finally {
4770
+ setLoading(false);
4771
+ }
4772
+ }, [client, resolvedProductId]);
4773
+ React.useEffect(() => {
4774
+ fetchEntries();
4775
+ }, [fetchEntries]);
4776
+ const showCta = Boolean(ctaHref && ctaLabel);
4777
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `w-full ${className}`, children: [
4778
+ seoTitle && /* @__PURE__ */ jsxRuntime.jsx(
4779
+ PageHead,
4780
+ {
4781
+ title: seoTitle,
4782
+ description: seoDescription || heroSubtitle,
4783
+ productName,
4784
+ keywords: seoKeywords
4785
+ }
4786
+ ),
4787
+ /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-16 md:py-20 px-4 sm:px-6 lg:px-8 text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-3xl mx-auto", children: [
4788
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/10 border border-primary/20 text-xs font-medium text-primary mb-6", children: [
4789
+ /* @__PURE__ */ jsxRuntime.jsx(
4790
+ "svg",
4791
+ {
4792
+ className: "h-3.5 w-3.5",
4793
+ fill: "none",
4794
+ viewBox: "0 0 24 24",
4795
+ stroke: "currentColor",
4796
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4797
+ "path",
4798
+ {
4799
+ strokeLinecap: "round",
4800
+ strokeLinejoin: "round",
4801
+ strokeWidth: 2,
4802
+ d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
4803
+ }
4804
+ )
4805
+ }
4806
+ ),
4807
+ heroEyebrow
4808
+ ] }),
4809
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl sm:text-5xl font-bold text-foreground mb-4", children: heroTitle }),
4810
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground", children: heroSubtitle })
4811
+ ] }) }),
4812
+ /* @__PURE__ */ jsxRuntime.jsx("section", { className: "px-4 sm:px-6 lg:px-8 pb-20", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-3xl mx-auto space-y-12", children: loading ? [1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsx(
4813
+ "div",
4814
+ {
4815
+ className: "rounded-2xl border border-border/40 bg-card overflow-hidden animate-pulse",
4816
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 sm:p-8 space-y-4", children: [
4817
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 bg-muted rounded w-1/3" }),
4818
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 bg-muted rounded w-2/3" }),
4819
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded" }),
4820
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-5/6" })
4821
+ ] })
4822
+ },
4823
+ i
4824
+ )) : error ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: error }) }) : entries.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "No changelog entries yet. Check back soon!" }) }) : entries.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs(
4825
+ "article",
4826
+ {
4827
+ id: entry.slug,
4828
+ className: "rounded-2xl border border-border/40 bg-card overflow-hidden scroll-mt-24",
4829
+ children: [
4830
+ entry.thumbnail && /* @__PURE__ */ jsxRuntime.jsx(
4831
+ "img",
4832
+ {
4833
+ src: entry.thumbnail,
4834
+ alt: "",
4835
+ width: 1024,
4836
+ height: 576,
4837
+ loading: "lazy",
4838
+ decoding: "async",
4839
+ className: "w-full aspect-video object-cover border-b border-border/40"
4840
+ }
4841
+ ),
4842
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 sm:p-8", children: [
4843
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground mb-2", children: [
4844
+ entry.publishedAt && /* @__PURE__ */ jsxRuntime.jsx("time", { dateTime: entry.publishedAt, children: formatDate(entry.publishedAt || entry.lastUpdated) }),
4845
+ entry.author && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4846
+ " \xB7 ",
4847
+ entry.author
4848
+ ] })
4849
+ ] }),
4850
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl sm:text-2xl font-bold text-foreground mb-4", children: entry.title }),
4851
+ entry.content ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose prose-sm prose-gray dark:prose-invert max-w-none", children: /* @__PURE__ */ jsxRuntime.jsx(
4852
+ ContentRenderer,
4853
+ {
4854
+ content: entry.content,
4855
+ format: entry.contentFormat
4856
+ }
4857
+ ) }) : entry.excerpt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed", children: entry.excerpt })
4858
+ ] })
4859
+ ]
4860
+ },
4861
+ entry.id
4862
+ )) }) }),
4863
+ showCta && /* @__PURE__ */ jsxRuntime.jsx("section", { className: "py-14 px-4 sm:px-6 lg:px-8 bg-primary/5 border-t border-border/40", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-2xl mx-auto text-center", children: [
4864
+ ctaTitle && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold text-foreground mb-3", children: ctaTitle }),
4865
+ ctaSubtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-7", children: ctaSubtitle }),
4866
+ /* @__PURE__ */ jsxRuntime.jsx(
4867
+ "a",
4868
+ {
4869
+ href: ctaHref,
4870
+ className: "inline-flex items-center justify-center rounded-lg bg-primary px-6 py-3 text-sm font-medium text-primary-foreground hover:opacity-90 transition-opacity",
4871
+ children: ctaLabel
4872
+ }
4873
+ )
4874
+ ] }) })
4875
+ ] });
4876
+ }
4317
4877
 
4318
4878
  // src/content/utils.ts
4319
4879
  function formatBytes(bytes) {
@@ -5118,6 +5678,9 @@ exports.BlogListPage = BlogListPage;
5118
5678
  exports.BlogPostPage = BlogPostPage;
5119
5679
  exports.Button = Button;
5120
5680
  exports.CareersApplyForm = CareersApplyForm;
5681
+ exports.CaseStudiesListPage = CaseStudiesListPage;
5682
+ exports.CaseStudyPage = CaseStudyPage;
5683
+ exports.ChangelogPage = ChangelogPage;
5121
5684
  exports.ContactPage = ContactPage;
5122
5685
  exports.ContentRenderer = ContentRenderer;
5123
5686
  exports.ContractsPage = ContractsPage;