@flamingo-stack/openframe-frontend-core 0.0.315 → 0.0.316
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/{chunk-7U4YFQX2.js → chunk-2Y4DLBFO.js} +96 -92
- package/dist/{chunk-7U4YFQX2.js.map → chunk-2Y4DLBFO.js.map} +1 -1
- package/dist/{chunk-HATCNFQL.cjs → chunk-4MCMPYEM.cjs} +12 -12
- package/dist/{chunk-HATCNFQL.cjs.map → chunk-4MCMPYEM.cjs.map} +1 -1
- package/dist/{chunk-VY5YF4B7.js → chunk-4NVA6W3J.js} +27 -22
- package/dist/chunk-4NVA6W3J.js.map +1 -0
- package/dist/chunk-4V3TCOFC.cjs +394 -0
- package/dist/chunk-4V3TCOFC.cjs.map +1 -0
- package/dist/{chunk-A2H6TFS4.cjs → chunk-63A53WQN.cjs} +33 -33
- package/dist/{chunk-A2H6TFS4.cjs.map → chunk-63A53WQN.cjs.map} +1 -1
- package/dist/{chunk-6W54MBU2.js → chunk-64DZ2J7Q.js} +5 -5
- package/dist/{chunk-47JZOP7Y.js → chunk-6KERXOFE.js} +3 -3
- package/dist/{chunk-JALO4TAZ.js → chunk-AI5X5JTD.js} +4 -4
- package/dist/chunk-CSLMCBZV.js +1464 -0
- package/dist/chunk-CSLMCBZV.js.map +1 -0
- package/dist/{chunk-BSAFGQVW.cjs → chunk-CUNMBP3A.cjs} +13 -13
- package/dist/{chunk-BSAFGQVW.cjs.map → chunk-CUNMBP3A.cjs.map} +1 -1
- package/dist/{chunk-TVNILN2F.cjs → chunk-DHVL36CA.cjs} +40 -40
- package/dist/{chunk-TVNILN2F.cjs.map → chunk-DHVL36CA.cjs.map} +1 -1
- package/dist/chunk-FCEVVNWY.cjs +1916 -0
- package/dist/chunk-FCEVVNWY.cjs.map +1 -0
- package/dist/chunk-FOVX3W3C.cjs +1464 -0
- package/dist/chunk-FOVX3W3C.cjs.map +1 -0
- package/dist/{chunk-4D37W55K.js → chunk-GHVVOST5.js} +95 -116
- package/dist/chunk-GHVVOST5.js.map +1 -0
- package/dist/{chunk-TRSDXD23.js → chunk-JAZM3A7E.js} +2 -2
- package/dist/{chunk-TK6OABYF.js → chunk-JEBL5PQK.js} +21 -35
- package/dist/{chunk-TK6OABYF.js.map → chunk-JEBL5PQK.js.map} +1 -1
- package/dist/{chunk-5ATH263N.cjs → chunk-L5JSGNT3.cjs} +35 -35
- package/dist/{chunk-5ATH263N.cjs.map → chunk-L5JSGNT3.cjs.map} +1 -1
- package/dist/{chunk-TQ7CMFSY.cjs → chunk-LAMDFGE3.cjs} +41 -36
- package/dist/chunk-LAMDFGE3.cjs.map +1 -0
- package/dist/{chunk-V4IIBNTA.js → chunk-LQHMXPOJ.js} +5 -5
- package/dist/{chunk-LGLPNWS6.cjs → chunk-LWNPMLIH.cjs} +3 -3
- package/dist/{chunk-LGLPNWS6.cjs.map → chunk-LWNPMLIH.cjs.map} +1 -1
- package/dist/chunk-M3NULYCR.js +1916 -0
- package/dist/chunk-M3NULYCR.js.map +1 -0
- package/dist/{chunk-MOOV4ORG.js → chunk-OKGZK6TT.js} +3 -3
- package/dist/{chunk-WFHNXCI3.cjs → chunk-OLEW7FYZ.cjs} +123 -144
- package/dist/chunk-OLEW7FYZ.cjs.map +1 -0
- package/dist/chunk-PIJ4JLJU.js +394 -0
- package/dist/chunk-PIJ4JLJU.js.map +1 -0
- package/dist/{chunk-E4CQ4RUG.js → chunk-Q4AMYLKX.js} +11 -11
- package/dist/{chunk-FQOTC3UU.cjs → chunk-QJGRP2YE.cjs} +4 -4
- package/dist/{chunk-FQOTC3UU.cjs.map → chunk-QJGRP2YE.cjs.map} +1 -1
- package/dist/{chunk-ZPK5HW7B.cjs → chunk-UGDGUO26.cjs} +3 -3
- package/dist/{chunk-ZPK5HW7B.cjs.map → chunk-UGDGUO26.cjs.map} +1 -1
- package/dist/{chunk-QW6OL4NY.cjs → chunk-VCE3ZEN3.cjs} +5 -5
- package/dist/{chunk-QW6OL4NY.cjs.map → chunk-VCE3ZEN3.cjs.map} +1 -1
- package/dist/{chunk-2JPSWDSM.cjs → chunk-XAQJ4ZLY.cjs} +447 -443
- package/dist/{chunk-2JPSWDSM.cjs.map → chunk-XAQJ4ZLY.cjs.map} +1 -1
- package/dist/{chunk-2MLMZAK4.js → chunk-YFGDZFUG.js} +4 -4
- package/dist/{chunk-VFIWQGJZ.js → chunk-Z3YORGG4.js} +2 -2
- package/dist/{chunk-OSEKWT6X.cjs → chunk-ZYGVJXJ5.cjs} +33 -47
- package/dist/chunk-ZYGVJXJ5.cjs.map +1 -0
- package/dist/components/case-studies/index.cjs +18 -18
- package/dist/components/case-studies/index.cjs.map +1 -1
- package/dist/components/case-studies/index.js +8 -8
- package/dist/components/chat/index.cjs +8 -8
- package/dist/components/chat/index.js +7 -7
- package/dist/components/contact/index.cjs +9 -9
- package/dist/components/contact/index.js +8 -8
- package/dist/components/docs/doc-viewer.d.ts +4 -0
- package/dist/components/docs/doc-viewer.d.ts.map +1 -1
- package/dist/components/docs/index.cjs +11 -11
- package/dist/components/docs/index.js +10 -10
- package/dist/components/embeds/index.cjs +9 -9
- package/dist/components/embeds/index.js +8 -8
- package/dist/components/faq/faq-document-page.d.ts +18 -20
- package/dist/components/faq/faq-document-page.d.ts.map +1 -1
- package/dist/components/faq/index.cjs +10 -10
- package/dist/components/faq/index.js +9 -9
- package/dist/components/features/index.cjs +8 -8
- package/dist/components/features/index.js +7 -7
- package/dist/components/help-center-pages/delivery-page.d.ts +27 -0
- package/dist/components/help-center-pages/delivery-page.d.ts.map +1 -0
- package/dist/components/help-center-pages/index.cjs +164 -0
- package/dist/components/help-center-pages/index.cjs.map +1 -0
- package/dist/components/help-center-pages/index.d.ts +25 -0
- package/dist/components/help-center-pages/index.d.ts.map +1 -0
- package/dist/components/help-center-pages/index.js +164 -0
- package/dist/components/help-center-pages/index.js.map +1 -0
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts +41 -0
- package/dist/components/help-center-pages/onboarding-guides-catalog-page.d.ts.map +1 -0
- package/dist/components/help-center-pages/product-releases-list-page.d.ts +34 -0
- package/dist/components/help-center-pages/product-releases-list-page.d.ts.map +1 -0
- package/dist/components/help-center-pages/roadmap-page.d.ts +40 -0
- package/dist/components/help-center-pages/roadmap-page.d.ts.map +1 -0
- package/dist/components/icons/index.cjs +3 -3
- package/dist/components/icons/index.js +2 -2
- package/dist/components/index.cjs +177 -1555
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +348 -1726
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/page-layout.d.ts +4 -1
- package/dist/components/layout/page-layout.d.ts.map +1 -1
- package/dist/components/layout/title-block.d.ts +5 -1
- package/dist/components/layout/title-block.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +8 -8
- package/dist/components/navigation/index.js +7 -7
- package/dist/components/onboarding-guides/index.cjs +15 -364
- package/dist/components/onboarding-guides/index.cjs.map +1 -1
- package/dist/components/onboarding-guides/index.js +20 -369
- package/dist/components/onboarding-guides/index.js.map +1 -1
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts +9 -1
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -1
- package/dist/components/related-content/index.cjs +10 -10
- package/dist/components/related-content/index.js +9 -9
- package/dist/components/shared/dev-section/dev-section-page.d.ts +7 -1
- package/dist/components/shared/dev-section/dev-section-page.d.ts.map +1 -1
- package/dist/components/shared/dev-section/dev-section-view.d.ts +7 -1
- package/dist/components/shared/dev-section/dev-section-view.d.ts.map +1 -1
- package/dist/components/shared/legal-document/legal-document-page.d.ts +5 -1
- package/dist/components/shared/legal-document/legal-document-page.d.ts.map +1 -1
- package/dist/components/shared/product-release/release-detail-page.d.ts +11 -2
- package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
- package/dist/components/tickets/help-center-list.d.ts +5 -1
- package/dist/components/tickets/help-center-list.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +15 -1882
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +28 -1895
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +53 -53
- package/dist/components/ui/file-manager/index.cjs.map +1 -1
- package/dist/components/ui/file-manager/index.js +4 -4
- package/dist/components/ui/index.cjs +8 -8
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +7 -7
- package/dist/hooks/index.cjs +5 -5
- package/dist/hooks/index.js +4 -4
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/package.json +7 -1
- package/src/components/docs/doc-viewer.tsx +21 -34
- package/src/components/faq/faq-document-page.tsx +33 -60
- package/src/components/help-center-pages/delivery-page.tsx +45 -0
- package/src/components/help-center-pages/index.ts +41 -0
- package/src/components/help-center-pages/onboarding-guides-catalog-page.tsx +66 -0
- package/src/components/help-center-pages/product-releases-list-page.tsx +58 -0
- package/src/components/help-center-pages/roadmap-page.tsx +68 -0
- package/src/components/layout/page-layout.tsx +11 -0
- package/src/components/layout/title-block.tsx +15 -2
- package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +30 -19
- package/src/components/shared/dev-section/dev-section-page.tsx +29 -19
- package/src/components/shared/dev-section/dev-section-view.tsx +26 -19
- package/src/components/shared/legal-document/legal-document-page.tsx +19 -23
- package/src/components/shared/product-release/release-detail-page.tsx +36 -36
- package/src/components/tickets/help-center-list.tsx +11 -3
- package/dist/chunk-4D37W55K.js.map +0 -1
- package/dist/chunk-OSEKWT6X.cjs.map +0 -1
- package/dist/chunk-TQ7CMFSY.cjs.map +0 -1
- package/dist/chunk-VY5YF4B7.js.map +0 -1
- package/dist/chunk-WFHNXCI3.cjs.map +0 -1
- /package/dist/{chunk-6W54MBU2.js.map → chunk-64DZ2J7Q.js.map} +0 -0
- /package/dist/{chunk-47JZOP7Y.js.map → chunk-6KERXOFE.js.map} +0 -0
- /package/dist/{chunk-JALO4TAZ.js.map → chunk-AI5X5JTD.js.map} +0 -0
- /package/dist/{chunk-TRSDXD23.js.map → chunk-JAZM3A7E.js.map} +0 -0
- /package/dist/{chunk-V4IIBNTA.js.map → chunk-LQHMXPOJ.js.map} +0 -0
- /package/dist/{chunk-MOOV4ORG.js.map → chunk-OKGZK6TT.js.map} +0 -0
- /package/dist/{chunk-E4CQ4RUG.js.map → chunk-Q4AMYLKX.js.map} +0 -0
- /package/dist/{chunk-2MLMZAK4.js.map → chunk-YFGDZFUG.js.map} +0 -0
- /package/dist/{chunk-VFIWQGJZ.js.map → chunk-Z3YORGG4.js.map} +0 -0
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
SelectValue,
|
|
13
13
|
Textarea,
|
|
14
14
|
useChatAttachments
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2Y4DLBFO.js";
|
|
16
16
|
import {
|
|
17
17
|
useContactSubmission,
|
|
18
18
|
useHumanitySignals
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Q4AMYLKX.js";
|
|
20
20
|
import {
|
|
21
21
|
Button,
|
|
22
22
|
Input
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-AI5X5JTD.js";
|
|
24
24
|
|
|
25
25
|
// src/components/contact/contact-form.tsx
|
|
26
26
|
import { useState } from "react";
|
|
@@ -372,4 +372,4 @@ function ContactForm({
|
|
|
372
372
|
export {
|
|
373
373
|
ContactForm
|
|
374
374
|
};
|
|
375
|
-
//# sourceMappingURL=chunk-
|
|
375
|
+
//# sourceMappingURL=chunk-YFGDZFUG.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PageLayout,
|
|
4
4
|
formatBioText,
|
|
5
5
|
getProxiedImageUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2Y4DLBFO.js";
|
|
7
7
|
import {
|
|
8
8
|
useChatRuntime
|
|
9
9
|
} from "./chunk-2FI3USTC.js";
|
|
@@ -146,4 +146,4 @@ export {
|
|
|
146
146
|
DetailPageSkeleton,
|
|
147
147
|
ArticleAuthorByline
|
|
148
148
|
};
|
|
149
|
-
//# sourceMappingURL=chunk-
|
|
149
|
+
//# sourceMappingURL=chunk-Z3YORGG4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkUGDGUO26cjs = require('./chunk-UGDGUO26.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -12,13 +12,12 @@ var _chunkZPK5HW7Bcjs = require('./chunk-ZPK5HW7B.cjs');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
var _chunkXAQJ4ZLYcjs = require('./chunk-XAQJ4ZLY.cjs');
|
|
15
16
|
|
|
16
|
-
var _chunk2JPSWDSMcjs = require('./chunk-2JPSWDSM.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
var _chunk5ATH263Ncjs = require('./chunk-5ATH263N.cjs');
|
|
20
|
+
var _chunkL5JSGNT3cjs = require('./chunk-L5JSGNT3.cjs');
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
|
|
@@ -69,7 +68,7 @@ function FaqAccordion({ items, defaultOpenIds = [] }) {
|
|
|
69
68
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
70
69
|
"div",
|
|
71
70
|
{
|
|
72
|
-
id:
|
|
71
|
+
id: _chunkXAQJ4ZLYcjs.faqItemAnchor.call(void 0, item.id),
|
|
73
72
|
className: _chunkFIG2RKZFcjs.cn.call(void 0, "group scroll-mt-24 transition-colors hover:bg-[#1E1E1E]", isOpen ? "bg-ods-bg" : "bg-transparent"),
|
|
74
73
|
children: [
|
|
75
74
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -89,7 +88,7 @@ function FaqAccordion({ items, defaultOpenIds = [] }) {
|
|
|
89
88
|
children: [
|
|
90
89
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 pr-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { children: item.question }) }),
|
|
91
90
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
92
|
-
|
|
91
|
+
_chunkXAQJ4ZLYcjs.ChevronButton,
|
|
93
92
|
{
|
|
94
93
|
"aria-label": isOpen ? "Collapse question" : "Expand question",
|
|
95
94
|
size: "md",
|
|
@@ -149,7 +148,7 @@ function buildFaqJsonLdFromFaqs(faqs, opts = {}) {
|
|
|
149
148
|
|
|
150
149
|
var DEFAULT_HEADING_TEXT = "Frequently Asked Questions";
|
|
151
150
|
function buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl = "") {
|
|
152
|
-
return
|
|
151
|
+
return _chunkXAQJ4ZLYcjs.buildSuggestionUrl.call(void 0, "/api/faqs", { apiBaseUrl, entityType, entityId, count: minResults });
|
|
153
152
|
}
|
|
154
153
|
function groupFaqsBySection(faqs) {
|
|
155
154
|
const order = [];
|
|
@@ -165,7 +164,7 @@ function groupFaqsBySection(faqs) {
|
|
|
165
164
|
}
|
|
166
165
|
let group = byName.get(name);
|
|
167
166
|
if (!group) {
|
|
168
|
-
group = { section: name, slug:
|
|
167
|
+
group = { section: name, slug: _chunkXAQJ4ZLYcjs.faqSectionSlug.call(void 0, name), items: [] };
|
|
169
168
|
byName.set(name, group);
|
|
170
169
|
order.push(name);
|
|
171
170
|
}
|
|
@@ -205,7 +204,7 @@ function GroupedFaqList({
|
|
|
205
204
|
}
|
|
206
205
|
if (bestId) setActiveSlug(bestId);
|
|
207
206
|
},
|
|
208
|
-
{ rootMargin: `-${
|
|
207
|
+
{ rootMargin: `-${_chunkL5JSGNT3cjs.STICKY_HEADER_OFFSET_PX}px 0px -55% 0px`, threshold: 0 }
|
|
209
208
|
);
|
|
210
209
|
for (const group of navGroups) {
|
|
211
210
|
const el = group.slug ? document.getElementById(group.slug) : null;
|
|
@@ -215,7 +214,7 @@ function GroupedFaqList({
|
|
|
215
214
|
}, [slugKey]);
|
|
216
215
|
const [hashTarget, setHashTarget] = _react.useState.call(void 0, null);
|
|
217
216
|
_react.useEffect.call(void 0, () => {
|
|
218
|
-
const refresh = () => setHashTarget(
|
|
217
|
+
const refresh = () => setHashTarget(_chunkXAQJ4ZLYcjs.parseFaqHash.call(void 0, window.location.hash));
|
|
219
218
|
refresh();
|
|
220
219
|
window.addEventListener("hashchange", refresh);
|
|
221
220
|
return () => window.removeEventListener("hashchange", refresh);
|
|
@@ -232,15 +231,15 @@ function GroupedFaqList({
|
|
|
232
231
|
}, [groups, hashTarget]);
|
|
233
232
|
const accordionKeySuffix = _optionalChain([hashTarget, 'optionalAccess', _8 => _8.kind]) === "item" ? `item:${hashTarget.rawId}` : "default";
|
|
234
233
|
const scrollDep = `${groups.length}|` + (_optionalChain([hashTarget, 'optionalAccess', _9 => _9.kind]) === "item" ? `item:${hashTarget.rawId}` : _optionalChain([hashTarget, 'optionalAccess', _10 => _10.kind]) === "section" ? `section:${hashTarget.slug}` : "none");
|
|
235
|
-
|
|
234
|
+
_chunkL5JSGNT3cjs.useScrollToHash.call(void 0, scrollDep, { headerOffset: _chunkL5JSGNT3cjs.STICKY_HEADER_OFFSET_PX });
|
|
236
235
|
_react.useEffect.call(void 0, () => {
|
|
237
236
|
if (_optionalChain([hashTarget, 'optionalAccess', _11 => _11.kind]) === "section") setActiveSlug(hashTarget.slug);
|
|
238
237
|
}, [hashTarget]);
|
|
239
238
|
const handleJump = _react.useCallback.call(void 0,
|
|
240
239
|
(e, slug) => {
|
|
241
240
|
e.preventDefault();
|
|
242
|
-
|
|
243
|
-
headerOffset:
|
|
241
|
+
_chunkL5JSGNT3cjs.navigateSamePageHash.call(void 0, "#" + slug, {
|
|
242
|
+
headerOffset: _chunkL5JSGNT3cjs.STICKY_HEADER_OFFSET_PX,
|
|
244
243
|
history: "replace"
|
|
245
244
|
});
|
|
246
245
|
},
|
|
@@ -272,7 +271,7 @@ function GroupedFaqList({
|
|
|
272
271
|
id: _nullishCoalesce(group.slug, () => ( void 0)),
|
|
273
272
|
className: "scroll-mt-24 space-y-4",
|
|
274
273
|
children: [
|
|
275
|
-
group.section && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CategoryHeading, { className:
|
|
274
|
+
group.section && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CategoryHeading, { className: _chunkXAQJ4ZLYcjs.SECTION_HEADING_CLASS, children: group.section }),
|
|
276
275
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
277
276
|
FaqAccordion,
|
|
278
277
|
{
|
|
@@ -313,10 +312,10 @@ function FaqSection({
|
|
|
313
312
|
() => initialFaqs ? { faqs: initialFaqs } : void 0,
|
|
314
313
|
[initialFaqs]
|
|
315
314
|
);
|
|
316
|
-
const { data, isLoading, error } =
|
|
315
|
+
const { data, isLoading, error } = _chunkUGDGUO26cjs.useSelfFetch.call(void 0, url, { initialData });
|
|
317
316
|
const faqs = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _14 => _14.faqs]), () => ( []));
|
|
318
317
|
const groups = _react.useMemo.call(void 0, () => faqs.length > 0 ? groupFaqsBySection(faqs) : [], [faqs]);
|
|
319
|
-
const headingNode = heading === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className:
|
|
318
|
+
const headingNode = heading === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: _chunkXAQJ4ZLYcjs.SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
|
|
320
319
|
if (error) return null;
|
|
321
320
|
if (!isLoading && faqs.length === 0) return null;
|
|
322
321
|
if (isLoading && faqs.length === 0) {
|
|
@@ -332,21 +331,18 @@ function FaqSection({
|
|
|
332
331
|
"script",
|
|
333
332
|
{
|
|
334
333
|
type: "application/ld+json",
|
|
335
|
-
dangerouslySetInnerHTML: { __html:
|
|
334
|
+
dangerouslySetInnerHTML: { __html: _chunkXAQJ4ZLYcjs.serializeJsonLd.call(void 0, schema) }
|
|
336
335
|
}
|
|
337
336
|
)
|
|
338
337
|
] });
|
|
339
338
|
}
|
|
340
339
|
|
|
341
340
|
// src/components/faq/faq-document-page.tsx
|
|
342
|
-
var _lucidereact = require('lucide-react');
|
|
343
341
|
_chunkG7UE6RKVcjs.init_next_navigation.call(void 0, );
|
|
344
342
|
|
|
345
343
|
function FaqDocumentPage({
|
|
346
344
|
title = "Frequently Asked Questions",
|
|
347
345
|
subtitle,
|
|
348
|
-
titleIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.HelpCircle, { className: _chunk2JPSWDSMcjs.SECTION_HERO_ICON_CLASS }),
|
|
349
|
-
accentDot = true,
|
|
350
346
|
backButton,
|
|
351
347
|
initialFaqs,
|
|
352
348
|
emitJsonLd,
|
|
@@ -354,38 +350,28 @@ function FaqDocumentPage({
|
|
|
354
350
|
apiBaseUrl,
|
|
355
351
|
entityType,
|
|
356
352
|
entityId,
|
|
357
|
-
minResults
|
|
353
|
+
minResults,
|
|
354
|
+
shell = true
|
|
358
355
|
}) {
|
|
359
356
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
360
357
|
const backCfg = backButton === false ? void 0 : {
|
|
361
358
|
label: _nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _15 => _15.label]), () => ( "Back to home")),
|
|
362
359
|
onClick: () => router.push(_nullishCoalesce(_optionalChain([backButton, 'optionalAccess', _16 => _16.href]), () => ( "/")))
|
|
363
360
|
};
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
initialFaqs,
|
|
379
|
-
heading: null,
|
|
380
|
-
emitJsonLd,
|
|
381
|
-
jsonLd,
|
|
382
|
-
apiBaseUrl,
|
|
383
|
-
entityType,
|
|
384
|
-
entityId,
|
|
385
|
-
minResults
|
|
386
|
-
}
|
|
387
|
-
)
|
|
388
|
-
] }) }) });
|
|
361
|
+
const inner = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXAQJ4ZLYcjs.PageLayout, { title, subtitle, backButton: backCfg, titleSize: "h1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
362
|
+
FaqSection,
|
|
363
|
+
{
|
|
364
|
+
initialFaqs,
|
|
365
|
+
heading: null,
|
|
366
|
+
emitJsonLd,
|
|
367
|
+
jsonLd,
|
|
368
|
+
apiBaseUrl,
|
|
369
|
+
entityType,
|
|
370
|
+
entityId,
|
|
371
|
+
minResults
|
|
372
|
+
}
|
|
373
|
+
) });
|
|
374
|
+
return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXAQJ4ZLYcjs.PageShell, { children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: inner });
|
|
389
375
|
}
|
|
390
376
|
|
|
391
377
|
|
|
@@ -393,4 +379,4 @@ function FaqDocumentPage({
|
|
|
393
379
|
|
|
394
380
|
|
|
395
381
|
exports.FaqAccordion = FaqAccordion; exports.FaqSection = FaqSection; exports.FaqDocumentPage = FaqDocumentPage;
|
|
396
|
-
//# sourceMappingURL=chunk-
|
|
382
|
+
//# sourceMappingURL=chunk-ZYGVJXJ5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-ZYGVJXJ5.cjs","../src/components/faq/faq-section.tsx","../src/components/faq-accordion.tsx","../src/components/faq/json-ld.ts","../src/components/faq/faq-document-page.tsx"],"names":["jsx","jsxs"],"mappings":"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","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-ZYGVJXJ5.cjs","sourcesContent":[null,"\"use client\"\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport type { Faq } from '../../types/faq'\nimport { FaqAccordion, type FaqItem } from '../faq-accordion'\nimport { useSelfFetch } from '../../hooks/use-self-fetch'\nimport { buildSuggestionUrl } from '../../utils/suggestion-url'\nimport { serializeJsonLd } from '../../utils/common'\nimport { useScrollToHash } from '../../hooks/use-scroll-to-hash'\nimport { navigateSamePageHash, STICKY_HEADER_OFFSET_PX } from '../../utils/same-page-hash-nav'\nimport { faqSectionSlug, parseFaqHash, type FaqHashTarget } from '../../utils/faq-anchor'\nimport { cn } from '../../utils/cn'\nimport { buildFaqJsonLdFromFaqs, type FaqSchemaOptions } from './json-ld'\nimport { SECTION_HEADING_CLASS } from '../layout/page-heading'\n\nexport interface FaqSectionProps {\n /**\n * SSR hydrate. When provided, the hook skips the first client fetch (per\n * useSelfFetch contract). The consuming server page resolves FAQs then drills\n * them into this prop — the lib never re-fetches what the host already gated on.\n */\n initialFaqs?: Faq[]\n /** Both required together for entity-attached FAQs; partial → bare /api/faqs. */\n entityType?: string\n entityId?: number | string\n /**\n * Heading node above the grouped list. `undefined` → default\n * `<h2>`\"Frequently Asked Questions\". `null` → no heading (the host page\n * owns the `<h1>`, as the standalone /faqs surface does). A React node lets a\n * platform drill its own <PageHeading> without the lib referencing platform\n * state. Also drives category nesting so the document outline stays correct:\n * `null` → categories render `<h2>` (directly under the page `<h1>`);\n * otherwise categories render `<h3>` beneath this heading.\n */\n heading?: React.ReactNode | null\n /** Inject FAQPage schema.org JSON-LD as a <script>. Off by default so embeds\n * don't emit duplicate schema. */\n emitJsonLd?: boolean\n /** Overrides for the JSON-LD's name/description/url. */\n jsonLd?: FaqSchemaOptions\n className?: string\n /** Maps to /api/faqs `?count=` (the 5-tier fill target). Absent → param\n * not sent (server default applies). */\n minResults?: number\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin relative). */\n apiBaseUrl?: string\n}\n\nconst DEFAULT_HEADING_TEXT = 'Frequently Asked Questions'\n\n/** URL composition shared with RelatedContentSection (`buildSuggestionUrl`)\n * — byte-identical to the historical `buildFaqsUrl` output when\n * `minResults`/`apiBaseUrl` are absent. */\nfunction buildFaqsUrl(\n entityType?: string,\n entityId?: number | string,\n minResults?: number,\n apiBaseUrl = '',\n): string {\n return buildSuggestionUrl('/api/faqs', { apiBaseUrl, entityType, entityId, count: minResults })\n}\n\ninterface FaqGroup {\n /** null → the uncategorized bucket: no heading, no jump pill, rendered last. */\n section: string | null\n slug: string | null\n items: FaqItem[]\n}\n\n/** Group FAQs by `faq.section`, preserving the server's first-seen\n * (display_order) order for BOTH the section order and the rows within each\n * section. The uncategorized bucket (blank/missing section) sinks to the end\n * since it renders without a heading. Items carry NO badge here — the `<h2>`\n * IS the category, so a per-row chip would be redundant. */\nfunction groupFaqsBySection(faqs: Faq[]): FaqGroup[] {\n const order: string[] = []\n const byName = new Map<string, FaqGroup>()\n let uncategorized: FaqGroup | null = null\n for (const faq of faqs) {\n const item: FaqItem = { id: faq.id, question: faq.question, answer: faq.answer }\n const name = faq.section?.trim()\n if (!name) {\n if (!uncategorized) uncategorized = { section: null, slug: null, items: [] }\n uncategorized.items.push(item)\n continue\n }\n let group = byName.get(name)\n if (!group) {\n group = { section: name, slug: faqSectionSlug(name), items: [] }\n byName.set(name, group)\n order.push(name)\n }\n group.items.push(item)\n }\n const groups = order.map((name) => byName.get(name)!)\n if (uncategorized) groups.push(uncategorized)\n return groups\n}\n\n\n/** Map key for the uncategorized bucket — `group.slug` is null for it, so\n * every per-group map (default-open ids, accordion keys) uses this sentinel\n * to keep the lookup typed. */\nconst UNCATEGORIZED_KEY = '__uncategorized__'\nconst groupKey = (g: FaqGroup): string => g.slug ?? UNCATEGORIZED_KEY\n\n/**\n * Grouped FAQ layout: a category jump-nav above stacked `<h2>` category\n * sections (each its own accordion). Isolated into its own component so the\n * scroll-spy hooks only mount in grouped mode — `FaqSection`'s own hooks stay\n * unconditional.\n *\n * The pills are real `<a href=\"#slug\">` anchors (crawlable in-page links,\n * deep-linkable, work without JS); the click handler upgrades the jump to the\n * cancellation-proof `scrollElementIntoView` tween and syncs the URL hash.\n */\nfunction GroupedFaqList({\n groups,\n categoryHeadingAs,\n}: {\n groups: FaqGroup[]\n /** Heading tag for each category, so the document outline nests correctly\n * under whatever owns the heading above this block: `h2` on the standalone\n * page (the page owns the `<h1>`), `h3` beneath an embed's `<h2>` title.\n * The VISUAL is `SECTION_HEADING_CLASS` either way, so categories look\n * identical on every surface. */\n categoryHeadingAs: 'h2' | 'h3'\n}) {\n const CategoryHeading = categoryHeadingAs\n const navGroups = useMemo(() => groups.filter((g) => g.slug), [groups])\n const [activeSlug, setActiveSlug] = useState<string | null>(navGroups[0]?.slug ?? null)\n // Identity-stable key for the section set so the observer re-binds only when\n // the categories actually change (not on every parent re-render).\n const slugKey = navGroups.map((g) => g.slug).join('|')\n\n // Scroll-spy: mark the pill for the category currently at the top of the\n // viewport. rootMargin drops the trigger line just below the sticky header\n // and ignores the bottom ~55% so \"active\" is the section being read, not the\n // next one peeking in.\n useEffect(() => {\n if (navGroups.length < 2) return\n const tops = new Map<string, number>()\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n const id = (entry.target as HTMLElement).id\n if (entry.isIntersecting) tops.set(id, entry.boundingClientRect.top)\n else tops.delete(id)\n }\n let bestId: string | null = null\n let bestTop = Number.POSITIVE_INFINITY\n for (const [id, top] of tops) {\n if (top < bestTop) {\n bestTop = top\n bestId = id\n }\n }\n if (bestId) setActiveSlug(bestId)\n },\n { rootMargin: `-${STICKY_HEADER_OFFSET_PX}px 0px -55% 0px`, threshold: 0 },\n )\n for (const group of navGroups) {\n const el = group.slug ? document.getElementById(group.slug) : null\n if (el) observer.observe(el)\n }\n return () => observer.disconnect()\n // slugKey encodes the section set; re-observe only when it changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [slugKey])\n\n // ─── Hash dispatch — `/faqs#faq-item-<id>` or `/faqs#faq-<section-slug>` ──\n // Tracks the current hash so:\n // 1. an item-kind hash seeds `defaultOpenIds` on the matching accordion\n // (auto-expands the cited question);\n // 2. either kind triggers the cancellation-proof tween scroll with the\n // sticky-header offset (native browser hash scroll runs once, ignores\n // our offset — re-running the tween puts the target in the right spot).\n // Listens to `hashchange` so back/forward replays the same behavior. SSR-\n // safe: initial null state matches the server render; the first effect\n // tick on the client updates it.\n const [hashTarget, setHashTarget] = useState<FaqHashTarget | null>(null)\n useEffect(() => {\n const refresh = () => setHashTarget(parseFaqHash(window.location.hash))\n refresh()\n window.addEventListener('hashchange', refresh)\n return () => window.removeEventListener('hashchange', refresh)\n }, [])\n\n // Per-group default-open set when the hash points at an item. The map key\n // matches `groupKey(group)` so the render-time lookup is O(1) per group.\n const defaultOpenByGroupKey = useMemo(() => {\n if (hashTarget?.kind !== 'item') return null\n const targetId = hashTarget.rawId\n const result = new Map<string, (string | number)[]>()\n for (const group of groups) {\n const hit = group.items.find((i) => String(i.id) === targetId)\n if (hit) result.set(groupKey(group), [hit.id])\n }\n return result.size > 0 ? result : null\n }, [groups, hashTarget])\n\n // Accordion is uncontrolled — `defaultOpenIds` is only consumed at mount,\n // so a new item hash needs a remount to honor it. Keying off the item-id\n // suffix triggers exactly the remount we need (and stays stable when the\n // hash points at a section, so category navigation never disturbs the\n // accordion's open state).\n const accordionKeySuffix =\n hashTarget?.kind === 'item' ? `item:${hashTarget.rawId}` : 'default'\n\n // Unified scroll-to-hash: rAF-polls for the target row (outlasts the SWR self-fetch\n // + Radix accordion expand) and re-fires on `hashchange` — including the synthetic\n // event `navigateSamePageHash` dispatches for a SOFT same-page chat-card nav (a\n // host-router `pushState` fires no `hashchange`). The ready-dep keys off BOTH the\n // loaded `groups` (so a deep-link / refresh scrolls once the self-fetched list\n // mounts) AND `hashTarget` (so a soft nav re-runs the scroll AFTER the re-render\n // that remounts + opens the cited row, landing on its FINAL expanded position\n // instead of racing the uncontrolled accordion's key-remount — the bare-`hashchange`\n // listener alone fires before the remount and lands on the stale closed position).\n const scrollDep =\n `${groups.length}|` +\n (hashTarget?.kind === 'item'\n ? `item:${hashTarget.rawId}`\n : hashTarget?.kind === 'section'\n ? `section:${hashTarget.slug}`\n : 'none')\n useScrollToHash(scrollDep, { headerOffset: STICKY_HEADER_OFFSET_PX })\n\n // A section hash also lights up its category pill; item hashes leave the pills\n // untouched so deep-linking a question never disturbs scroll-spy state.\n useEffect(() => {\n if (hashTarget?.kind === 'section') setActiveSlug(hashTarget.slug)\n }, [hashTarget])\n\n // Category pill click. `navigateSamePageHash` owns the entire transition:\n // replaceState → synthetic `hashchange` → `scrollElementIntoView` tween\n // with `STICKY_HEADER_OFFSET_PX` so the section heading lands BELOW the\n // sticky category nav on the FIRST tween (covers the same-target\n // re-click case, where the `hashTarget` effect at L214 is a no-op\n // because the state reference is equal). For DIFFERENT-target clicks\n // the helper's synthetic `hashchange` re-fires that effect, which\n // re-scrolls with the same offset and cancels this tween (singleton)\n // — both paths land at the same position. The effect is still\n // required for back/forward + direct URL edits, where the helper\n // isn't in the call chain.\n //\n // `history: 'replace'` matches the pre-helper behavior: category pills\n // are a TOC, not a navigation step, so the Back button leaves the\n // FAQ page in one step regardless of how many categories the user\n // clicked through.\n const handleJump = useCallback(\n (e: React.MouseEvent<HTMLAnchorElement>, slug: string) => {\n e.preventDefault()\n navigateSamePageHash('#' + slug, {\n headerOffset: STICKY_HEADER_OFFSET_PX,\n history: 'replace',\n })\n },\n [],\n )\n\n return (\n <div className=\"space-y-8\">\n {navGroups.length > 1 && (\n <nav aria-label=\"FAQ categories\" className=\"flex flex-wrap gap-2\">\n {navGroups.map((group) => {\n const isActive = group.slug === activeSlug\n return (\n <a\n key={group.slug}\n href={`#${group.slug}`}\n aria-current={isActive ? 'true' : undefined}\n onClick={(e) => handleJump(e, group.slug as string)}\n className={cn(\n \"rounded-full border px-4 py-2 text-sm font-medium font-['DM_Sans'] transition-colors\",\n isActive\n ? 'border-ods-text-primary bg-ods-card text-ods-text-primary'\n : 'border-ods-border bg-ods-card text-ods-text-secondary hover:border-ods-text-secondary hover:text-ods-text-primary',\n )}\n >\n {group.section}\n </a>\n )\n })}\n </nav>\n )}\n <div className=\"space-y-10\">\n {groups.map((group) => {\n const key = groupKey(group)\n return (\n <section\n key={key}\n id={group.slug ?? undefined}\n className=\"scroll-mt-24 space-y-4\"\n >\n {group.section && (\n <CategoryHeading className={SECTION_HEADING_CLASS}>{group.section}</CategoryHeading>\n )}\n <FaqAccordion\n // Re-key on item-hash changes so the remount picks up the new\n // `defaultOpenIds` (the accordion is uncontrolled). Stable for\n // section hashes — category navigation doesn't disturb state.\n key={`${key}:${accordionKeySuffix}`}\n items={group.items}\n defaultOpenIds={defaultOpenByGroupKey?.get(key)}\n />\n </section>\n )\n })}\n </div>\n </div>\n )\n}\n\nfunction FaqSkeleton() {\n return (\n <div className=\"space-y-8 animate-pulse\">\n <div className=\"h-12 md:h-14 w-2/3 rounded bg-ods-border\" />\n <div className=\"rounded-3xl border border-ods-border overflow-hidden bg-ods-card divide-y divide-ods-border w-full\">\n {Array.from({ length: 8 }).map((_, idx) => (\n <div key={idx} className=\"flex items-center justify-between px-6 md:px-8 py-6\">\n <div className=\"h-6 w-5/6 rounded bg-ods-border\" />\n <div className=\"h-10 w-10 rounded-md bg-ods-border\" />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\ninterface FaqsResponse {\n faqs: Faq[]\n}\n\n/**\n * The FAQ display surface — ONE rendering on every host: the list grouped by\n * `faq.section` (each category a heading + its own accordion, with a category\n * jump-nav once there are 2+ categories). There is no flat/ungrouped mode and\n * no page-vs-embedded shell fork; the standalone /faqs page and every embed\n * render through this single path, so they cannot drift.\n *\n * - Standalone /faqs page: pass `initialFaqs` (SSR) + `heading={null}` (the\n * page owns the <h1>) + `emitJsonLd` with `jsonLd` overrides for SEO.\n * - Per-entity embed: pass `entityType` + `entityId` (no `initialFaqs`); the\n * hook self-fetches `GET /api/faqs`, and `heading` is this block's own <h2>.\n *\n * CONTRACT: the consuming app MUST implement `GET /api/faqs`. On a fetch error\n * (or zero FAQs) the component renders nothing so the host page isn't\n * disfigured. The host always supplies the page shell — this renders a bare\n * <section>.\n */\nexport function FaqSection({\n initialFaqs,\n entityType,\n entityId,\n heading,\n emitJsonLd = false,\n jsonLd,\n className,\n minResults,\n apiBaseUrl = '',\n}: FaqSectionProps) {\n const url = buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl)\n // Memoized — useSelfFetch re-syncs on [initialData]; a fresh per-render\n // wrapper object would setState-loop under re-rendering parents.\n const initialData = useMemo<FaqsResponse | undefined>(\n () => (initialFaqs ? { faqs: initialFaqs } : undefined),\n [initialFaqs],\n )\n const { data, isLoading, error } = useSelfFetch<FaqsResponse>(url, { initialData })\n\n const faqs = data?.faqs ?? []\n // Grouped before the early returns so the hook order stays stable.\n const groups = useMemo(() => (faqs.length > 0 ? groupFaqsBySection(faqs) : []), [faqs])\n\n // `undefined` → default <h2> title; `null` → the host page owns the <h1>, so\n // no title renders here. `heading === null` also makes the category headings\n // <h2> (directly under the page <h1>); otherwise they nest as <h3>.\n const headingNode =\n heading === undefined ? <h2 className={SECTION_HEADING_CLASS}>{DEFAULT_HEADING_TEXT}</h2> : heading\n\n // Degrade silently — never show an error banner or an empty section shell\n // where FAQs would be (host pages and the standalone surface both rely on it).\n if (error) return null\n if (!isLoading && faqs.length === 0) return null\n if (isLoading && faqs.length === 0) {\n return (\n <div className={className}>\n <FaqSkeleton />\n </div>\n )\n }\n\n const schema = emitJsonLd ? buildFaqJsonLdFromFaqs(faqs, jsonLd) : null\n\n return (\n <>\n <section className={className ?? 'space-y-10'}>\n {headingNode}\n <GroupedFaqList groups={groups} categoryHeadingAs={heading === null ? 'h2' : 'h3'} />\n </section>\n {schema && (\n <script\n type=\"application/ld+json\"\n // eslint-disable-next-line react/no-danger\n // serializeJsonLd, NOT raw JSON.stringify — FAQ answers are\n // admin-entered; an embedded \"</script>\" must not break the tag.\n dangerouslySetInnerHTML={{ __html: serializeJsonLd(schema) }}\n />\n )}\n </>\n )\n}\n","\"use client\"\n\nimport React, { useRef, useState, useEffect, useCallback } from 'react'\nimport { ChevronButton } from './ui/chevron-button'\nimport { cn } from \"../utils/cn\"\nimport { faqItemAnchor } from \"../utils/faq-anchor\"\n\nexport interface FaqItem {\n id: number | string\n question: string\n answer: string\n}\n\ninterface FaqAccordionProps {\n items: FaqItem[]\n defaultOpenIds?: (number | string)[]\n}\n\n// Utility to measure scrollHeight outside render cycle\nconst useMeasuredHeight = (isOpen: boolean) => {\n const ref = useRef<HTMLDivElement | null>(null)\n const [maxHeight, setMaxHeight] = useState<string>('0px')\n\n const measure = useCallback(() => {\n if (ref.current) {\n const height = ref.current.scrollHeight\n setMaxHeight(`${height}px`)\n }\n }, [])\n\n // Update height only when section is open\n useEffect(() => {\n if (isOpen) {\n measure()\n } else {\n setMaxHeight('0px')\n }\n }, [isOpen, measure])\n\n return { ref, maxHeight }\n}\n\nexport function FaqAccordion({ items, defaultOpenIds = [] }: FaqAccordionProps) {\n const [openSet, setOpenSet] = useState<Set<string | number>>(new Set(defaultOpenIds))\n\n const toggle = (id: string | number) => {\n setOpenSet(prev => {\n const next = new Set(prev)\n if (next.has(id)) next.delete(id)\n else next.add(id)\n return next\n })\n }\n\n return (\n <div className=\"rounded-3xl border border-ods-border divide-y divide-ods-border bg-ods-card overflow-hidden\">\n {items.map(item => {\n const isOpen = openSet.has(item.id)\n const { ref, maxHeight } = useMeasuredHeight(isOpen)\n\n return (\n <div\n key={item.id}\n // Per-row anchor — chat citation chips (`/faqs#faq-item-<id>`) land\n // here via native browser hash scroll AND via `FaqSection`'s tween\n // dispatch. `scroll-mt-24` keeps the row header below the 96px\n // sticky nav offset (matches `<section>`'s scroll-margin for\n // category anchors).\n id={faqItemAnchor(item.id)}\n className={cn('group scroll-mt-24 transition-colors hover:bg-[#1E1E1E]', isOpen ? 'bg-ods-bg' : 'bg-transparent')}\n >\n {/* Header */}\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => toggle(item.id)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n toggle(item.id);\n }\n }}\n aria-expanded={isOpen}\n className=\"flex w-full items-center justify-between px-6 md:px-8 py-6 text-left focus:outline-none transition-colors cursor-pointer\"\n >\n <div className=\"min-w-0 pr-4\">\n <h3>\n {item.question}\n </h3>\n </div>\n <div className=\"flex-shrink-0\">\n <ChevronButton\n aria-label={isOpen ? 'Collapse question' : 'Expand question'}\n size=\"md\"\n isExpanded={isOpen}\n backgroundColor=\"transparent\"\n borderColor=\"#3A3A3A\"\n />\n </div>\n </div>\n {/* Content wrapper with max-height animation */}\n <div\n style={{ maxHeight, transition: 'max-height 0.35s ease-in-out, opacity 0.35s ease-in-out', opacity: isOpen ? 1 : 0 }}\n className=\"overflow-hidden group-hover:bg-[#1E1E1E]/30\"\n >\n {/* break-words: FAQ answers render as plain text, so a long URL or\n token has no wrap opportunity — and the parent is overflow-hidden,\n which would CLIP it past the viewport on mobile. Mirrors the\n markdown-renderer overflow-wrap fix. */}\n <div ref={ref} className=\"px-6 md:px-8 pb-6 text-ods-text-primary text-h4 break-words\">\n {item.answer}\n </div>\n </div>\n </div>\n )\n })}\n </div>\n )\n} ","/**\n * Pure FAQ JSON-LD builder. No React, no client-only deps — safe to import from\n * Server Components via the `./components/faq` subpath export. (Do NOT import\n * through the root `./components` barrel — that barrel is `\"use client\"` and\n * dragging it into a Server Component would force the client graph into the\n * server.)\n *\n * The hub used to harcode `name`/`description` here for OpenMSP; in the lib we\n * accept overrides so every embedder can supply its own platform branding.\n */\nimport type { Faq } from '../../types/faq'\n\nexport interface FaqSchemaOptions {\n name?: string\n description?: string\n url?: string\n}\n\nconst DEFAULT_NAME = 'Frequently Asked Questions'\nconst DEFAULT_DESCRIPTION =\n 'Answers to common questions.'\n\nexport function baseFaqSchema(opts: FaqSchemaOptions = {}) {\n return {\n '@context': 'https://schema.org',\n '@type': 'FAQPage',\n name: opts.name ?? DEFAULT_NAME,\n description: opts.description ?? DEFAULT_DESCRIPTION,\n ...(opts.url ? { url: opts.url } : {}),\n } as const\n}\n\nexport function buildFaqJsonLdFromFaqs(faqs: Faq[], opts: FaqSchemaOptions = {}) {\n return {\n ...baseFaqSchema(opts),\n mainEntity: faqs.map((faq) => ({\n '@type': 'Question',\n name: faq.question,\n acceptedAnswer: {\n '@type': 'Answer',\n text: faq.answer,\n },\n })),\n } as const\n}\n","'use client';\n\n/**\n * FaqDocumentPage — the full `/faqs` page with chrome, so embedders drop in\n * ONE component instead of hand-assembling `PageShell` + `PageLayout` around\n * the bare `<FaqSection>`. Mirrors `LegalDocumentPage` / `DevSectionPage`: the\n * page-level layout lives in the lib, the host page is a thin wrapper that\n * passes only config + the SSR-resolved data.\n *\n * HERO: the title + subtitle route through the canonical (frozen) `PageLayout`\n * `TitleBlock` with `titleSize=\"h1\"` — the unified Help Center header (the\n * `TitleBlock` element is always an `<h1>`; `titleSize` only sets its typography,\n * here `text-h1`). The page owns that `<h1>`, so `<FaqSection heading={null}>`\n * nests its category headings as `<h2>`/`<h3>` (the SEO-recommended FAQ document\n * outline).\n *\n * DATA: pass `initialFaqs` (SSR-resolved, platform-scoped) so `FaqSection`\n * skips its client self-fetch — the standalone page's static platform-only\n * contract. Omit it for embeds that want the self-fetching `/api/faqs`\n * suggestion-fill instead.\n */\n\nimport type { Faq } from '../../types/faq';\nimport { PageShell, PageLayout } from '../ui';\nimport { useRouter } from '../../embed-shims/next-navigation';\nimport { FaqSection } from './faq-section';\nimport type { FaqSchemaOptions } from './json-ld';\n\nexport interface FaqDocumentPageProps {\n /** Page title (frozen `PageLayout` `TitleBlock`). Default \"Frequently Asked Questions\". */\n title?: string;\n /** Subtitle under the title. */\n subtitle?: string;\n /** Back-button config — same pattern as `DevSectionPage` / `LegalDocumentPage`.\n * Pass `false` to hide. Default `{ label: 'Back to home', href: '/' }`. */\n backButton?: { label?: string; href?: string } | false;\n /** Render the standalone `<PageShell>` (own `<main>` + bg + max-width). Default\n * true. Pass false when the host layout already provides the page container\n * (e.g. openframe-frontend's `AppLayout` `<main>`) — only the padding box\n * renders, avoiding a nested `<main>`. */\n shell?: boolean;\n /** SSR-hydrate `FaqSection` (skips the client fetch — the platform-only\n * contract for the standalone page). Omit for self-fetching embeds. */\n initialFaqs?: Faq[];\n /** Emit FAQPage schema.org JSON-LD (forwarded to `FaqSection`). Off by\n * default so embeds don't emit duplicate schema. */\n emitJsonLd?: boolean;\n /** JSON-LD name/description/url overrides (forwarded to `FaqSection`). */\n jsonLd?: FaqSchemaOptions;\n /** Base URL `FaqSection` appends `/api/faqs` to (reverse-proxy embedders). */\n apiBaseUrl?: string;\n /** Optional entity scoping forwarded to `FaqSection`. */\n entityType?: string;\n entityId?: number | string;\n /** Minimum FAQ count before the section renders (forwarded to `FaqSection`). */\n minResults?: number;\n}\n\nexport function FaqDocumentPage({\n title = 'Frequently Asked Questions',\n subtitle,\n backButton,\n initialFaqs,\n emitJsonLd,\n jsonLd,\n apiBaseUrl,\n entityType,\n entityId,\n minResults,\n shell = true,\n}: FaqDocumentPageProps) {\n const router = useRouter();\n\n // Back-button config — mirrors LegalDocumentPage / DevSectionPage. Hide\n // entirely when the caller passes `false` (embed-mode where the host owns\n // nav chrome).\n const backCfg =\n backButton === false\n ? undefined\n : {\n label: backButton?.label ?? 'Back to home',\n onClick: () => router.push(backButton?.href ?? '/'),\n };\n\n const inner = (\n <PageLayout title={title} subtitle={subtitle} backButton={backCfg} titleSize=\"h1\">\n <FaqSection\n initialFaqs={initialFaqs}\n heading={null}\n emitJsonLd={emitJsonLd}\n jsonLd={jsonLd}\n apiBaseUrl={apiBaseUrl}\n entityType={entityType}\n entityId={entityId}\n minResults={minResults}\n />\n </PageLayout>\n );\n\n return shell ? <PageShell>{inner}</PageShell> : <div className=\"page-shell-content\">{inner}</div>;\n}\n"]}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk63A53WQNcjs = require('../../chunk-63A53WQN.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('../../chunk-
|
|
8
|
+
var _chunkXAQJ4ZLYcjs = require('../../chunk-XAQJ4ZLY.cjs');
|
|
9
|
+
require('../../chunk-L5JSGNT3.cjs');
|
|
10
|
+
require('../../chunk-ZS2SBWBR.cjs');
|
|
10
11
|
require('../../chunk-N2DVKXN4.cjs');
|
|
11
12
|
require('../../chunk-BZFW3FOF.cjs');
|
|
12
13
|
require('../../chunk-G7UE6RKV.cjs');
|
|
13
14
|
require('../../chunk-XL4V2PYG.cjs');
|
|
14
|
-
require('../../chunk-
|
|
15
|
+
require('../../chunk-QJGRP2YE.cjs');
|
|
16
|
+
require('../../chunk-WZW7C7TF.cjs');
|
|
15
17
|
require('../../chunk-WBR7H6E3.cjs');
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
|
|
21
|
-
var
|
|
22
|
-
require('../../chunk-FIG2RKZF.cjs');
|
|
23
|
-
require('../../chunk-ZS2SBWBR.cjs');
|
|
24
|
-
require('../../chunk-WZW7C7TF.cjs');
|
|
23
|
+
var _chunkLWNPMLIHcjs = require('../../chunk-LWNPMLIH.cjs');
|
|
25
24
|
require('../../chunk-XQFFGR6U.cjs');
|
|
25
|
+
require('../../chunk-FIG2RKZF.cjs');
|
|
26
26
|
require('../../chunk-PXXS27EE.cjs');
|
|
27
27
|
require('../../chunk-VRHGVLSL.cjs');
|
|
28
28
|
|
|
@@ -71,38 +71,38 @@ function ShareExperienceSection({
|
|
|
71
71
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-h2", children: howItWorksTitle }),
|
|
72
72
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-h4", children: howItWorksBody })
|
|
73
73
|
] }),
|
|
74
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
74
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXAQJ4ZLYcjs.BenefitCardGrid, { columns: 4, children: [
|
|
75
75
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
76
|
-
|
|
76
|
+
_chunkXAQJ4ZLYcjs.BenefitCard,
|
|
77
77
|
{
|
|
78
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
78
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLWNPMLIHcjs.G2Icon, { width: 24, height: 24 }) }),
|
|
79
79
|
title: "G2",
|
|
80
80
|
description: "g2.com",
|
|
81
81
|
variant: "auth-figma"
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
84
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
85
|
-
|
|
85
|
+
_chunkXAQJ4ZLYcjs.BenefitCard,
|
|
86
86
|
{
|
|
87
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
87
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLWNPMLIHcjs.CapterraIcon, { width: 24, height: 24 }) }),
|
|
88
88
|
title: "Capterra",
|
|
89
89
|
description: "capterra.com",
|
|
90
90
|
variant: "auth-figma"
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
93
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
94
|
-
|
|
94
|
+
_chunkXAQJ4ZLYcjs.BenefitCard,
|
|
95
95
|
{
|
|
96
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
96
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLWNPMLIHcjs.TrustpilotIcon, { width: 24, height: 24 }) }),
|
|
97
97
|
title: "TrustPilot",
|
|
98
98
|
description: "trustpilot.com",
|
|
99
99
|
variant: "auth-figma"
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
102
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
103
|
-
|
|
103
|
+
_chunkXAQJ4ZLYcjs.BenefitCard,
|
|
104
104
|
{
|
|
105
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
105
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLWNPMLIHcjs.GetAppIcon, { width: 24, height: 24 }) }),
|
|
106
106
|
title: "GetApp",
|
|
107
107
|
description: "getapp.com",
|
|
108
108
|
variant: "auth-figma"
|
|
@@ -110,7 +110,7 @@ function ShareExperienceSection({
|
|
|
110
110
|
)
|
|
111
111
|
] }),
|
|
112
112
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
113
|
-
|
|
113
|
+
_chunk63A53WQNcjs.ContactForm,
|
|
114
114
|
{
|
|
115
115
|
...DEFAULT_CONTACT_FORM_PROPS,
|
|
116
116
|
...contactFormProps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/case-studies/index.cjs","../../../src/components/case-studies/share-experience-section.tsx"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,4DAAiC;AACjC;AACE;AACA;AACF,4DAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC;AACE;AACA;AACA;AACA;AACF,4DAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC;AACjC
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/case-studies/index.cjs","../../../src/components/case-studies/share-experience-section.tsx"],"names":[],"mappings":"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","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/case-studies/index.cjs","sourcesContent":[null,"'use client'\n\nimport React from 'react'\nimport { BenefitCard, BenefitCardGrid } from '../ui'\nimport {\n G2Icon,\n CapterraIcon,\n TrustpilotIcon,\n GetAppIcon,\n} from '../icons'\nimport {\n ContactForm,\n type ContactFormProps,\n} from '../contact'\n\n/**\n * `<ShareExperienceSection>` — the case-studies \"Share Your Experience\"\n * CTA block.\n *\n * Hub usage: rendered inside the unified case-studies chrome (between\n * the search bar and the case-study card grid) so it stays at the same\n * y-offset + gutters as the rest of the page content.\n *\n * Embedders mount this anywhere they like. The inner `<ContactForm>`\n * submits through the AMBIENT `EndpointsRuntime.contactUrl` (same proxy\n * seam every other embed-aware form uses), so embedders behind a\n * `/content` reverse proxy get a working submission with no per-call-\n * site wiring.\n *\n * **Copy is overridable.** Every string is a prop with a sensible\n * \"Flamingo case-studies\" default so the hub keeps its existing copy\n * verbatim; embedders override what they need.\n *\n * **Contact-form integration is configurable.** Hub auto-resolves\n * `userId` / `helpCategoryOptions` / `rdtCid` / `onSubmitSuccess` from\n * its app context and passes them down via `contactFormProps`;\n * embedders without that context just omit them. All other\n * `ContactFormProps` are forwarded too, so the host can adjust prefill,\n * success redirect, hidden fields, etc. without forking this component.\n */\nexport interface ShareExperienceSectionProps {\n /** Override the section heading. JSX so the host can break lines /\n * colorize the accent the same way the hub does. Default: the\n * hub's two-line \"Share Your Experience / with Fellow MSPs:\" copy. */\n title?: React.ReactNode\n /** Override the lead paragraph. Default: the hub's review-incentive\n * copy referencing Flamingo. Pass a brand-neutral string in embeds. */\n subtitle?: React.ReactNode\n /** Override the \"How it works?\" sub-heading. */\n howItWorksTitle?: React.ReactNode\n /** Override the \"How it works?\" body copy. */\n howItWorksBody?: React.ReactNode\n /** Forwarded to the inner `<ContactForm>`. The hub passes its\n * auto-resolved `userId` / `helpCategoryOptions` / `rdtCid` /\n * `onSubmitSuccess` here. Embedders pass overrides like\n * `successRedirectUrl` or extra prefill copy. */\n contactFormProps?: Partial<ContactFormProps>\n className?: string\n}\n\nconst DEFAULT_TITLE: React.ReactNode = (\n <>\n Share Your Experience\n <br />\n with Fellow MSPs<span className=\"text-ods-accent\">:</span>\n </>\n)\n\nconst DEFAULT_SUBTITLE: React.ReactNode = (\n <>\n We know your time is valuable. When you leave an honest review about\n your Flamingo experience, we'd like to thank you with a gift\n certificate – not as payment for a review, but as appreciation for\n the time you invest in helping other MSPs make informed decisions.\n </>\n)\n\nconst DEFAULT_HOW_IT_WORKS_TITLE: React.ReactNode = (\n <>\n How it works<span className=\"text-ods-accent\">?</span>\n </>\n)\n\nconst DEFAULT_HOW_IT_WORKS_BODY: React.ReactNode = (\n <>\n Share your name and email with us, and we'll reach out to guide\n you through the review process and arrange your thank-you gift\n certificate.\n </>\n)\n\n/** Defaults that match the hub's existing /case-studies behavior. Host\n * overrides via `contactFormProps` win over these. */\nconst DEFAULT_CONTACT_FORM_PROPS = {\n prefilledReason: 'I want to do a case study',\n prefilledMessage: 'I want to do a case study',\n hideFields: ['companySize', 'referralSource', 'helpCategory', 'message'] as ContactFormProps['hideFields'],\n title: '',\n subtitle: '',\n footerText: '',\n noBorder: true,\n noPadding: true,\n buttonVariant: 'outline' as ContactFormProps['buttonVariant'],\n buttonClassName: 'w-full',\n successToastMessage: \"Thank you! We'll reach out to schedule your case study.\",\n} satisfies Partial<ContactFormProps>\n\nexport function ShareExperienceSection({\n title = DEFAULT_TITLE,\n subtitle = DEFAULT_SUBTITLE,\n howItWorksTitle = DEFAULT_HOW_IT_WORKS_TITLE,\n howItWorksBody = DEFAULT_HOW_IT_WORKS_BODY,\n contactFormProps,\n className,\n}: ShareExperienceSectionProps = {}) {\n return (\n <section className={`flex flex-col gap-10${className ? ` ${className}` : ''}`}>\n <div className=\"text-ods-text-primary\">\n <h2 className=\"text-h1 text-ods-text-primary\">{title}</h2>\n <p className=\"text-h4 mt-6 max-w-[765px]\">{subtitle}</p>\n </div>\n\n <div className=\"bg-ods-background border border-ods-border rounded-md p-10\">\n <div className=\"flex flex-col gap-10\">\n <div className=\"flex flex-col gap-6 text-ods-text-primary\">\n <h3 className=\"text-h2\">{howItWorksTitle}</h3>\n <p className=\"text-h4\">{howItWorksBody}</p>\n </div>\n\n <BenefitCardGrid columns={4}>\n <BenefitCard\n icon={\n <div className=\"bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center\">\n <G2Icon width={24} height={24} />\n </div>\n }\n title=\"G2\"\n description=\"g2.com\"\n variant=\"auth-figma\"\n />\n <BenefitCard\n icon={\n <div className=\"bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center\">\n <CapterraIcon width={24} height={24} />\n </div>\n }\n title=\"Capterra\"\n description=\"capterra.com\"\n variant=\"auth-figma\"\n />\n <BenefitCard\n icon={\n <div className=\"bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center\">\n <TrustpilotIcon width={24} height={24} />\n </div>\n }\n title=\"TrustPilot\"\n description=\"trustpilot.com\"\n variant=\"auth-figma\"\n />\n <BenefitCard\n icon={\n <div className=\"bg-ods-background border border-ods-border rounded-md p-2 w-12 h-12 flex items-center justify-center\">\n <GetAppIcon width={24} height={24} />\n </div>\n }\n title=\"GetApp\"\n description=\"getapp.com\"\n variant=\"auth-figma\"\n />\n </BenefitCardGrid>\n\n {/* Submission proxies through ambient EndpointsRuntime.contactUrl —\n * no per-call-site wiring needed for embeds behind a reverse\n * proxy. Hub's auto-resolving wrapper passes userId / rdtCid /\n * onSubmitSuccess via `contactFormProps`. */}\n <ContactForm\n {...DEFAULT_CONTACT_FORM_PROPS}\n {...contactFormProps}\n />\n </div>\n </div>\n </section>\n )\n}\n"]}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
ContactForm
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-YFGDZFUG.js";
|
|
5
5
|
import {
|
|
6
6
|
BenefitCard,
|
|
7
7
|
BenefitCardGrid
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-2Y4DLBFO.js";
|
|
9
|
+
import "../../chunk-Q4AMYLKX.js";
|
|
10
|
+
import "../../chunk-J7AV6H63.js";
|
|
10
11
|
import "../../chunk-2FI3USTC.js";
|
|
11
12
|
import "../../chunk-EL5YVPD5.js";
|
|
12
13
|
import "../../chunk-PLJLE4A4.js";
|
|
13
14
|
import "../../chunk-LXC6P2EO.js";
|
|
14
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-AI5X5JTD.js";
|
|
16
|
+
import "../../chunk-6U3IUD57.js";
|
|
15
17
|
import "../../chunk-OHPI2HRK.js";
|
|
16
18
|
import {
|
|
17
19
|
CapterraIcon,
|
|
18
20
|
G2Icon,
|
|
19
21
|
GetAppIcon,
|
|
20
22
|
TrustpilotIcon
|
|
21
|
-
} from "../../chunk-
|
|
22
|
-
import "../../chunk-XTCBRQN2.js";
|
|
23
|
-
import "../../chunk-J7AV6H63.js";
|
|
24
|
-
import "../../chunk-6U3IUD57.js";
|
|
23
|
+
} from "../../chunk-LQHMXPOJ.js";
|
|
25
24
|
import "../../chunk-W72U7OU7.js";
|
|
25
|
+
import "../../chunk-XTCBRQN2.js";
|
|
26
26
|
import "../../chunk-PHWQLKVE.js";
|
|
27
27
|
import "../../chunk-GGWZFCYS.js";
|
|
28
28
|
|