@burdenoff/website-sdk 2026.522.6 → 2026.524.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/content/index.d.mts +26 -1
- package/dist/content/index.d.ts +26 -1
- package/dist/content/index.js +200 -32
- package/dist/content/index.js.map +1 -1
- package/dist/content/index.mjs +200 -33
- package/dist/content/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +200 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +200 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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, PressKitAsset, PressKitAssetCategory, PressKitPage, PressKitPageProps, useContentPage, useContentPages } from './content/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';
|
|
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';
|
|
@@ -49,7 +49,7 @@ declare function CareersApplyForm({ productName, recaptchaSiteKey, positions, he
|
|
|
49
49
|
|
|
50
50
|
declare const buttonVariants: (props?: ({
|
|
51
51
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
52
|
-
size?: "
|
|
52
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
53
53
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
54
54
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
55
55
|
asChild?: boolean;
|
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, PressKitAsset, PressKitAssetCategory, PressKitPage, PressKitPageProps, useContentPage, useContentPages } from './content/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';
|
|
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';
|
|
@@ -49,7 +49,7 @@ declare function CareersApplyForm({ productName, recaptchaSiteKey, positions, he
|
|
|
49
49
|
|
|
50
50
|
declare const buttonVariants: (props?: ({
|
|
51
51
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
52
|
-
size?: "
|
|
52
|
+
size?: "icon" | "default" | "sm" | "lg" | null | undefined;
|
|
53
53
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
54
54
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
55
55
|
asChild?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -4283,6 +4283,42 @@ function BlogPostPage(props) {
|
|
|
4283
4283
|
] })
|
|
4284
4284
|
] });
|
|
4285
4285
|
}
|
|
4286
|
+
|
|
4287
|
+
// src/content/utils.ts
|
|
4288
|
+
function formatBytes(bytes) {
|
|
4289
|
+
if (bytes == null) return "";
|
|
4290
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
4291
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
|
|
4292
|
+
return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
|
|
4293
|
+
}
|
|
4294
|
+
function fileExt(file) {
|
|
4295
|
+
const name = file.fileName || file.fileUrl.split("/").pop()?.split("?")[0] || "";
|
|
4296
|
+
const ext = name.split(".").pop();
|
|
4297
|
+
return ext && ext !== name ? ext.toUpperCase() : "FILE";
|
|
4298
|
+
}
|
|
4299
|
+
async function downloadFile(e, file) {
|
|
4300
|
+
e.preventDefault();
|
|
4301
|
+
const openInTab = () => window.open(file.fileUrl, "_blank", "noopener,noreferrer");
|
|
4302
|
+
const name = file.fileName || file.fileUrl.split("/").pop()?.split("?")[0] || file.title || "download";
|
|
4303
|
+
try {
|
|
4304
|
+
const res = await fetch(file.fileUrl, { mode: "cors" });
|
|
4305
|
+
if (!res.ok) {
|
|
4306
|
+
openInTab();
|
|
4307
|
+
return;
|
|
4308
|
+
}
|
|
4309
|
+
const blob = await res.blob();
|
|
4310
|
+
const objUrl = URL.createObjectURL(blob);
|
|
4311
|
+
const a = document.createElement("a");
|
|
4312
|
+
a.href = objUrl;
|
|
4313
|
+
a.download = name;
|
|
4314
|
+
document.body.appendChild(a);
|
|
4315
|
+
a.click();
|
|
4316
|
+
a.remove();
|
|
4317
|
+
URL.revokeObjectURL(objUrl);
|
|
4318
|
+
} catch {
|
|
4319
|
+
openInTab();
|
|
4320
|
+
}
|
|
4321
|
+
}
|
|
4286
4322
|
var PRESS_KIT_QUERY = `
|
|
4287
4323
|
query PublicPressKit($productId: String!, $limit: Int, $offset: Int) {
|
|
4288
4324
|
publicPressKitAssets(productId: $productId, limit: $limit, offset: $offset) {
|
|
@@ -4348,38 +4384,9 @@ var CATEGORY_LABELS = {
|
|
|
4348
4384
|
DOCUMENT: "Documents",
|
|
4349
4385
|
PRESS_RELEASE: "Press Releases"
|
|
4350
4386
|
};
|
|
4351
|
-
function formatBytes(bytes) {
|
|
4352
|
-
if (bytes == null) return "";
|
|
4353
|
-
if (bytes < 1024) return `${bytes} B`;
|
|
4354
|
-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
|
|
4355
|
-
return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
|
|
4356
|
-
}
|
|
4357
4387
|
function isImageAsset(a) {
|
|
4358
4388
|
return (a.mimeType || "").startsWith("image/");
|
|
4359
4389
|
}
|
|
4360
|
-
async function downloadAsset(e, asset) {
|
|
4361
|
-
e.preventDefault();
|
|
4362
|
-
const openInTab = () => window.open(asset.fileUrl, "_blank", "noopener,noreferrer");
|
|
4363
|
-
const name = asset.fileName || asset.fileUrl.split("/").pop()?.split("?")[0] || asset.title || "download";
|
|
4364
|
-
try {
|
|
4365
|
-
const res = await fetch(asset.fileUrl, { mode: "cors" });
|
|
4366
|
-
if (!res.ok) {
|
|
4367
|
-
openInTab();
|
|
4368
|
-
return;
|
|
4369
|
-
}
|
|
4370
|
-
const blob = await res.blob();
|
|
4371
|
-
const objUrl = URL.createObjectURL(blob);
|
|
4372
|
-
const a = document.createElement("a");
|
|
4373
|
-
a.href = objUrl;
|
|
4374
|
-
a.download = name;
|
|
4375
|
-
document.body.appendChild(a);
|
|
4376
|
-
a.click();
|
|
4377
|
-
a.remove();
|
|
4378
|
-
URL.revokeObjectURL(objUrl);
|
|
4379
|
-
} catch {
|
|
4380
|
-
openInTab();
|
|
4381
|
-
}
|
|
4382
|
-
}
|
|
4383
4390
|
function PressKitLightbox({
|
|
4384
4391
|
asset,
|
|
4385
4392
|
onClose
|
|
@@ -4466,7 +4473,7 @@ function PressKitLightbox({
|
|
|
4466
4473
|
rel: "noopener noreferrer",
|
|
4467
4474
|
download: true,
|
|
4468
4475
|
onClick: (e) => {
|
|
4469
|
-
void
|
|
4476
|
+
void downloadFile(e, asset);
|
|
4470
4477
|
},
|
|
4471
4478
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90",
|
|
4472
4479
|
children: [
|
|
@@ -4582,7 +4589,7 @@ function AssetCard({
|
|
|
4582
4589
|
rel: "noopener noreferrer",
|
|
4583
4590
|
download: true,
|
|
4584
4591
|
onClick: (e) => {
|
|
4585
|
-
void
|
|
4592
|
+
void downloadFile(e, asset);
|
|
4586
4593
|
},
|
|
4587
4594
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",
|
|
4588
4595
|
children: [
|
|
@@ -4712,9 +4719,10 @@ function PressKitPage(props) {
|
|
|
4712
4719
|
setLoading(true);
|
|
4713
4720
|
try {
|
|
4714
4721
|
const PAGE_SIZE = 100;
|
|
4722
|
+
const MAX_PAGES = 10;
|
|
4715
4723
|
const all = [];
|
|
4716
4724
|
let offset = 0;
|
|
4717
|
-
for (; ; ) {
|
|
4725
|
+
for (let pageNum = 0; pageNum < MAX_PAGES; pageNum++) {
|
|
4718
4726
|
const result = await client.query(PRESS_KIT_QUERY, {
|
|
4719
4727
|
productId: resolvedProductId,
|
|
4720
4728
|
limit: PAGE_SIZE,
|
|
@@ -4915,6 +4923,165 @@ function PressKitPage(props) {
|
|
|
4915
4923
|
/* @__PURE__ */ jsxRuntime.jsx(PressKitLightbox, { asset: preview, onClose: () => setPreview(null) })
|
|
4916
4924
|
] });
|
|
4917
4925
|
}
|
|
4926
|
+
var CONTRACTS_QUERY = `
|
|
4927
|
+
query PublicContracts($productId: String!, $limit: Int, $offset: Int) {
|
|
4928
|
+
publicPressKitAssets(productId: $productId, category: CONTRACT, limit: $limit, offset: $offset) {
|
|
4929
|
+
items {
|
|
4930
|
+
id
|
|
4931
|
+
title
|
|
4932
|
+
slug
|
|
4933
|
+
description
|
|
4934
|
+
fileUrl
|
|
4935
|
+
fileName
|
|
4936
|
+
fileSize
|
|
4937
|
+
mimeType
|
|
4938
|
+
version
|
|
4939
|
+
tags
|
|
4940
|
+
sortOrder
|
|
4941
|
+
updatedAt
|
|
4942
|
+
}
|
|
4943
|
+
hasMore
|
|
4944
|
+
}
|
|
4945
|
+
}
|
|
4946
|
+
`;
|
|
4947
|
+
function ContractsPage(props) {
|
|
4948
|
+
const {
|
|
4949
|
+
productName,
|
|
4950
|
+
heroTitle = "Contracts & Legal Agreements",
|
|
4951
|
+
heroSubtitle = "Download our standard legal agreements and policies.",
|
|
4952
|
+
className = "",
|
|
4953
|
+
seoTitle,
|
|
4954
|
+
seoDescription,
|
|
4955
|
+
seoKeywords
|
|
4956
|
+
} = props;
|
|
4957
|
+
const client = useWebSDK();
|
|
4958
|
+
const config = useWebSDKConfig();
|
|
4959
|
+
const { product } = useProduct();
|
|
4960
|
+
const resolvedProductId = product?.id || config.productId;
|
|
4961
|
+
const displayName = productName ?? product?.name ?? config.productId;
|
|
4962
|
+
const [contracts, setContracts] = React.useState([]);
|
|
4963
|
+
const [loading, setLoading] = React.useState(true);
|
|
4964
|
+
const [error, setError] = React.useState(null);
|
|
4965
|
+
const fetchContracts = React.useCallback(async () => {
|
|
4966
|
+
if (!resolvedProductId) {
|
|
4967
|
+
setLoading(false);
|
|
4968
|
+
return;
|
|
4969
|
+
}
|
|
4970
|
+
setLoading(true);
|
|
4971
|
+
try {
|
|
4972
|
+
const PAGE_SIZE = 100;
|
|
4973
|
+
const MAX_PAGES = 10;
|
|
4974
|
+
const all = [];
|
|
4975
|
+
let offset = 0;
|
|
4976
|
+
for (let pageNum = 0; pageNum < MAX_PAGES; pageNum++) {
|
|
4977
|
+
const result = await client.query(CONTRACTS_QUERY, {
|
|
4978
|
+
productId: resolvedProductId,
|
|
4979
|
+
limit: PAGE_SIZE,
|
|
4980
|
+
offset
|
|
4981
|
+
});
|
|
4982
|
+
if (result.errors?.length) {
|
|
4983
|
+
setError(result.errors[0]?.message ?? "Failed to load contracts");
|
|
4984
|
+
return;
|
|
4985
|
+
}
|
|
4986
|
+
const page = result.data?.publicPressKitAssets;
|
|
4987
|
+
const items = page?.items || [];
|
|
4988
|
+
all.push(...items);
|
|
4989
|
+
if (!page?.hasMore || items.length === 0) break;
|
|
4990
|
+
offset += PAGE_SIZE;
|
|
4991
|
+
}
|
|
4992
|
+
all.sort(
|
|
4993
|
+
(a, b) => a.sortOrder - b.sortOrder || a.title.localeCompare(b.title)
|
|
4994
|
+
);
|
|
4995
|
+
setContracts(all);
|
|
4996
|
+
setError(null);
|
|
4997
|
+
} catch {
|
|
4998
|
+
setError("Failed to load contracts");
|
|
4999
|
+
} finally {
|
|
5000
|
+
setLoading(false);
|
|
5001
|
+
}
|
|
5002
|
+
}, [client, resolvedProductId]);
|
|
5003
|
+
React.useEffect(() => {
|
|
5004
|
+
fetchContracts();
|
|
5005
|
+
}, [fetchContracts]);
|
|
5006
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `min-h-screen bg-background ${className}`, children: [
|
|
5007
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5008
|
+
PageHead,
|
|
5009
|
+
{
|
|
5010
|
+
title: seoTitle || `Contracts \u2014 ${displayName}`,
|
|
5011
|
+
description: seoDescription || heroSubtitle,
|
|
5012
|
+
productName,
|
|
5013
|
+
keywords: seoKeywords
|
|
5014
|
+
}
|
|
5015
|
+
),
|
|
5016
|
+
/* @__PURE__ */ jsxRuntime.jsx("section", { className: "border-b border-border bg-muted/30", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-16 text-center", children: [
|
|
5017
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-4xl md:text-5xl font-bold text-foreground mb-4", children: heroTitle }),
|
|
5018
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto", children: heroSubtitle })
|
|
5019
|
+
] }) }),
|
|
5020
|
+
/* @__PURE__ */ jsxRuntime.jsx("section", { className: "max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-12", children: loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center py-20", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" }) }) : error ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-16", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: error }) }) : contracts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-16", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-muted-foreground", children: "No contracts are available yet." }) }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "divide-y divide-border rounded-xl border border-border overflow-hidden bg-card", children: contracts.map((c) => {
|
|
5021
|
+
const ext = fileExt(c);
|
|
5022
|
+
const size = formatBytes(c.fileSize);
|
|
5023
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5024
|
+
"li",
|
|
5025
|
+
{
|
|
5026
|
+
className: "flex items-center justify-between gap-4 p-5 hover:bg-muted/40 transition-colors",
|
|
5027
|
+
children: [
|
|
5028
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
5029
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
5030
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-foreground truncate", children: c.title }),
|
|
5031
|
+
c.version && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-primary bg-primary/10 px-2 py-0.5 rounded-full", children: c.version })
|
|
5032
|
+
] }),
|
|
5033
|
+
c.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-1 line-clamp-2", children: c.description }),
|
|
5034
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1 flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
5035
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: ext }),
|
|
5036
|
+
size && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5037
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
|
|
5038
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: size })
|
|
5039
|
+
] })
|
|
5040
|
+
] })
|
|
5041
|
+
] }),
|
|
5042
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5043
|
+
"a",
|
|
5044
|
+
{
|
|
5045
|
+
href: c.fileUrl,
|
|
5046
|
+
target: "_blank",
|
|
5047
|
+
rel: "noopener noreferrer",
|
|
5048
|
+
download: true,
|
|
5049
|
+
"aria-label": `Download ${c.title}`,
|
|
5050
|
+
onClick: (e) => {
|
|
5051
|
+
void downloadFile(e, c);
|
|
5052
|
+
},
|
|
5053
|
+
className: "flex-shrink-0 inline-flex items-center gap-1.5 text-sm font-medium text-primary-foreground bg-primary hover:opacity-90 px-4 py-2 rounded-lg transition-opacity",
|
|
5054
|
+
children: [
|
|
5055
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5056
|
+
"svg",
|
|
5057
|
+
{
|
|
5058
|
+
className: "w-4 h-4",
|
|
5059
|
+
fill: "none",
|
|
5060
|
+
viewBox: "0 0 24 24",
|
|
5061
|
+
stroke: "currentColor",
|
|
5062
|
+
"aria-hidden": "true",
|
|
5063
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5064
|
+
"path",
|
|
5065
|
+
{
|
|
5066
|
+
strokeLinecap: "round",
|
|
5067
|
+
strokeLinejoin: "round",
|
|
5068
|
+
strokeWidth: 2,
|
|
5069
|
+
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
5070
|
+
}
|
|
5071
|
+
)
|
|
5072
|
+
}
|
|
5073
|
+
),
|
|
5074
|
+
"Download"
|
|
5075
|
+
]
|
|
5076
|
+
}
|
|
5077
|
+
)
|
|
5078
|
+
]
|
|
5079
|
+
},
|
|
5080
|
+
c.id
|
|
5081
|
+
);
|
|
5082
|
+
}) }) })
|
|
5083
|
+
] });
|
|
5084
|
+
}
|
|
4918
5085
|
|
|
4919
5086
|
exports.BlogListPage = BlogListPage;
|
|
4920
5087
|
exports.BlogPostPage = BlogPostPage;
|
|
@@ -4922,6 +5089,7 @@ exports.Button = Button;
|
|
|
4922
5089
|
exports.CareersApplyForm = CareersApplyForm;
|
|
4923
5090
|
exports.ContactPage = ContactPage;
|
|
4924
5091
|
exports.ContentRenderer = ContentRenderer;
|
|
5092
|
+
exports.ContractsPage = ContractsPage;
|
|
4925
5093
|
exports.DEFAULT_CONTACT_CATEGORIES = DEFAULT_CONTACT_CATEGORIES;
|
|
4926
5094
|
exports.Input = Input;
|
|
4927
5095
|
exports.Label = Label;
|