@burdenoff/website-sdk 2026.817.2 → 2026.824.2
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.map +1 -1
- package/dist/components/partners.mjs.map +1 -1
- package/dist/content/index.d.mts +5 -360
- package/dist/content/index.d.ts +5 -360
- package/dist/content/index.js +89 -3
- package/dist/content/index.js.map +1 -1
- package/dist/content/index.mjs +88 -4
- package/dist/content/index.mjs.map +1 -1
- package/dist/index-CFsUFxYo.d.ts +424 -0
- package/dist/index-CuMRiKGB.d.mts +424 -0
- package/dist/index.d.mts +3 -44
- package/dist/index.d.ts +3 -44
- package/dist/index.js +141 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +140 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1155,16 +1155,38 @@ var PUBLIC_CONTENT_PAGES_QUERY = `
|
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
1157
|
`;
|
|
1158
|
+
function resolveContentPageGate(resolvedProductId, hasProvider, productLoading) {
|
|
1159
|
+
if (resolvedProductId) return "fetch";
|
|
1160
|
+
return hasProvider && productLoading ? "wait" : "unavailable";
|
|
1161
|
+
}
|
|
1158
1162
|
function useContentPage(slug, options) {
|
|
1159
1163
|
const client = useWebSDK();
|
|
1160
1164
|
const config = useWebSDKConfig();
|
|
1161
|
-
const {
|
|
1165
|
+
const {
|
|
1166
|
+
product,
|
|
1167
|
+
loading: productLoading,
|
|
1168
|
+
error: productError,
|
|
1169
|
+
hasProvider
|
|
1170
|
+
} = useProduct();
|
|
1162
1171
|
const resolvedProductId = product?.id || config.productId;
|
|
1172
|
+
const gate = resolveContentPageGate(
|
|
1173
|
+
resolvedProductId,
|
|
1174
|
+
hasProvider,
|
|
1175
|
+
productLoading
|
|
1176
|
+
);
|
|
1163
1177
|
const [data, setData] = useState(null);
|
|
1164
1178
|
const [loading, setLoading] = useState(true);
|
|
1165
1179
|
const [error, setError] = useState(null);
|
|
1166
1180
|
const fetchPage = useCallback(async () => {
|
|
1167
|
-
if (
|
|
1181
|
+
if (gate === "wait") return;
|
|
1182
|
+
if (gate === "unavailable") {
|
|
1183
|
+
setData(null);
|
|
1184
|
+
setError(
|
|
1185
|
+
productError ?? "Product unavailable \u2014 cannot load content page"
|
|
1186
|
+
);
|
|
1187
|
+
setLoading(false);
|
|
1188
|
+
return;
|
|
1189
|
+
}
|
|
1168
1190
|
setLoading(true);
|
|
1169
1191
|
setError(null);
|
|
1170
1192
|
try {
|
|
@@ -1189,7 +1211,7 @@ function useContentPage(slug, options) {
|
|
|
1189
1211
|
} finally {
|
|
1190
1212
|
setLoading(false);
|
|
1191
1213
|
}
|
|
1192
|
-
}, [client, resolvedProductId, slug, options?.resolve]);
|
|
1214
|
+
}, [client, gate, productError, resolvedProductId, slug, options?.resolve]);
|
|
1193
1215
|
useEffect(() => {
|
|
1194
1216
|
fetchPage();
|
|
1195
1217
|
}, [fetchPage]);
|
|
@@ -2027,6 +2049,7 @@ var NO_APPLICATION_HINT = "Please use the same email address you applied with \u
|
|
|
2027
2049
|
function isNoApplicationError(message) {
|
|
2028
2050
|
return /no application|not found/i.test(message);
|
|
2029
2051
|
}
|
|
2052
|
+
var OTHER_POSITION = "__other__";
|
|
2030
2053
|
function CareersSubmissionForm({
|
|
2031
2054
|
productName,
|
|
2032
2055
|
recaptchaSiteKey,
|
|
@@ -2046,6 +2069,9 @@ function CareersSubmissionForm({
|
|
|
2046
2069
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
2047
2070
|
const [submittedMessage, setSubmittedMessage] = useState(null);
|
|
2048
2071
|
const [formError, setFormError] = useState(null);
|
|
2072
|
+
const [useFreeTextPosition, setUseFreeTextPosition] = useState(
|
|
2073
|
+
postings.length === 0
|
|
2074
|
+
);
|
|
2049
2075
|
const handleSubmit = async (e) => {
|
|
2050
2076
|
e.preventDefault();
|
|
2051
2077
|
setFormError(null);
|
|
@@ -2062,7 +2088,7 @@ function CareersSubmissionForm({
|
|
|
2062
2088
|
const repoUrl = (formData.get("repoUrl") ?? "").trim();
|
|
2063
2089
|
const videoUrl = (formData.get("videoUrl") ?? "").trim();
|
|
2064
2090
|
const notes = (formData.get("notes") ?? "").trim();
|
|
2065
|
-
const selectedPosting = postings.length > 0 ? postings.find((p) => p.id === positionValue) : void 0;
|
|
2091
|
+
const selectedPosting = postings.length > 0 && !useFreeTextPosition ? postings.find((p) => p.id === positionValue) : void 0;
|
|
2066
2092
|
const position = selectedPosting ? selectedPosting.title : positionValue;
|
|
2067
2093
|
if (!email) {
|
|
2068
2094
|
setFormError("Please enter the email address you applied with.");
|
|
@@ -2162,28 +2188,53 @@ function CareersSubmissionForm({
|
|
|
2162
2188
|
] }),
|
|
2163
2189
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2164
2190
|
/* @__PURE__ */ jsx(Label, { htmlFor: "position", children: "Position *" }),
|
|
2165
|
-
postings.length > 0 ? /* @__PURE__ */ jsxs(
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2191
|
+
postings.length > 0 && !useFreeTextPosition ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2192
|
+
/* @__PURE__ */ jsxs(
|
|
2193
|
+
"select",
|
|
2194
|
+
{
|
|
2195
|
+
id: "position",
|
|
2196
|
+
name: "position",
|
|
2197
|
+
required: true,
|
|
2198
|
+
defaultValue: "",
|
|
2199
|
+
onChange: (e) => {
|
|
2200
|
+
if (e.target.value === OTHER_POSITION) {
|
|
2201
|
+
setUseFreeTextPosition(true);
|
|
2202
|
+
}
|
|
2203
|
+
},
|
|
2204
|
+
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring",
|
|
2205
|
+
children: [
|
|
2206
|
+
/* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select a role" }),
|
|
2207
|
+
postings.map((p) => /* @__PURE__ */ jsx("option", { value: p.id, children: p.title }, p.id)),
|
|
2208
|
+
/* @__PURE__ */ jsx("option", { value: OTHER_POSITION, children: "My role isn't listed" })
|
|
2209
|
+
]
|
|
2210
|
+
}
|
|
2211
|
+
),
|
|
2212
|
+
/* @__PURE__ */ jsxs("p", { className: "mt-1 text-xs text-muted-foreground", children: [
|
|
2213
|
+
"Applied to a role that's since closed? Choose",
|
|
2214
|
+
" ",
|
|
2215
|
+
/* @__PURE__ */ jsx("em", { children: "My role isn't listed" }),
|
|
2216
|
+
" and type it in \u2014 you can still submit."
|
|
2217
|
+
] })
|
|
2218
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2219
|
+
/* @__PURE__ */ jsx(
|
|
2220
|
+
Input,
|
|
2221
|
+
{
|
|
2222
|
+
id: "position",
|
|
2223
|
+
name: "position",
|
|
2224
|
+
required: true,
|
|
2225
|
+
placeholder: "Role you applied for"
|
|
2226
|
+
}
|
|
2227
|
+
),
|
|
2228
|
+
postings.length > 0 && /* @__PURE__ */ jsx(
|
|
2229
|
+
"button",
|
|
2230
|
+
{
|
|
2231
|
+
type: "button",
|
|
2232
|
+
onClick: () => setUseFreeTextPosition(false),
|
|
2233
|
+
className: "mt-1 text-xs text-accent hover:underline",
|
|
2234
|
+
children: "Choose from open roles instead"
|
|
2235
|
+
}
|
|
2236
|
+
)
|
|
2237
|
+
] })
|
|
2187
2238
|
] }),
|
|
2188
2239
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2189
2240
|
/* @__PURE__ */ jsx(Label, { htmlFor: "repoUrl", children: "GitHub repository URL *" }),
|
|
@@ -4729,6 +4780,25 @@ var PUBLIC_JOB_POSTING_QUERY = (
|
|
|
4729
4780
|
}
|
|
4730
4781
|
`
|
|
4731
4782
|
);
|
|
4783
|
+
var PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY = (
|
|
4784
|
+
/* GraphQL */
|
|
4785
|
+
`
|
|
4786
|
+
query PublicJobPostingsForSubmission(
|
|
4787
|
+
$productId: ID
|
|
4788
|
+
$limit: Int
|
|
4789
|
+
$offset: Int
|
|
4790
|
+
) {
|
|
4791
|
+
publicJobPostingsForSubmission(
|
|
4792
|
+
productId: $productId
|
|
4793
|
+
limit: $limit
|
|
4794
|
+
offset: $offset
|
|
4795
|
+
) {
|
|
4796
|
+
id
|
|
4797
|
+
title
|
|
4798
|
+
}
|
|
4799
|
+
}
|
|
4800
|
+
`
|
|
4801
|
+
);
|
|
4732
4802
|
async function fetchPublicJobPostings(client, options) {
|
|
4733
4803
|
const result = await client.query(PUBLIC_JOB_POSTINGS_QUERY, {
|
|
4734
4804
|
productId: options?.productId,
|
|
@@ -4750,6 +4820,17 @@ async function fetchPublicJobPosting(client, slug, options) {
|
|
|
4750
4820
|
}
|
|
4751
4821
|
return result.data?.publicJobPosting ?? null;
|
|
4752
4822
|
}
|
|
4823
|
+
async function fetchPublicJobPostingsForSubmission(client, options) {
|
|
4824
|
+
const result = await client.query(PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY, {
|
|
4825
|
+
productId: options?.productId,
|
|
4826
|
+
limit: options?.limit ?? 50,
|
|
4827
|
+
offset: options?.offset ?? 0
|
|
4828
|
+
});
|
|
4829
|
+
if (result.errors?.length) {
|
|
4830
|
+
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
4831
|
+
}
|
|
4832
|
+
return result.data?.publicJobPostingsForSubmission ?? [];
|
|
4833
|
+
}
|
|
4753
4834
|
function usePublicJobPostings(options) {
|
|
4754
4835
|
const client = useWebSDK();
|
|
4755
4836
|
const config = useWebSDKConfig();
|
|
@@ -4782,6 +4863,38 @@ function usePublicJobPostings(options) {
|
|
|
4782
4863
|
}, [fetchPostings]);
|
|
4783
4864
|
return { postings, loading, error, refetch: fetchPostings };
|
|
4784
4865
|
}
|
|
4866
|
+
function usePublicJobPostingsForSubmission(options) {
|
|
4867
|
+
const client = useWebSDK();
|
|
4868
|
+
const config = useWebSDKConfig();
|
|
4869
|
+
const { product } = useProduct();
|
|
4870
|
+
const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
|
|
4871
|
+
const [postings, setPostings] = useState([]);
|
|
4872
|
+
const [loading, setLoading] = useState(true);
|
|
4873
|
+
const [error, setError] = useState(null);
|
|
4874
|
+
const fetchPostings = useCallback(async () => {
|
|
4875
|
+
setLoading(true);
|
|
4876
|
+
setError(null);
|
|
4877
|
+
try {
|
|
4878
|
+
const items = await fetchPublicJobPostingsForSubmission(client, {
|
|
4879
|
+
productId: resolvedProductId,
|
|
4880
|
+
limit: options?.limit,
|
|
4881
|
+
offset: options?.offset
|
|
4882
|
+
});
|
|
4883
|
+
setPostings(items);
|
|
4884
|
+
} catch (err) {
|
|
4885
|
+
setError(
|
|
4886
|
+
err instanceof Error ? err.message : "Failed to fetch job postings"
|
|
4887
|
+
);
|
|
4888
|
+
setPostings([]);
|
|
4889
|
+
} finally {
|
|
4890
|
+
setLoading(false);
|
|
4891
|
+
}
|
|
4892
|
+
}, [client, resolvedProductId, options?.limit, options?.offset]);
|
|
4893
|
+
useEffect(() => {
|
|
4894
|
+
fetchPostings();
|
|
4895
|
+
}, [fetchPostings]);
|
|
4896
|
+
return { postings, loading, error, refetch: fetchPostings };
|
|
4897
|
+
}
|
|
4785
4898
|
function usePublicJobPosting(slug, options) {
|
|
4786
4899
|
const client = useWebSDK();
|
|
4787
4900
|
const config = useWebSDKConfig();
|
|
@@ -9511,6 +9624,6 @@ var ECOSYSTEM_PRODUCTS = [
|
|
|
9511
9624
|
}
|
|
9512
9625
|
];
|
|
9513
9626
|
|
|
9514
|
-
export { BlogListPage, BlogPostPage, Button, CareersApplyForm, CareersSubmissionForm, CaseStudiesListPage, CaseStudyPage, ChangelogPage, ContactPage, ContentRenderer, ContractsPage, DEFAULT_CONTACT_CATEGORIES, ECOSYSTEM_PRODUCTS, ElectronDownloadLink, Input, Label, LaunchCountdown, Markdown, NewsletterForm, NewsletterPage, PageHead, PartnersPage, PressKitPage, PricingPage, PricingSection, ProblemsSolvedSection, ProductCard, ProductProvider, ResourceLinks, RybbitAnalytics, Select, SocialLinks, StarRating, StoreBrowsePage, StoreHomePage, StoreProductDetailPage, Textarea, TypeBadge, UnsubscribePage, WaitlistForm, WaitlistPage, WebSDKClient, WebSDKProvider, WebsiteSwitcher, buttonVariants, cn, detectElectronPlatform, fetchPublicJobPosting, fetchPublicJobPostings, formatDownloads, formatPrice2 as formatPrice, isValidUrl, useContentPage, useContentPages, useProduct, useProductConfig, usePublicJobPosting, usePublicJobPostings, useWebSDK, useWebSDKConfig };
|
|
9627
|
+
export { BlogListPage, BlogPostPage, Button, CareersApplyForm, CareersSubmissionForm, CaseStudiesListPage, CaseStudyPage, ChangelogPage, ContactPage, ContentRenderer, ContractsPage, DEFAULT_CONTACT_CATEGORIES, ECOSYSTEM_PRODUCTS, ElectronDownloadLink, Input, Label, LaunchCountdown, Markdown, NewsletterForm, NewsletterPage, PageHead, PartnersPage, PressKitPage, PricingPage, PricingSection, ProblemsSolvedSection, ProductCard, ProductProvider, ResourceLinks, RybbitAnalytics, Select, SocialLinks, StarRating, StoreBrowsePage, StoreHomePage, StoreProductDetailPage, Textarea, TypeBadge, UnsubscribePage, WaitlistForm, WaitlistPage, WebSDKClient, WebSDKProvider, WebsiteSwitcher, buttonVariants, cn, detectElectronPlatform, fetchPublicJobPosting, fetchPublicJobPostings, fetchPublicJobPostingsForSubmission, formatDownloads, formatPrice2 as formatPrice, isValidUrl, useContentPage, useContentPages, useProduct, useProductConfig, usePublicJobPosting, usePublicJobPostings, usePublicJobPostingsForSubmission, useWebSDK, useWebSDKConfig };
|
|
9515
9628
|
//# sourceMappingURL=index.mjs.map
|
|
9516
9629
|
//# sourceMappingURL=index.mjs.map
|