@burdenoff/website-sdk 2026.720.7 → 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.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/store/index.js +176 -40
- package/dist/store/index.js.map +1 -1
- package/dist/store/index.mjs +114 -2
- package/dist/store/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/store/index.js
CHANGED
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var reactHelmetAsync = require('react-helmet-async');
|
|
6
|
+
require('isomorphic-dompurify');
|
|
7
|
+
var ReactMarkdown = require('react-markdown');
|
|
8
|
+
var rehypeSanitize = require('rehype-sanitize');
|
|
9
|
+
var remarkGfm = require('remark-gfm');
|
|
10
|
+
require('lucide-react');
|
|
11
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
12
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
13
|
+
var clsx = require('clsx');
|
|
14
|
+
var tailwindMerge = require('tailwind-merge');
|
|
15
|
+
|
|
16
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
|
|
18
|
+
function _interopNamespace(e) {
|
|
19
|
+
if (e && e.__esModule) return e;
|
|
20
|
+
var n = Object.create(null);
|
|
21
|
+
if (e) {
|
|
22
|
+
Object.keys(e).forEach(function (k) {
|
|
23
|
+
if (k !== 'default') {
|
|
24
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
25
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return e[k]; }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
n.default = e;
|
|
33
|
+
return Object.freeze(n);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
37
|
+
var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
38
|
+
var rehypeSanitize__default = /*#__PURE__*/_interopDefault(rehypeSanitize);
|
|
39
|
+
var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
|
|
6
40
|
|
|
7
41
|
var __defProp = Object.defineProperty;
|
|
8
42
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -382,9 +416,9 @@ __publicField(_WebSDKClient, "MAX_CACHE_ENTRIES", 100);
|
|
|
382
416
|
__publicField(_WebSDKClient, "DEFAULT_TIMEOUT_MS", 12e3);
|
|
383
417
|
__publicField(_WebSDKClient, "DEFAULT_MAX_RETRIES", 1);
|
|
384
418
|
__publicField(_WebSDKClient, "RETRY_BASE_DELAY_MS", 400);
|
|
385
|
-
var WebSDKContext =
|
|
419
|
+
var WebSDKContext = React.createContext(null);
|
|
386
420
|
function useWebSDK() {
|
|
387
|
-
const client =
|
|
421
|
+
const client = React.useContext(WebSDKContext);
|
|
388
422
|
if (!client) {
|
|
389
423
|
throw new Error("useWebSDK must be used within a WebSDKProvider");
|
|
390
424
|
}
|
|
@@ -639,7 +673,7 @@ function ScrollRow({
|
|
|
639
673
|
products,
|
|
640
674
|
onProductClick
|
|
641
675
|
}) {
|
|
642
|
-
const ref =
|
|
676
|
+
const ref = React.useRef(null);
|
|
643
677
|
function scroll(dir) {
|
|
644
678
|
ref.current?.scrollBy({
|
|
645
679
|
left: dir === "r" ? 272 : -272,
|
|
@@ -805,10 +839,10 @@ function StoreHomePage({
|
|
|
805
839
|
seoKeywords
|
|
806
840
|
}) {
|
|
807
841
|
const client = useWebSDK();
|
|
808
|
-
const [grouped, setGrouped] =
|
|
809
|
-
const [loading, setLoading] =
|
|
810
|
-
const [error, setError] =
|
|
811
|
-
|
|
842
|
+
const [grouped, setGrouped] = React.useState(null);
|
|
843
|
+
const [loading, setLoading] = React.useState(true);
|
|
844
|
+
const [error, setError] = React.useState(null);
|
|
845
|
+
React.useEffect(() => {
|
|
812
846
|
let cancelled = false;
|
|
813
847
|
async function load() {
|
|
814
848
|
setLoading(true);
|
|
@@ -1252,31 +1286,31 @@ function StoreBrowsePage({
|
|
|
1252
1286
|
const typeOptions = buildTypeOptions(typeFilters);
|
|
1253
1287
|
const browseDescription = terminology?.browseDescription ?? "Browse all apps, workflows, nodes, and templates.";
|
|
1254
1288
|
const initial = parseUrlParams();
|
|
1255
|
-
const [search, setSearch] =
|
|
1256
|
-
const [inputValue, setInputValue] =
|
|
1257
|
-
const [type, setType] =
|
|
1258
|
-
const [pricingModel, setPricingModel] =
|
|
1259
|
-
const [category, setCategory] =
|
|
1260
|
-
const [sortBy, setSortBy] =
|
|
1261
|
-
const [featured, setFeatured] =
|
|
1262
|
-
const [offset, setOffset] =
|
|
1263
|
-
const [result, setResult] =
|
|
1264
|
-
const [allProducts, setAllProducts] =
|
|
1289
|
+
const [search, setSearch] = React.useState(initial.q);
|
|
1290
|
+
const [inputValue, setInputValue] = React.useState(initial.q);
|
|
1291
|
+
const [type, setType] = React.useState(initial.type);
|
|
1292
|
+
const [pricingModel, setPricingModel] = React.useState(initial.pricingModel);
|
|
1293
|
+
const [category, setCategory] = React.useState(initial.category);
|
|
1294
|
+
const [sortBy, setSortBy] = React.useState(initial.sortBy);
|
|
1295
|
+
const [featured, setFeatured] = React.useState(initial.featured);
|
|
1296
|
+
const [offset, setOffset] = React.useState(0);
|
|
1297
|
+
const [result, setResult] = React.useState(null);
|
|
1298
|
+
const [allProducts, setAllProducts] = React.useState(
|
|
1265
1299
|
[]
|
|
1266
1300
|
);
|
|
1267
|
-
const [categories, setCategories] =
|
|
1268
|
-
const [loading, setLoading] =
|
|
1269
|
-
const [loadingMore, setLoadingMore] =
|
|
1270
|
-
const [filtersOpen, setFiltersOpen] =
|
|
1271
|
-
const searchRef =
|
|
1301
|
+
const [categories, setCategories] = React.useState([]);
|
|
1302
|
+
const [loading, setLoading] = React.useState(true);
|
|
1303
|
+
const [loadingMore, setLoadingMore] = React.useState(false);
|
|
1304
|
+
const [filtersOpen, setFiltersOpen] = React.useState(false);
|
|
1305
|
+
const searchRef = React.useRef(null);
|
|
1272
1306
|
const PAGE_SIZE = 24;
|
|
1273
|
-
|
|
1307
|
+
React.useEffect(() => {
|
|
1274
1308
|
client.query(CATEGORIES_QUERY, {}).then((r) => {
|
|
1275
1309
|
if (r.data?.categories) setCategories(r.data.categories);
|
|
1276
1310
|
}).catch(() => {
|
|
1277
1311
|
});
|
|
1278
1312
|
}, [client]);
|
|
1279
|
-
|
|
1313
|
+
React.useEffect(() => {
|
|
1280
1314
|
let cancelled = false;
|
|
1281
1315
|
setOffset(0);
|
|
1282
1316
|
setLoading(true);
|
|
@@ -1610,11 +1644,11 @@ function WorkflowEmbed({
|
|
|
1610
1644
|
className,
|
|
1611
1645
|
onError
|
|
1612
1646
|
}) {
|
|
1613
|
-
const iframeRef =
|
|
1614
|
-
const [status, setStatus] =
|
|
1615
|
-
const [interactive, setInteractive] =
|
|
1616
|
-
const resolvedTheme =
|
|
1617
|
-
const src =
|
|
1647
|
+
const iframeRef = React.useRef(null);
|
|
1648
|
+
const [status, setStatus] = React.useState("loading");
|
|
1649
|
+
const [interactive, setInteractive] = React.useState(!clickToInteract);
|
|
1650
|
+
const resolvedTheme = React.useMemo(() => theme ?? detectTheme(), [theme]);
|
|
1651
|
+
const src = React.useMemo(() => {
|
|
1618
1652
|
const base = appUrl.replace(/\/+$/, "");
|
|
1619
1653
|
const params = new URLSearchParams({
|
|
1620
1654
|
productId,
|
|
@@ -1623,7 +1657,7 @@ function WorkflowEmbed({
|
|
|
1623
1657
|
if (hideCta) params.set("cta", "false");
|
|
1624
1658
|
return `${base}/embed/workflow?${params.toString()}`;
|
|
1625
1659
|
}, [appUrl, productId, resolvedTheme, hideCta]);
|
|
1626
|
-
|
|
1660
|
+
React.useEffect(() => {
|
|
1627
1661
|
const handler = (event) => {
|
|
1628
1662
|
if (event.source !== iframeRef.current?.contentWindow) return;
|
|
1629
1663
|
const data = event.data;
|
|
@@ -1675,6 +1709,108 @@ function WorkflowEmbed({
|
|
|
1675
1709
|
}
|
|
1676
1710
|
);
|
|
1677
1711
|
}
|
|
1712
|
+
var defaultComponents = {
|
|
1713
|
+
a: ({ href, children, ...props }) => {
|
|
1714
|
+
const isExternal = typeof href === "string" && (href.startsWith("http://") || href.startsWith("https://"));
|
|
1715
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1716
|
+
"a",
|
|
1717
|
+
{
|
|
1718
|
+
href,
|
|
1719
|
+
...props,
|
|
1720
|
+
...isExternal ? { target: "_blank", rel: "noopener noreferrer" } : { rel: "noopener noreferrer" },
|
|
1721
|
+
children
|
|
1722
|
+
}
|
|
1723
|
+
);
|
|
1724
|
+
}
|
|
1725
|
+
};
|
|
1726
|
+
function Markdown({
|
|
1727
|
+
children,
|
|
1728
|
+
className,
|
|
1729
|
+
inline,
|
|
1730
|
+
components
|
|
1731
|
+
}) {
|
|
1732
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1733
|
+
ReactMarkdown__default.default,
|
|
1734
|
+
{
|
|
1735
|
+
remarkPlugins: [remarkGfm__default.default],
|
|
1736
|
+
rehypePlugins: [rehypeSanitize__default.default],
|
|
1737
|
+
components: { ...defaultComponents, ...components },
|
|
1738
|
+
...inline ? { disallowedElements: ["p"], unwrapDisallowed: true } : {},
|
|
1739
|
+
children
|
|
1740
|
+
}
|
|
1741
|
+
);
|
|
1742
|
+
if (inline) {
|
|
1743
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className, children: content });
|
|
1744
|
+
}
|
|
1745
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: content });
|
|
1746
|
+
}
|
|
1747
|
+
React.createContext({
|
|
1748
|
+
product: null,
|
|
1749
|
+
loading: true,
|
|
1750
|
+
error: null,
|
|
1751
|
+
hasProvider: false,
|
|
1752
|
+
refetch: () => {
|
|
1753
|
+
}
|
|
1754
|
+
});
|
|
1755
|
+
function cn(...inputs) {
|
|
1756
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
1757
|
+
}
|
|
1758
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
1759
|
+
"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",
|
|
1760
|
+
{
|
|
1761
|
+
variants: {
|
|
1762
|
+
variant: {
|
|
1763
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
1764
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
1765
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
1766
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
1767
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
1768
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
1769
|
+
},
|
|
1770
|
+
size: {
|
|
1771
|
+
default: "h-9 px-4 py-2",
|
|
1772
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
1773
|
+
lg: "h-10 rounded-md px-8",
|
|
1774
|
+
icon: "h-9 w-9"
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
defaultVariants: {
|
|
1778
|
+
variant: "default",
|
|
1779
|
+
size: "default"
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
);
|
|
1783
|
+
var Button = React__namespace.forwardRef(
|
|
1784
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
1785
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
1786
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1787
|
+
Comp,
|
|
1788
|
+
{
|
|
1789
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
1790
|
+
ref,
|
|
1791
|
+
...props
|
|
1792
|
+
}
|
|
1793
|
+
);
|
|
1794
|
+
}
|
|
1795
|
+
);
|
|
1796
|
+
Button.displayName = "Button";
|
|
1797
|
+
var Input = React__namespace.forwardRef(
|
|
1798
|
+
({ className, type, ...props }, ref) => {
|
|
1799
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1800
|
+
"input",
|
|
1801
|
+
{
|
|
1802
|
+
type,
|
|
1803
|
+
className: cn(
|
|
1804
|
+
"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",
|
|
1805
|
+
className
|
|
1806
|
+
),
|
|
1807
|
+
ref,
|
|
1808
|
+
...props
|
|
1809
|
+
}
|
|
1810
|
+
);
|
|
1811
|
+
}
|
|
1812
|
+
);
|
|
1813
|
+
Input.displayName = "Input";
|
|
1678
1814
|
var ANIM_STYLES = `
|
|
1679
1815
|
@keyframes sdFadeUp {
|
|
1680
1816
|
from { opacity: 0; transform: translateY(16px); }
|
|
@@ -1794,13 +1930,13 @@ function StoreProductDetailPage({
|
|
|
1794
1930
|
productName
|
|
1795
1931
|
}) {
|
|
1796
1932
|
const client = useWebSDK();
|
|
1797
|
-
const [details, setDetails] =
|
|
1798
|
-
const [loading, setLoading] =
|
|
1799
|
-
const [error, setError] =
|
|
1800
|
-
const [activeScreenshot, setActiveScreenshot] =
|
|
1801
|
-
const [screenshotKey, setScreenshotKey] =
|
|
1802
|
-
const [embedFailed, setEmbedFailed] =
|
|
1803
|
-
|
|
1933
|
+
const [details, setDetails] = React.useState(null);
|
|
1934
|
+
const [loading, setLoading] = React.useState(true);
|
|
1935
|
+
const [error, setError] = React.useState(null);
|
|
1936
|
+
const [activeScreenshot, setActiveScreenshot] = React.useState(0);
|
|
1937
|
+
const [screenshotKey, setScreenshotKey] = React.useState(0);
|
|
1938
|
+
const [embedFailed, setEmbedFailed] = React.useState(false);
|
|
1939
|
+
React.useEffect(() => {
|
|
1804
1940
|
if (!slug && !id) {
|
|
1805
1941
|
setError("Product not found.");
|
|
1806
1942
|
setLoading(false);
|
|
@@ -2047,7 +2183,7 @@ function StoreProductDetailPage({
|
|
|
2047
2183
|
] }),
|
|
2048
2184
|
product.longDescription && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sd-fu sd-d4 mb-8", children: [
|
|
2049
2185
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-bold text-foreground mb-3", children: "About" }),
|
|
2050
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2186
|
+
/* @__PURE__ */ jsxRuntime.jsx(Markdown, { className: "prose prose-sm max-w-none text-muted-foreground leading-relaxed", children: product.longDescription })
|
|
2051
2187
|
] }),
|
|
2052
2188
|
publisher && /* @__PURE__ */ jsxRuntime.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: [
|
|
2053
2189
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold text-foreground mb-3", children: "Publisher" }),
|
|
@@ -2138,7 +2274,7 @@ function StoreProductDetailPage({
|
|
|
2138
2274
|
review.verifiedPurchase && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-emerald-500 font-medium", children: "Verified" })
|
|
2139
2275
|
] }),
|
|
2140
2276
|
review.title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm text-foreground mb-1", children: review.title }),
|
|
2141
|
-
review.comment && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2277
|
+
review.comment && /* @__PURE__ */ jsxRuntime.jsx(Markdown, { className: "text-sm text-muted-foreground leading-relaxed", children: review.comment }),
|
|
2142
2278
|
review.createdAt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-2", children: new Date(review.createdAt).toLocaleDateString(
|
|
2143
2279
|
"en-US",
|
|
2144
2280
|
{
|