@burdenoff/website-sdk 2026.521.3 → 2026.521.5
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.mjs
CHANGED
|
@@ -261,9 +261,7 @@ function useWebSDKConfig() {
|
|
|
261
261
|
const client = useWebSDK();
|
|
262
262
|
return client.getConfig();
|
|
263
263
|
}
|
|
264
|
-
var
|
|
265
|
-
query PublicProduct($slug: String!) {
|
|
266
|
-
publicProduct(slug: $slug) {
|
|
264
|
+
var PRODUCT_FIELDS_BASE = `
|
|
267
265
|
id
|
|
268
266
|
name
|
|
269
267
|
slug
|
|
@@ -286,6 +284,19 @@ var PUBLIC_PRODUCT_QUERY = `
|
|
|
286
284
|
rybbitSiteId
|
|
287
285
|
notificationEmail
|
|
288
286
|
metadata
|
|
287
|
+
`;
|
|
288
|
+
var PUBLIC_PRODUCT_QUERY = `
|
|
289
|
+
query PublicProduct($slug: String!) {
|
|
290
|
+
publicProduct(slug: $slug) {
|
|
291
|
+
${PRODUCT_FIELDS_BASE}
|
|
292
|
+
resourceLinks
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
`;
|
|
296
|
+
var PUBLIC_PRODUCT_QUERY_FALLBACK = `
|
|
297
|
+
query PublicProductFallback($slug: String!) {
|
|
298
|
+
publicProduct(slug: $slug) {
|
|
299
|
+
${PRODUCT_FIELDS_BASE}
|
|
289
300
|
}
|
|
290
301
|
}
|
|
291
302
|
`;
|
|
@@ -313,10 +324,19 @@ function ProductProvider({ children, fallback }) {
|
|
|
313
324
|
setLoading(true);
|
|
314
325
|
setError(null);
|
|
315
326
|
try {
|
|
316
|
-
|
|
327
|
+
let result = await client.query(
|
|
317
328
|
PUBLIC_PRODUCT_QUERY,
|
|
318
329
|
{ slug: config.productSlug }
|
|
319
330
|
);
|
|
331
|
+
const schemaMissingResourceLinks = result.errors?.some(
|
|
332
|
+
(e) => /Cannot query field ["']?resourceLinks["']?/i.test(e?.message ?? "")
|
|
333
|
+
);
|
|
334
|
+
if (schemaMissingResourceLinks) {
|
|
335
|
+
result = await client.query(
|
|
336
|
+
PUBLIC_PRODUCT_QUERY_FALLBACK,
|
|
337
|
+
{ slug: config.productSlug }
|
|
338
|
+
);
|
|
339
|
+
}
|
|
320
340
|
if (result.errors?.length) {
|
|
321
341
|
setError(result.errors[0]?.message ?? "Unknown error");
|
|
322
342
|
} else if (result.data?.publicProduct) {
|
|
@@ -3386,6 +3406,74 @@ function SocialLinks({
|
|
|
3386
3406
|
)
|
|
3387
3407
|
] });
|
|
3388
3408
|
}
|
|
3409
|
+
var DEFAULT_LABELS = {
|
|
3410
|
+
docs: "Docs",
|
|
3411
|
+
community: "Community",
|
|
3412
|
+
careers: "Careers",
|
|
3413
|
+
team: "Team",
|
|
3414
|
+
companies: "Sister Companies"
|
|
3415
|
+
};
|
|
3416
|
+
var BURDENOFF_GROUP_DEFAULTS = {
|
|
3417
|
+
docs: null,
|
|
3418
|
+
// per-product → read from `Product.docsUrl`
|
|
3419
|
+
community: null,
|
|
3420
|
+
// per-product → caller supplies via prop until CMS field exists
|
|
3421
|
+
careers: "https://burdenoff.com/careers",
|
|
3422
|
+
team: "https://burdenoff.com/team",
|
|
3423
|
+
companies: "https://burdenoff.com/companies"
|
|
3424
|
+
};
|
|
3425
|
+
var DEFAULT_ORDER = [
|
|
3426
|
+
"docs",
|
|
3427
|
+
"community",
|
|
3428
|
+
"careers",
|
|
3429
|
+
"team",
|
|
3430
|
+
"companies"
|
|
3431
|
+
];
|
|
3432
|
+
var DEFAULT_ITEM_CLASS2 = "text-sm text-muted-foreground hover:text-foreground transition-colors";
|
|
3433
|
+
function isSafeUrl2(value) {
|
|
3434
|
+
const trimmed = value.trim();
|
|
3435
|
+
if (/^[/?#]/.test(trimmed)) return true;
|
|
3436
|
+
return /^(https?:|mailto:|tel:)/i.test(trimmed);
|
|
3437
|
+
}
|
|
3438
|
+
function ResourceLinks({
|
|
3439
|
+
links: linksProp,
|
|
3440
|
+
resources = DEFAULT_ORDER,
|
|
3441
|
+
labels = {},
|
|
3442
|
+
className = "space-y-2",
|
|
3443
|
+
itemClassName = DEFAULT_ITEM_CLASS2
|
|
3444
|
+
}) {
|
|
3445
|
+
const { product } = useProduct();
|
|
3446
|
+
function resolve(resource) {
|
|
3447
|
+
if (linksProp && resource in linksProp) {
|
|
3448
|
+
const override = linksProp[resource];
|
|
3449
|
+
if (override === void 0) ; else {
|
|
3450
|
+
return override;
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
const fromCms = product?.resourceLinks?.[resource];
|
|
3454
|
+
if (typeof fromCms === "string" && fromCms.length > 0) {
|
|
3455
|
+
return fromCms;
|
|
3456
|
+
}
|
|
3457
|
+
if (resource === "docs" && product?.docsUrl) {
|
|
3458
|
+
return product.docsUrl;
|
|
3459
|
+
}
|
|
3460
|
+
return BURDENOFF_GROUP_DEFAULTS[resource];
|
|
3461
|
+
}
|
|
3462
|
+
const items = resources.map((r) => ({ resource: r, url: resolve(r) })).filter(
|
|
3463
|
+
(x) => !!x.url && isSafeUrl2(x.url)
|
|
3464
|
+
);
|
|
3465
|
+
if (items.length === 0) return null;
|
|
3466
|
+
return /* @__PURE__ */ jsx("ul", { className, children: items.map(({ resource, url }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
3467
|
+
"a",
|
|
3468
|
+
{
|
|
3469
|
+
href: url,
|
|
3470
|
+
target: "_blank",
|
|
3471
|
+
rel: "noopener noreferrer",
|
|
3472
|
+
className: itemClassName,
|
|
3473
|
+
children: labels[resource] ?? DEFAULT_LABELS[resource]
|
|
3474
|
+
}
|
|
3475
|
+
) }, resource)) });
|
|
3476
|
+
}
|
|
3389
3477
|
function RybbitAnalytics({
|
|
3390
3478
|
siteId,
|
|
3391
3479
|
scriptUrl = "https://analytics.burdenoff.com/api/script.js",
|
|
@@ -4394,6 +4482,6 @@ function PressKitPage(props) {
|
|
|
4394
4482
|
] });
|
|
4395
4483
|
}
|
|
4396
4484
|
|
|
4397
|
-
export { BlogListPage, BlogPostPage, Button, ContactPage, ContentRenderer, DEFAULT_CONTACT_CATEGORIES, Input, Label, NewsletterForm, NewsletterPage, PageHead, PartnersPage, PressKitPage, PricingPage, PricingSection, ProductProvider, RybbitAnalytics, Select, SocialLinks, Textarea, UnsubscribePage, WaitlistForm, WaitlistPage, WebSDKClient, WebSDKProvider, buttonVariants, cn, useContentPage, useContentPages, useProduct, useProductConfig, useWebSDK, useWebSDKConfig };
|
|
4485
|
+
export { BlogListPage, BlogPostPage, Button, ContactPage, ContentRenderer, DEFAULT_CONTACT_CATEGORIES, Input, Label, NewsletterForm, NewsletterPage, PageHead, PartnersPage, PressKitPage, PricingPage, PricingSection, ProductProvider, ResourceLinks, RybbitAnalytics, Select, SocialLinks, Textarea, UnsubscribePage, WaitlistForm, WaitlistPage, WebSDKClient, WebSDKProvider, buttonVariants, cn, useContentPage, useContentPages, useProduct, useProductConfig, useWebSDK, useWebSDKConfig };
|
|
4398
4486
|
//# sourceMappingURL=index.mjs.map
|
|
4399
4487
|
//# sourceMappingURL=index.mjs.map
|