@burdenoff/website-sdk 2026.521.4 → 2026.521.6
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/components/contact.js.map +1 -1
- package/dist/components/contact.mjs.map +1 -1
- package/dist/components/newsletter.js.map +1 -1
- package/dist/components/newsletter.mjs.map +1 -1
- package/dist/components/partners.js.map +1 -1
- package/dist/components/partners.mjs.map +1 -1
- package/dist/components/resource-links.d.mts +28 -0
- package/dist/components/resource-links.d.ts +28 -0
- package/dist/components/resource-links.js +229 -0
- package/dist/components/resource-links.js.map +1 -0
- package/dist/components/resource-links.mjs +227 -0
- package/dist/components/resource-links.mjs.map +1 -0
- package/dist/components/social-links.js.map +1 -1
- package/dist/components/social-links.mjs.map +1 -1
- package/dist/components/waitlist.js.map +1 -1
- package/dist/components/waitlist.mjs.map +1 -1
- package/dist/content/index.js.map +1 -1
- package/dist/content/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +93 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +93 -5
- package/dist/index.mjs.map +1 -1
- package/dist/product/index.d.mts +8 -0
- package/dist/product/index.d.ts +8 -0
- package/dist/product/index.js +24 -4
- package/dist/product/index.js.map +1 -1
- package/dist/product/index.mjs +24 -4
- package/dist/product/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6,6 +6,7 @@ export { PlanCard, PricingPage, PricingProps, PricingSection } from './component
|
|
|
6
6
|
export { WaitlistForm, WaitlistFormProps, WaitlistPage, WaitlistPageProps } from './components/waitlist.mjs';
|
|
7
7
|
export { UnsubscribePage, UnsubscribePageProps } from './components/unsubscribe.mjs';
|
|
8
8
|
export { SocialLinks, SocialLinksProps, SocialPlatform } from './components/social-links.mjs';
|
|
9
|
+
export { Resource, ResourceLinks, ResourceLinksProps } from './components/resource-links.mjs';
|
|
9
10
|
export { RybbitAnalytics, RybbitAnalyticsProps } from './analytics/index.mjs';
|
|
10
11
|
export { PageHead, PageHeadProps } from './seo/index.mjs';
|
|
11
12
|
export { BlogListPage, BlogListPageProps, BlogPostPage, BlogPostPageProps, ContentPageData, ContentPageListData, ContentPageListItem, ContentRenderer, PressKitAsset, PressKitAssetCategory, PressKitPage, PressKitPageProps, useContentPage, useContentPages } from './content/index.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { PlanCard, PricingPage, PricingProps, PricingSection } from './component
|
|
|
6
6
|
export { WaitlistForm, WaitlistFormProps, WaitlistPage, WaitlistPageProps } from './components/waitlist.js';
|
|
7
7
|
export { UnsubscribePage, UnsubscribePageProps } from './components/unsubscribe.js';
|
|
8
8
|
export { SocialLinks, SocialLinksProps, SocialPlatform } from './components/social-links.js';
|
|
9
|
+
export { Resource, ResourceLinks, ResourceLinksProps } from './components/resource-links.js';
|
|
9
10
|
export { RybbitAnalytics, RybbitAnalyticsProps } from './analytics/index.js';
|
|
10
11
|
export { PageHead, PageHeadProps } from './seo/index.js';
|
|
11
12
|
export { BlogListPage, BlogListPageProps, BlogPostPage, BlogPostPageProps, ContentPageData, ContentPageListData, ContentPageListItem, ContentRenderer, PressKitAsset, PressKitAssetCategory, PressKitPage, PressKitPageProps, useContentPage, useContentPages } from './content/index.js';
|
package/dist/index.js
CHANGED
|
@@ -286,9 +286,7 @@ function useWebSDKConfig() {
|
|
|
286
286
|
const client = useWebSDK();
|
|
287
287
|
return client.getConfig();
|
|
288
288
|
}
|
|
289
|
-
var
|
|
290
|
-
query PublicProduct($slug: String!) {
|
|
291
|
-
publicProduct(slug: $slug) {
|
|
289
|
+
var PRODUCT_FIELDS_BASE = `
|
|
292
290
|
id
|
|
293
291
|
name
|
|
294
292
|
slug
|
|
@@ -311,6 +309,19 @@ var PUBLIC_PRODUCT_QUERY = `
|
|
|
311
309
|
rybbitSiteId
|
|
312
310
|
notificationEmail
|
|
313
311
|
metadata
|
|
312
|
+
`;
|
|
313
|
+
var PUBLIC_PRODUCT_QUERY = `
|
|
314
|
+
query PublicProduct($slug: String!) {
|
|
315
|
+
publicProduct(slug: $slug) {
|
|
316
|
+
${PRODUCT_FIELDS_BASE}
|
|
317
|
+
resourceLinks
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
`;
|
|
321
|
+
var PUBLIC_PRODUCT_QUERY_FALLBACK = `
|
|
322
|
+
query PublicProductFallback($slug: String!) {
|
|
323
|
+
publicProduct(slug: $slug) {
|
|
324
|
+
${PRODUCT_FIELDS_BASE}
|
|
314
325
|
}
|
|
315
326
|
}
|
|
316
327
|
`;
|
|
@@ -338,10 +349,19 @@ function ProductProvider({ children, fallback }) {
|
|
|
338
349
|
setLoading(true);
|
|
339
350
|
setError(null);
|
|
340
351
|
try {
|
|
341
|
-
|
|
352
|
+
let result = await client.query(
|
|
342
353
|
PUBLIC_PRODUCT_QUERY,
|
|
343
354
|
{ slug: config.productSlug }
|
|
344
355
|
);
|
|
356
|
+
const schemaMissingResourceLinks = result.errors?.some(
|
|
357
|
+
(e) => /Cannot query field ["']?resourceLinks["']?/i.test(e?.message ?? "")
|
|
358
|
+
);
|
|
359
|
+
if (schemaMissingResourceLinks) {
|
|
360
|
+
result = await client.query(
|
|
361
|
+
PUBLIC_PRODUCT_QUERY_FALLBACK,
|
|
362
|
+
{ slug: config.productSlug }
|
|
363
|
+
);
|
|
364
|
+
}
|
|
345
365
|
if (result.errors?.length) {
|
|
346
366
|
setError(result.errors[0]?.message ?? "Unknown error");
|
|
347
367
|
} else if (result.data?.publicProduct) {
|
|
@@ -3411,6 +3431,74 @@ function SocialLinks({
|
|
|
3411
3431
|
)
|
|
3412
3432
|
] });
|
|
3413
3433
|
}
|
|
3434
|
+
var DEFAULT_LABELS = {
|
|
3435
|
+
docs: "Docs",
|
|
3436
|
+
community: "Community",
|
|
3437
|
+
careers: "Careers",
|
|
3438
|
+
team: "Team",
|
|
3439
|
+
companies: "Sister Companies"
|
|
3440
|
+
};
|
|
3441
|
+
var BURDENOFF_GROUP_DEFAULTS = {
|
|
3442
|
+
docs: null,
|
|
3443
|
+
// per-product → read from `Product.docsUrl`
|
|
3444
|
+
community: null,
|
|
3445
|
+
// per-product → caller supplies via prop until CMS field exists
|
|
3446
|
+
careers: "https://burdenoff.com/careers",
|
|
3447
|
+
team: "https://burdenoff.com/team",
|
|
3448
|
+
companies: "https://burdenoff.com/companies"
|
|
3449
|
+
};
|
|
3450
|
+
var DEFAULT_ORDER = [
|
|
3451
|
+
"docs",
|
|
3452
|
+
"community",
|
|
3453
|
+
"careers",
|
|
3454
|
+
"team",
|
|
3455
|
+
"companies"
|
|
3456
|
+
];
|
|
3457
|
+
var DEFAULT_ITEM_CLASS2 = "text-sm text-muted-foreground hover:text-foreground transition-colors";
|
|
3458
|
+
function isSafeUrl2(value) {
|
|
3459
|
+
const trimmed = value.trim();
|
|
3460
|
+
if (/^[/?#]/.test(trimmed)) return true;
|
|
3461
|
+
return /^(https?:|mailto:|tel:)/i.test(trimmed);
|
|
3462
|
+
}
|
|
3463
|
+
function ResourceLinks({
|
|
3464
|
+
links: linksProp,
|
|
3465
|
+
resources = DEFAULT_ORDER,
|
|
3466
|
+
labels = {},
|
|
3467
|
+
className = "space-y-2",
|
|
3468
|
+
itemClassName = DEFAULT_ITEM_CLASS2
|
|
3469
|
+
}) {
|
|
3470
|
+
const { product } = useProduct();
|
|
3471
|
+
function resolve(resource) {
|
|
3472
|
+
if (linksProp && resource in linksProp) {
|
|
3473
|
+
const override = linksProp[resource];
|
|
3474
|
+
if (override === void 0) ; else {
|
|
3475
|
+
return override;
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3478
|
+
const fromCms = product?.resourceLinks?.[resource];
|
|
3479
|
+
if (typeof fromCms === "string" && fromCms.length > 0) {
|
|
3480
|
+
return fromCms;
|
|
3481
|
+
}
|
|
3482
|
+
if (resource === "docs" && product?.docsUrl) {
|
|
3483
|
+
return product.docsUrl;
|
|
3484
|
+
}
|
|
3485
|
+
return BURDENOFF_GROUP_DEFAULTS[resource];
|
|
3486
|
+
}
|
|
3487
|
+
const items = resources.map((r) => ({ resource: r, url: resolve(r) })).filter(
|
|
3488
|
+
(x) => !!x.url && isSafeUrl2(x.url)
|
|
3489
|
+
);
|
|
3490
|
+
if (items.length === 0) return null;
|
|
3491
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className, children: items.map(({ resource, url }) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3492
|
+
"a",
|
|
3493
|
+
{
|
|
3494
|
+
href: url,
|
|
3495
|
+
target: "_blank",
|
|
3496
|
+
rel: "noopener noreferrer",
|
|
3497
|
+
className: itemClassName,
|
|
3498
|
+
children: labels[resource] ?? DEFAULT_LABELS[resource]
|
|
3499
|
+
}
|
|
3500
|
+
) }, resource)) });
|
|
3501
|
+
}
|
|
3414
3502
|
function RybbitAnalytics({
|
|
3415
3503
|
siteId,
|
|
3416
3504
|
scriptUrl = "https://analytics.burdenoff.com/api/script.js",
|
|
@@ -4435,6 +4523,7 @@ exports.PressKitPage = PressKitPage;
|
|
|
4435
4523
|
exports.PricingPage = PricingPage;
|
|
4436
4524
|
exports.PricingSection = PricingSection;
|
|
4437
4525
|
exports.ProductProvider = ProductProvider;
|
|
4526
|
+
exports.ResourceLinks = ResourceLinks;
|
|
4438
4527
|
exports.RybbitAnalytics = RybbitAnalytics;
|
|
4439
4528
|
exports.Select = Select;
|
|
4440
4529
|
exports.SocialLinks = SocialLinks;
|