@burdenoff/website-sdk 2026.720.8 → 2026.720.9

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.
@@ -1,6 +1,16 @@
1
+ import * as React from 'react';
1
2
  import { createContext, useState, useEffect, useRef, useMemo, useContext } from 'react';
2
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
4
  import { Helmet } from 'react-helmet-async';
5
+ import 'isomorphic-dompurify';
6
+ import ReactMarkdown from 'react-markdown';
7
+ import rehypeSanitize from 'rehype-sanitize';
8
+ import remarkGfm from 'remark-gfm';
9
+ import 'lucide-react';
10
+ import { Slot } from '@radix-ui/react-slot';
11
+ import { cva } from 'class-variance-authority';
12
+ import { clsx } from 'clsx';
13
+ import { twMerge } from 'tailwind-merge';
4
14
 
5
15
  var __defProp = Object.defineProperty;
6
16
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -1673,6 +1683,108 @@ function WorkflowEmbed({
1673
1683
  }
1674
1684
  );
1675
1685
  }
1686
+ var defaultComponents = {
1687
+ a: ({ href, children, ...props }) => {
1688
+ const isExternal = typeof href === "string" && (href.startsWith("http://") || href.startsWith("https://"));
1689
+ return /* @__PURE__ */ jsx(
1690
+ "a",
1691
+ {
1692
+ href,
1693
+ ...props,
1694
+ ...isExternal ? { target: "_blank", rel: "noopener noreferrer" } : { rel: "noopener noreferrer" },
1695
+ children
1696
+ }
1697
+ );
1698
+ }
1699
+ };
1700
+ function Markdown({
1701
+ children,
1702
+ className,
1703
+ inline,
1704
+ components
1705
+ }) {
1706
+ const content = /* @__PURE__ */ jsx(
1707
+ ReactMarkdown,
1708
+ {
1709
+ remarkPlugins: [remarkGfm],
1710
+ rehypePlugins: [rehypeSanitize],
1711
+ components: { ...defaultComponents, ...components },
1712
+ ...inline ? { disallowedElements: ["p"], unwrapDisallowed: true } : {},
1713
+ children
1714
+ }
1715
+ );
1716
+ if (inline) {
1717
+ return /* @__PURE__ */ jsx("span", { className, children: content });
1718
+ }
1719
+ return /* @__PURE__ */ jsx("div", { className, children: content });
1720
+ }
1721
+ createContext({
1722
+ product: null,
1723
+ loading: true,
1724
+ error: null,
1725
+ hasProvider: false,
1726
+ refetch: () => {
1727
+ }
1728
+ });
1729
+ function cn(...inputs) {
1730
+ return twMerge(clsx(inputs));
1731
+ }
1732
+ var buttonVariants = cva(
1733
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1734
+ {
1735
+ variants: {
1736
+ variant: {
1737
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
1738
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
1739
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
1740
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
1741
+ ghost: "hover:bg-accent hover:text-accent-foreground",
1742
+ link: "text-primary underline-offset-4 hover:underline"
1743
+ },
1744
+ size: {
1745
+ default: "h-9 px-4 py-2",
1746
+ sm: "h-8 rounded-md px-3 text-xs",
1747
+ lg: "h-10 rounded-md px-8",
1748
+ icon: "h-9 w-9"
1749
+ }
1750
+ },
1751
+ defaultVariants: {
1752
+ variant: "default",
1753
+ size: "default"
1754
+ }
1755
+ }
1756
+ );
1757
+ var Button = React.forwardRef(
1758
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
1759
+ const Comp = asChild ? Slot : "button";
1760
+ return /* @__PURE__ */ jsx(
1761
+ Comp,
1762
+ {
1763
+ className: cn(buttonVariants({ variant, size, className })),
1764
+ ref,
1765
+ ...props
1766
+ }
1767
+ );
1768
+ }
1769
+ );
1770
+ Button.displayName = "Button";
1771
+ var Input = React.forwardRef(
1772
+ ({ className, type, ...props }, ref) => {
1773
+ return /* @__PURE__ */ jsx(
1774
+ "input",
1775
+ {
1776
+ type,
1777
+ className: cn(
1778
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1779
+ className
1780
+ ),
1781
+ ref,
1782
+ ...props
1783
+ }
1784
+ );
1785
+ }
1786
+ );
1787
+ Input.displayName = "Input";
1676
1788
  var ANIM_STYLES = `
1677
1789
  @keyframes sdFadeUp {
1678
1790
  from { opacity: 0; transform: translateY(16px); }
@@ -2045,7 +2157,7 @@ function StoreProductDetailPage({
2045
2157
  ] }),
2046
2158
  product.longDescription && /* @__PURE__ */ jsxs("div", { className: "sd-fu sd-d4 mb-8", children: [
2047
2159
  /* @__PURE__ */ jsx("h2", { className: "text-lg font-bold text-foreground mb-3", children: "About" }),
2048
- /* @__PURE__ */ jsx("div", { className: "prose prose-sm max-w-none text-muted-foreground leading-relaxed whitespace-pre-line", children: product.longDescription })
2160
+ /* @__PURE__ */ jsx(Markdown, { className: "prose prose-sm max-w-none text-muted-foreground leading-relaxed", children: product.longDescription })
2049
2161
  ] }),
2050
2162
  publisher && /* @__PURE__ */ jsxs("div", { className: "sd-fu sd-d5 mb-8 p-4 rounded-xl border border-border bg-card hover:border-primary/30 transition-colors duration-300", children: [
2051
2163
  /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-foreground mb-3", children: "Publisher" }),
@@ -2136,7 +2248,7 @@ function StoreProductDetailPage({
2136
2248
  review.verifiedPurchase && /* @__PURE__ */ jsx("span", { className: "text-xs text-emerald-500 font-medium", children: "Verified" })
2137
2249
  ] }),
2138
2250
  review.title && /* @__PURE__ */ jsx("p", { className: "font-semibold text-sm text-foreground mb-1", children: review.title }),
2139
- review.comment && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground leading-relaxed", children: review.comment }),
2251
+ review.comment && /* @__PURE__ */ jsx(Markdown, { className: "text-sm text-muted-foreground leading-relaxed", children: review.comment }),
2140
2252
  review.createdAt && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-2", children: new Date(review.createdAt).toLocaleDateString(
2141
2253
  "en-US",
2142
2254
  {