@burdenoff/website-sdk 2026.517.6 → 2026.518.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.
@@ -755,17 +755,309 @@ function BlogPostPage(props) {
755
755
  className: "w-full h-full object-cover"
756
756
  }
757
757
  ) }),
758
- /* @__PURE__ */ jsx("div", { className: "prose prose-gray dark:prose-invert max-w-none", children: /* @__PURE__ */ jsx(
759
- ContentRenderer,
760
- {
761
- content: post.content,
762
- format: post.contentFormat
763
- }
764
- ) })
758
+ /* @__PURE__ */ jsx("div", { className: "prose prose-gray dark:prose-invert max-w-none", children: /* @__PURE__ */ jsx(ContentRenderer, { content: post.content, format: post.contentFormat }) })
759
+ ] })
760
+ ] });
761
+ }
762
+ var PRESS_KIT_QUERY = `
763
+ query PublicPressKit($productId: String!, $limit: Int, $offset: Int) {
764
+ publicPressKitAssets(productId: $productId, limit: $limit, offset: $offset) {
765
+ items {
766
+ id
767
+ category
768
+ title
769
+ slug
770
+ description
771
+ fileUrl
772
+ fileName
773
+ fileSize
774
+ mimeType
775
+ thumbnailUrl
776
+ version
777
+ tags
778
+ sortOrder
779
+ updatedAt
780
+ }
781
+ total
782
+ hasMore
783
+ }
784
+ }
785
+ `;
786
+ var CATEGORY_ORDER = [
787
+ "LOGO",
788
+ "BANNER",
789
+ "SCREENSHOT",
790
+ "BRAND_GUIDE",
791
+ "BROCHURE",
792
+ "DOCUMENT",
793
+ "PRESS_RELEASE"
794
+ ];
795
+ var CATEGORY_LABELS = {
796
+ LOGO: "Logos",
797
+ BANNER: "Banners",
798
+ SCREENSHOT: "Screenshots",
799
+ BRAND_GUIDE: "Brand Guides",
800
+ BROCHURE: "Brochures",
801
+ DOCUMENT: "Documents",
802
+ PRESS_RELEASE: "Press Releases"
803
+ };
804
+ function formatBytes(bytes) {
805
+ if (bytes == null) return "";
806
+ if (bytes < 1024) return `${bytes} B`;
807
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
808
+ return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
809
+ }
810
+ function AssetCard({ asset }) {
811
+ const date = asset.updatedAt ? new Date(asset.updatedAt).toLocaleDateString("en-US", {
812
+ year: "numeric",
813
+ month: "short",
814
+ day: "numeric"
815
+ }) : "";
816
+ const ext = (asset.mimeType || "file").split("/").pop()?.toUpperCase() || "FILE";
817
+ const size = formatBytes(asset.fileSize);
818
+ return /* @__PURE__ */ jsxs("div", { className: "group flex flex-col bg-card border rounded-xl overflow-hidden hover:shadow-lg hover:border-primary/30 transition-all duration-300", children: [
819
+ asset.thumbnailUrl ? /* @__PURE__ */ jsx("div", { className: "aspect-[16/9] overflow-hidden bg-muted/30", children: /* @__PURE__ */ jsx(
820
+ "img",
821
+ {
822
+ src: asset.thumbnailUrl,
823
+ alt: asset.title,
824
+ className: "w-full h-full object-contain group-hover:scale-105 transition-transform duration-300",
825
+ loading: "lazy"
826
+ }
827
+ ) }) : /* @__PURE__ */ jsx("div", { className: "aspect-[16/9] bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ jsx(
828
+ "svg",
829
+ {
830
+ className: "w-12 h-12 text-muted-foreground/20",
831
+ fill: "none",
832
+ viewBox: "0 0 24 24",
833
+ stroke: "currentColor",
834
+ children: /* @__PURE__ */ jsx(
835
+ "path",
836
+ {
837
+ strokeLinecap: "round",
838
+ strokeLinejoin: "round",
839
+ strokeWidth: 1.5,
840
+ d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
841
+ }
842
+ )
843
+ }
844
+ ) }),
845
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 p-5", children: [
846
+ /* @__PURE__ */ jsx("span", { className: "inline-block self-start text-xs font-medium text-primary bg-primary/10 px-2.5 py-1 rounded-full mb-3", children: CATEGORY_LABELS[asset.category] ?? asset.category }),
847
+ /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-foreground mb-1 line-clamp-2", children: asset.title }),
848
+ asset.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-3 line-clamp-2", children: asset.description }),
849
+ /* @__PURE__ */ jsxs("div", { className: "mt-auto flex items-center justify-between pt-3", children: [
850
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
851
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: ext }),
852
+ size && /* @__PURE__ */ jsxs(Fragment, { children: [
853
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
854
+ /* @__PURE__ */ jsx("span", { children: size })
855
+ ] }),
856
+ date && /* @__PURE__ */ jsxs(Fragment, { children: [
857
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
858
+ /* @__PURE__ */ jsx("span", { children: date })
859
+ ] })
860
+ ] }),
861
+ /* @__PURE__ */ jsxs(
862
+ "a",
863
+ {
864
+ href: asset.fileUrl,
865
+ target: "_blank",
866
+ rel: "noopener noreferrer",
867
+ download: true,
868
+ className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",
869
+ children: [
870
+ /* @__PURE__ */ jsx(
871
+ "svg",
872
+ {
873
+ className: "w-4 h-4",
874
+ fill: "none",
875
+ viewBox: "0 0 24 24",
876
+ stroke: "currentColor",
877
+ strokeWidth: 2,
878
+ children: /* @__PURE__ */ jsx(
879
+ "path",
880
+ {
881
+ strokeLinecap: "round",
882
+ strokeLinejoin: "round",
883
+ d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
884
+ }
885
+ )
886
+ }
887
+ ),
888
+ "Download"
889
+ ]
890
+ }
891
+ )
892
+ ] })
765
893
  ] })
766
894
  ] });
767
895
  }
896
+ function PressKitPage(props) {
897
+ const {
898
+ productName,
899
+ heroTitle = "Press & Media Kit",
900
+ heroSubtitle = "Official logos, brand assets, and media resources. Everything you need to write about us.",
901
+ mediaContactEmail,
902
+ brandKitUrl,
903
+ className = "",
904
+ seoTitle,
905
+ seoDescription,
906
+ seoKeywords
907
+ } = props;
908
+ const client = useWebSDK();
909
+ const config = useWebSDKConfig();
910
+ const { product } = useProduct();
911
+ const resolvedProductId = product?.id || config.productId;
912
+ const contactEmail = mediaContactEmail || product?.contactEmail || void 0;
913
+ const [assets, setAssets] = useState([]);
914
+ const [loading, setLoading] = useState(true);
915
+ const [error, setError] = useState(null);
916
+ const [activeCategory, setActiveCategory] = useState("ALL");
917
+ const fetchAssets = useCallback(async () => {
918
+ if (!resolvedProductId) {
919
+ setLoading(false);
920
+ return;
921
+ }
922
+ setLoading(true);
923
+ try {
924
+ const PAGE_SIZE = 100;
925
+ const all = [];
926
+ let offset = 0;
927
+ for (; ; ) {
928
+ const result = await client.query(PRESS_KIT_QUERY, {
929
+ productId: resolvedProductId,
930
+ limit: PAGE_SIZE,
931
+ offset
932
+ });
933
+ if (result.errors?.length) {
934
+ setError(result.errors[0]?.message ?? "Failed to load press kit");
935
+ return;
936
+ }
937
+ const page = result.data?.publicPressKitAssets;
938
+ const items = page?.items || [];
939
+ all.push(...items);
940
+ if (!page?.hasMore || items.length === 0) break;
941
+ offset += PAGE_SIZE;
942
+ }
943
+ setAssets(all);
944
+ setError(null);
945
+ } catch {
946
+ setError("Failed to load press kit");
947
+ } finally {
948
+ setLoading(false);
949
+ }
950
+ }, [client, resolvedProductId]);
951
+ useEffect(() => {
952
+ fetchAssets();
953
+ }, [fetchAssets]);
954
+ const presentCategories = CATEGORY_ORDER.filter(
955
+ (c) => assets.some((a) => a.category === c)
956
+ );
957
+ const visibleAssets = activeCategory === "ALL" ? assets : assets.filter((a) => a.category === activeCategory);
958
+ const grouped = (activeCategory === "ALL" ? presentCategories : [activeCategory]).map((cat) => ({
959
+ cat,
960
+ items: visibleAssets.filter((a) => a.category === cat).sort((a, b) => a.sortOrder - b.sortOrder)
961
+ })).filter((g) => g.items.length > 0);
962
+ return /* @__PURE__ */ jsxs("div", { className: `w-full ${className}`, children: [
963
+ seoTitle && /* @__PURE__ */ jsx(
964
+ PageHead,
965
+ {
966
+ title: seoTitle,
967
+ description: seoDescription || heroSubtitle,
968
+ productName,
969
+ keywords: seoKeywords
970
+ }
971
+ ),
972
+ /* @__PURE__ */ jsx("section", { className: "py-16 sm:py-20 md:py-24", children: /* @__PURE__ */ jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center max-w-3xl mx-auto", children: [
973
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl sm:text-4xl md:text-5xl font-bold tracking-tight text-foreground", children: heroTitle }),
974
+ /* @__PURE__ */ jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: heroSubtitle }),
975
+ (brandKitUrl || contactEmail) && /* @__PURE__ */ jsxs("div", { className: "mt-8 flex flex-wrap items-center justify-center gap-4", children: [
976
+ brandKitUrl && /* @__PURE__ */ jsx(
977
+ "a",
978
+ {
979
+ href: brandKitUrl,
980
+ target: "_blank",
981
+ rel: "noopener noreferrer",
982
+ className: "inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-primary text-primary-foreground font-medium hover:opacity-90 transition-opacity",
983
+ children: "Download brand kit"
984
+ }
985
+ ),
986
+ contactEmail && /* @__PURE__ */ jsx(
987
+ "a",
988
+ {
989
+ href: `mailto:${contactEmail}`,
990
+ className: "inline-flex items-center gap-2 px-6 py-3 rounded-lg border font-medium text-foreground hover:bg-muted transition-colors",
991
+ children: "Media inquiries"
992
+ }
993
+ )
994
+ ] })
995
+ ] }) }) }),
996
+ /* @__PURE__ */ jsx("section", { className: "pb-16 sm:pb-20", children: /* @__PURE__ */ jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: loading ? /* @__PURE__ */ jsx("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-6", children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ jsxs(
997
+ "div",
998
+ {
999
+ className: "bg-card border rounded-xl overflow-hidden animate-pulse",
1000
+ children: [
1001
+ /* @__PURE__ */ jsx("div", { className: "aspect-[16/9] bg-muted" }),
1002
+ /* @__PURE__ */ jsxs("div", { className: "p-5 space-y-3", children: [
1003
+ /* @__PURE__ */ jsx("div", { className: "h-4 bg-muted rounded w-1/4" }),
1004
+ /* @__PURE__ */ jsx("div", { className: "h-5 bg-muted rounded w-3/4" }),
1005
+ /* @__PURE__ */ jsx("div", { className: "h-4 bg-muted rounded w-1/2" })
1006
+ ] })
1007
+ ]
1008
+ },
1009
+ i
1010
+ )) }) : error ? /* @__PURE__ */ jsx("div", { className: "text-center py-12", children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: error }) }) : assets.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-center py-12", children: /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
1011
+ "Press materials are coming soon. For media inquiries",
1012
+ contactEmail ? /* @__PURE__ */ jsxs(Fragment, { children: [
1013
+ ", contact ",
1014
+ /* @__PURE__ */ jsx(
1015
+ "a",
1016
+ {
1017
+ href: `mailto:${contactEmail}`,
1018
+ className: "text-primary hover:underline",
1019
+ children: contactEmail
1020
+ }
1021
+ )
1022
+ ] }) : " please reach out to our team",
1023
+ "."
1024
+ ] }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1025
+ presentCategories.length > 1 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 mb-10 justify-center", children: ["ALL", ...presentCategories].map((c) => {
1026
+ const active = activeCategory === c;
1027
+ return /* @__PURE__ */ jsx(
1028
+ "button",
1029
+ {
1030
+ type: "button",
1031
+ onClick: () => setActiveCategory(c),
1032
+ className: `px-4 py-2 rounded-full text-sm font-medium transition-colors ${active ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:text-foreground"}`,
1033
+ children: c === "ALL" ? "All" : CATEGORY_LABELS[c] ?? c
1034
+ },
1035
+ c
1036
+ );
1037
+ }) }),
1038
+ grouped.map((group) => /* @__PURE__ */ jsxs("div", { className: "mb-12", children: [
1039
+ /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-foreground mb-5", children: CATEGORY_LABELS[group.cat] ?? group.cat }),
1040
+ /* @__PURE__ */ jsx("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-6", children: group.items.map((a) => /* @__PURE__ */ jsx(AssetCard, { asset: a }, a.id)) })
1041
+ ] }, group.cat)),
1042
+ contactEmail && /* @__PURE__ */ jsxs("div", { className: "mt-8 border-t pt-10 text-center", children: [
1043
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground mb-2", children: "Media Contact" }),
1044
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
1045
+ "For interviews, partnerships, and press inquiries:",
1046
+ " ",
1047
+ /* @__PURE__ */ jsx(
1048
+ "a",
1049
+ {
1050
+ href: `mailto:${contactEmail}`,
1051
+ className: "text-primary hover:underline",
1052
+ children: contactEmail
1053
+ }
1054
+ )
1055
+ ] })
1056
+ ] })
1057
+ ] }) }) })
1058
+ ] });
1059
+ }
768
1060
 
769
- export { BlogListPage, BlogPostPage, ContentRenderer, useContentPage, useContentPages };
1061
+ export { BlogListPage, BlogPostPage, ContentRenderer, PressKitPage, useContentPage, useContentPages };
770
1062
  //# sourceMappingURL=index.mjs.map
771
1063
  //# sourceMappingURL=index.mjs.map