@burdenoff/website-sdk 2026.720.5 → 2026.720.7
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/partners.js +44 -44
- package/dist/components/partners.js.map +1 -1
- package/dist/components/partners.mjs +40 -44
- package/dist/components/partners.mjs.map +1 -1
- package/dist/content/index.d.mts +25 -3
- package/dist/content/index.d.ts +25 -3
- package/dist/content/index.js +49 -46
- package/dist/content/index.js.map +1 -1
- package/dist/content/index.mjs +43 -47
- package/dist/content/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +47 -46
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -2
|
@@ -10,6 +10,10 @@ import { cva } from 'class-variance-authority';
|
|
|
10
10
|
import { clsx } from 'clsx';
|
|
11
11
|
import { twMerge } from 'tailwind-merge';
|
|
12
12
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
13
|
+
import DOMPurify from 'isomorphic-dompurify';
|
|
14
|
+
import ReactMarkdown from 'react-markdown';
|
|
15
|
+
import rehypeSanitize from 'rehype-sanitize';
|
|
16
|
+
import remarkGfm from 'remark-gfm';
|
|
13
17
|
|
|
14
18
|
var __defProp = Object.defineProperty;
|
|
15
19
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -813,43 +817,40 @@ function ContactPage({
|
|
|
813
817
|
] }) })
|
|
814
818
|
] });
|
|
815
819
|
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
820
|
+
var defaultComponents = {
|
|
821
|
+
a: ({ href, children, ...props }) => {
|
|
822
|
+
const isExternal = typeof href === "string" && (href.startsWith("http://") || href.startsWith("https://"));
|
|
823
|
+
return /* @__PURE__ */ jsx(
|
|
824
|
+
"a",
|
|
825
|
+
{
|
|
826
|
+
href,
|
|
827
|
+
...props,
|
|
828
|
+
...isExternal ? { target: "_blank", rel: "noopener noreferrer" } : { rel: "noopener noreferrer" },
|
|
829
|
+
children
|
|
830
|
+
}
|
|
831
|
+
);
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
function Markdown({
|
|
835
|
+
children,
|
|
836
|
+
className,
|
|
837
|
+
inline,
|
|
838
|
+
components
|
|
839
|
+
}) {
|
|
840
|
+
const content = /* @__PURE__ */ jsx(
|
|
841
|
+
ReactMarkdown,
|
|
842
|
+
{
|
|
843
|
+
remarkPlugins: [remarkGfm],
|
|
844
|
+
rehypePlugins: [rehypeSanitize],
|
|
845
|
+
components: { ...defaultComponents, ...components },
|
|
846
|
+
...inline ? { disallowedElements: ["p"], unwrapDisallowed: true } : {},
|
|
847
|
+
children
|
|
848
|
+
}
|
|
835
849
|
);
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
});
|
|
841
|
-
html = html.replace(/(^\d+\. .+$(\n^\d+\. .+$)*)/gm, (block) => {
|
|
842
|
-
const items = block.split("\n").map((line) => `<li>${line.replace(/^\d+\. /, "")}</li>`).join("");
|
|
843
|
-
return `<ol>${items}</ol>`;
|
|
844
|
-
});
|
|
845
|
-
html = html.replace(/^---$/gm, "<hr />");
|
|
846
|
-
html = html.split(/\n\n+/).map((block) => {
|
|
847
|
-
const trimmed = block.trim();
|
|
848
|
-
if (!trimmed) return "";
|
|
849
|
-
if (/^<(h[1-6]|ul|ol|pre|blockquote|hr)/.test(trimmed)) return trimmed;
|
|
850
|
-
return `<p>${trimmed.replace(/\n/g, "<br />")}</p>`;
|
|
851
|
-
}).join("\n");
|
|
852
|
-
return html;
|
|
850
|
+
if (inline) {
|
|
851
|
+
return /* @__PURE__ */ jsx("span", { className, children: content });
|
|
852
|
+
}
|
|
853
|
+
return /* @__PURE__ */ jsx("div", { className, children: content });
|
|
853
854
|
}
|
|
854
855
|
function ContentRenderer({
|
|
855
856
|
content,
|
|
@@ -857,20 +858,15 @@ function ContentRenderer({
|
|
|
857
858
|
className
|
|
858
859
|
}) {
|
|
859
860
|
if (format === "markdown") {
|
|
860
|
-
return /* @__PURE__ */ jsx(
|
|
861
|
-
"div",
|
|
862
|
-
{
|
|
863
|
-
className,
|
|
864
|
-
dangerouslySetInnerHTML: { __html: renderMarkdown(content) }
|
|
865
|
-
}
|
|
866
|
-
);
|
|
861
|
+
return /* @__PURE__ */ jsx(Markdown, { className, children: content });
|
|
867
862
|
}
|
|
868
863
|
if (format === "html") {
|
|
864
|
+
const sanitized = DOMPurify.sanitize(content);
|
|
869
865
|
return /* @__PURE__ */ jsx(
|
|
870
866
|
"div",
|
|
871
867
|
{
|
|
872
868
|
className,
|
|
873
|
-
dangerouslySetInnerHTML: { __html:
|
|
869
|
+
dangerouslySetInnerHTML: { __html: sanitized }
|
|
874
870
|
}
|
|
875
871
|
);
|
|
876
872
|
}
|