@flamingo-stack/openframe-frontend-core 0.0.215 → 0.0.216
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-2V4SACHE.js +302 -0
- package/dist/chunk-2V4SACHE.js.map +1 -0
- package/dist/chunk-572WQWIX.cjs +348 -0
- package/dist/chunk-572WQWIX.cjs.map +1 -0
- package/dist/{chunk-WT5JV2GS.cjs → chunk-5V6MSE3B.cjs} +39 -39
- package/dist/chunk-5V6MSE3B.cjs.map +1 -0
- package/dist/{chunk-WQZP3JIZ.js → chunk-CDLYRFDE.js} +1894 -1472
- package/dist/chunk-CDLYRFDE.js.map +1 -0
- package/dist/chunk-GVNQAGXB.js +232 -0
- package/dist/chunk-GVNQAGXB.js.map +1 -0
- package/dist/{chunk-P5EE2VJX.cjs → chunk-HOHDXYPR.cjs} +1 -1
- package/dist/chunk-HOHDXYPR.cjs.map +1 -0
- package/dist/chunk-IH76P5R6.cjs +232 -0
- package/dist/chunk-IH76P5R6.cjs.map +1 -0
- package/dist/{chunk-24KCAECR.cjs → chunk-JJR27M56.cjs} +3 -3
- package/dist/{chunk-24KCAECR.cjs.map → chunk-JJR27M56.cjs.map} +1 -1
- package/dist/chunk-K4DFAVSO.cjs +302 -0
- package/dist/chunk-K4DFAVSO.cjs.map +1 -0
- package/dist/{chunk-HICZPTRR.js → chunk-LCLTCCXS.js} +14 -14
- package/dist/chunk-LCLTCCXS.js.map +1 -0
- package/dist/{chunk-VFKQMAUF.cjs → chunk-OB45JHDY.cjs} +3 -3
- package/dist/{chunk-VFKQMAUF.cjs.map → chunk-OB45JHDY.cjs.map} +1 -1
- package/dist/{chunk-4XLJWX2N.js → chunk-ORJREQ2W.js} +4 -4
- package/dist/{chunk-7PCP7YQR.js → chunk-QTKU6ULP.js} +6 -6
- package/dist/{chunk-CIPO6DXK.js → chunk-QY75VKAS.js} +5 -5
- package/dist/{chunk-ZG2YY5E7.js → chunk-RFONYT63.js} +1 -1
- package/dist/chunk-RFONYT63.js.map +1 -0
- package/dist/{chunk-NGFP4RVL.cjs → chunk-SMCG2CCC.cjs} +30 -30
- package/dist/{chunk-NGFP4RVL.cjs.map → chunk-SMCG2CCC.cjs.map} +1 -1
- package/dist/{chunk-MX5MIFWA.js → chunk-UEBM4PC4.js} +5 -5
- package/dist/chunk-VC3ND5RB.js +348 -0
- package/dist/chunk-VC3ND5RB.js.map +1 -0
- package/dist/{chunk-UXZ3ZJ3M.cjs → chunk-XDPSSE4O.cjs} +4 -4
- package/dist/{chunk-UXZ3ZJ3M.cjs.map → chunk-XDPSSE4O.cjs.map} +1 -1
- package/dist/{chunk-D4MNFY67.cjs → chunk-ZGTDUPTW.cjs} +1316 -894
- package/dist/chunk-ZGTDUPTW.cjs.map +1 -0
- package/dist/components/chat/entity-cards/blog-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/blog-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/case-study-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/case-study-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/customer-interview-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/customer-interview-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/investor-update-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/investor-update-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/program-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/program-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/use-entity-card-link.d.ts +14 -0
- package/dist/components/chat/entity-cards/use-entity-card-link.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/use-entity-card-placeholder.d.ts +13 -0
- package/dist/components/chat/entity-cards/use-entity-card-placeholder.d.ts.map +1 -0
- package/dist/components/chat/index.cjs +11 -11
- package/dist/components/chat/index.js +10 -10
- package/dist/components/contact/index.cjs +12 -12
- package/dist/components/contact/index.js +11 -11
- package/dist/components/features/captions-url.d.ts +18 -0
- package/dist/components/features/captions-url.d.ts.map +1 -0
- package/dist/components/features/index.cjs +23 -11
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.d.ts +2 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/features/index.js +24 -12
- package/dist/components/features/mux-origins.cjs +10 -0
- package/dist/components/features/mux-origins.cjs.map +1 -0
- package/dist/components/features/mux-origins.d.ts +26 -0
- package/dist/components/features/mux-origins.d.ts.map +1 -0
- package/dist/components/features/mux-origins.js +7 -0
- package/dist/components/features/mux-origins.js.map +1 -0
- package/dist/components/features/notifications/index.d.ts +2 -0
- package/dist/components/features/notifications/index.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-drawer.d.ts +2 -1
- package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-popups.d.ts +10 -0
- package/dist/components/features/notifications/notification-popups.d.ts.map +1 -0
- package/dist/components/features/notifications/notifications-context.d.ts +8 -1
- package/dist/components/features/notifications/notifications-context.d.ts.map +1 -1
- package/dist/components/features/notifications/types.d.ts +1 -0
- package/dist/components/features/notifications/types.d.ts.map +1 -1
- package/dist/components/features/use-video-warmup.d.ts +53 -0
- package/dist/components/features/use-video-warmup.d.ts.map +1 -0
- package/dist/components/icons/index.cjs +3 -3
- package/dist/components/icons/index.js +2 -2
- package/dist/components/icons-v2-generated/index.cjs +2 -2
- package/dist/components/icons-v2-generated/index.cjs.map +1 -1
- package/dist/components/icons-v2-generated/index.js +4 -4
- package/dist/components/index.cjs +132 -102
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +94 -64
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +11 -11
- package/dist/components/navigation/index.js +10 -10
- package/dist/components/onboarding-guides/build-default-href.d.ts +15 -0
- package/dist/components/onboarding-guides/build-default-href.d.ts.map +1 -0
- package/dist/components/onboarding-guides/hooks/use-onboarding-guides.d.ts +28 -0
- package/dist/components/onboarding-guides/hooks/use-onboarding-guides.d.ts.map +1 -0
- package/dist/components/onboarding-guides/index.cjs +373 -0
- package/dist/components/onboarding-guides/index.cjs.map +1 -0
- package/dist/components/onboarding-guides/index.d.ts +25 -0
- package/dist/components/onboarding-guides/index.d.ts.map +1 -0
- package/dist/components/onboarding-guides/index.js +373 -0
- package/dist/components/onboarding-guides/index.js.map +1 -0
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts +52 -0
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-skeleton.d.ts +17 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-skeleton.d.ts.map +1 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-view.d.ts +43 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-view.d.ts.map +1 -0
- package/dist/components/shared/doc-search/doc-search-bar.d.ts +59 -0
- package/dist/components/shared/doc-search/doc-search-bar.d.ts.map +1 -0
- package/dist/components/shared/doc-search/doc-search-result-row.d.ts +18 -0
- package/dist/components/shared/doc-search/doc-search-result-row.d.ts.map +1 -0
- package/dist/components/shared/doc-search/format-relative-path.d.ts +10 -0
- package/dist/components/shared/doc-search/format-relative-path.d.ts.map +1 -0
- package/dist/components/shared/doc-search/index.d.ts +8 -0
- package/dist/components/shared/doc-search/index.d.ts.map +1 -0
- package/dist/components/shared/doc-search/map-doc-search-results.d.ts +15 -0
- package/dist/components/shared/doc-search/map-doc-search-results.d.ts.map +1 -0
- package/dist/components/shared/doc-search/resolve-search-result-action.d.ts +37 -0
- package/dist/components/shared/doc-search/resolve-search-result-action.d.ts.map +1 -0
- package/dist/components/shared/doc-search/types.d.ts +29 -0
- package/dist/components/shared/doc-search/types.d.ts.map +1 -0
- package/dist/components/shared/doc-search/use-doc-search.d.ts +46 -0
- package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -0
- package/dist/components/tickets/help-center-card.d.ts +5 -1
- package/dist/components/tickets/help-center-card.d.ts.map +1 -1
- package/dist/components/tickets/hooks/use-ticket-actions.d.ts +8 -0
- package/dist/components/tickets/hooks/use-ticket-actions.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +316 -145
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +237 -66
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/tickets/ticket-detail-drawer.d.ts +11 -2
- package/dist/components/tickets/ticket-detail-drawer.d.ts.map +1 -1
- package/dist/components/tickets/types.d.ts +50 -1
- package/dist/components/tickets/types.d.ts.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +51 -51
- package/dist/components/ui/file-manager/index.cjs.map +1 -1
- package/dist/components/ui/file-manager/index.js +2 -2
- package/dist/components/ui/filter-pill-row.d.ts +20 -0
- package/dist/components/ui/filter-pill-row.d.ts.map +1 -0
- package/dist/components/ui/index.cjs +16 -14
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +21 -19
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/contexts/chat-runtime-context.d.ts +42 -0
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/embed-shims/index.cjs +3 -3
- package/dist/embed-shims/index.cjs.map +1 -1
- package/dist/embed-shims/index.js +5 -5
- package/dist/hooks/index.cjs +6 -6
- package/dist/hooks/index.js +5 -5
- package/dist/index.cjs +28 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +59 -45
- package/dist/utils/dev-sections/openframe-dev-sections.d.ts +2 -2
- package/dist/utils/dev-sections/openframe-dev-sections.d.ts.map +1 -1
- package/dist/utils/index.cjs +11 -5
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +11 -5
- package/dist/utils/index.js.map +1 -1
- package/package.json +13 -1
- package/src/components/chat/entity-cards/blog-card.tsx +17 -5
- package/src/components/chat/entity-cards/case-study-card.tsx +23 -1
- package/src/components/chat/entity-cards/customer-interview-card.tsx +23 -1
- package/src/components/chat/entity-cards/dispatch.tsx +21 -0
- package/src/components/chat/entity-cards/investor-update-card.tsx +23 -1
- package/src/components/chat/entity-cards/onboarding-guide-card.tsx +30 -4
- package/src/components/chat/entity-cards/program-card.tsx +17 -3
- package/src/components/chat/entity-cards/use-entity-card-link.ts +66 -0
- package/src/components/chat/entity-cards/use-entity-card-placeholder.ts +50 -0
- package/src/components/features/captions-url.ts +25 -0
- package/src/components/features/index.ts +2 -0
- package/src/components/features/mux-origins.ts +27 -0
- package/src/components/features/notifications/index.ts +2 -0
- package/src/components/features/notifications/notification-drawer.tsx +100 -16
- package/src/components/features/notifications/notification-popups.tsx +105 -0
- package/src/components/features/notifications/notifications-context.tsx +16 -0
- package/src/components/features/notifications/types.ts +1 -0
- package/src/components/features/use-video-warmup.ts +176 -0
- package/src/components/index.ts +5 -0
- package/src/components/onboarding-guides/build-default-href.ts +16 -0
- package/src/components/onboarding-guides/hooks/use-onboarding-guides.ts +90 -0
- package/src/components/onboarding-guides/index.ts +39 -0
- package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +215 -0
- package/src/components/onboarding-guides/onboarding-guides-catalog-skeleton.tsx +62 -0
- package/src/components/onboarding-guides/onboarding-guides-catalog-view.tsx +230 -0
- package/src/components/shared/doc-search/doc-search-bar.tsx +100 -0
- package/src/components/shared/doc-search/doc-search-result-row.tsx +73 -0
- package/src/components/shared/doc-search/format-relative-path.ts +17 -0
- package/src/components/shared/doc-search/index.ts +24 -0
- package/src/components/shared/doc-search/map-doc-search-results.ts +113 -0
- package/src/components/shared/doc-search/resolve-search-result-action.ts +68 -0
- package/src/components/shared/doc-search/types.ts +28 -0
- package/src/components/shared/doc-search/use-doc-search.ts +263 -0
- package/src/components/tickets/help-center-card.tsx +8 -0
- package/src/components/tickets/help-center-list.tsx +17 -3
- package/src/components/tickets/hooks/use-ticket-actions.ts +210 -14
- package/src/components/tickets/ticket-detail-drawer.tsx +145 -5
- package/src/components/tickets/types.ts +55 -0
- package/src/components/ui/filter-pill-row.tsx +72 -0
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/simple-markdown-renderer.tsx +24 -1
- package/src/components/ui/toaster.tsx +3 -3
- package/src/contexts/chat-runtime-context.tsx +41 -0
- package/src/stories/NotificationDrawer.stories.tsx +18 -2
- package/src/utils/dev-sections/openframe-dev-sections.ts +12 -5
- package/dist/chunk-2G3NXF6J.cjs +0 -521
- package/dist/chunk-2G3NXF6J.cjs.map +0 -1
- package/dist/chunk-D4MNFY67.cjs.map +0 -1
- package/dist/chunk-HICZPTRR.js.map +0 -1
- package/dist/chunk-P5EE2VJX.cjs.map +0 -1
- package/dist/chunk-R6MLPU4A.js +0 -521
- package/dist/chunk-R6MLPU4A.js.map +0 -1
- package/dist/chunk-WQZP3JIZ.js.map +0 -1
- package/dist/chunk-WT5JV2GS.cjs.map +0 -1
- package/dist/chunk-ZG2YY5E7.js.map +0 -1
- /package/dist/{chunk-4XLJWX2N.js.map → chunk-ORJREQ2W.js.map} +0 -0
- /package/dist/{chunk-7PCP7YQR.js.map → chunk-QTKU6ULP.js.map} +0 -0
- /package/dist/{chunk-CIPO6DXK.js.map → chunk-QY75VKAS.js.map} +0 -0
- /package/dist/{chunk-MX5MIFWA.js.map → chunk-UEBM4PC4.js.map} +0 -0
|
@@ -15,21 +15,21 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
require('../../chunk-WT5JV2GS.cjs');
|
|
20
|
-
require('../../chunk-24KCAECR.cjs');
|
|
21
|
-
require('../../chunk-65CPJ4SX.cjs');
|
|
22
|
-
require('../../chunk-XQFFGR6U.cjs');
|
|
23
|
-
require('../../chunk-P5EE2VJX.cjs');
|
|
24
|
-
require('../../chunk-27APPAJN.cjs');
|
|
18
|
+
var _chunkZGTDUPTWcjs = require('../../chunk-ZGTDUPTW.cjs');
|
|
25
19
|
require('../../chunk-XL4V2PYG.cjs');
|
|
26
20
|
require('../../chunk-BZFW3FOF.cjs');
|
|
21
|
+
require('../../chunk-XDPSSE4O.cjs');
|
|
22
|
+
require('../../chunk-WBR7H6E3.cjs');
|
|
23
|
+
require('../../chunk-5V6MSE3B.cjs');
|
|
27
24
|
require('../../chunk-G7UE6RKV.cjs');
|
|
28
|
-
require('../../chunk-
|
|
29
|
-
require('../../chunk-UXZ3ZJ3M.cjs');
|
|
25
|
+
require('../../chunk-JJR27M56.cjs');
|
|
30
26
|
require('../../chunk-664KA5FI.cjs');
|
|
27
|
+
require('../../chunk-65CPJ4SX.cjs');
|
|
31
28
|
require('../../chunk-WZW7C7TF.cjs');
|
|
32
|
-
require('../../chunk-
|
|
29
|
+
require('../../chunk-XQFFGR6U.cjs');
|
|
30
|
+
require('../../chunk-HOHDXYPR.cjs');
|
|
31
|
+
require('../../chunk-27APPAJN.cjs');
|
|
32
|
+
require('../../chunk-OZ3GH6OQ.cjs');
|
|
33
33
|
require('../../chunk-VRHGVLSL.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
@@ -46,5 +46,5 @@ require('../../chunk-VRHGVLSL.cjs');
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
exports.AppHeader =
|
|
49
|
+
exports.AppHeader = _chunkZGTDUPTWcjs.AppHeader; exports.AppLayout = _chunkZGTDUPTWcjs.AppLayout; exports.ClientOnlyHeader = _chunkZGTDUPTWcjs.ClientOnlyHeader; exports.Header = _chunkZGTDUPTWcjs.Header; exports.HeaderButton = _chunkZGTDUPTWcjs.HeaderButton; exports.HeaderGlobalSearch = _chunkZGTDUPTWcjs.HeaderGlobalSearch; exports.HeaderOrganizationFilter = _chunkZGTDUPTWcjs.HeaderOrganizationFilter; exports.HeaderSkeleton = _chunkZGTDUPTWcjs.HeaderSkeleton; exports.MobileBurgerMenu = _chunkZGTDUPTWcjs.MobileBurgerMenu; exports.MobileNavPanel = _chunkZGTDUPTWcjs.MobileNavPanel; exports.NavigationSidebar = _chunkZGTDUPTWcjs.NavigationSidebar; exports.SlidingSidebar = _chunkZGTDUPTWcjs.SlidingSidebar; exports.StickySectionNav = _chunkZGTDUPTWcjs.StickySectionNav; exports.useSectionNavigation = _chunkZGTDUPTWcjs.useSectionNavigation;
|
|
50
50
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -15,21 +15,21 @@ import {
|
|
|
15
15
|
SlidingSidebar,
|
|
16
16
|
StickySectionNav,
|
|
17
17
|
useSectionNavigation
|
|
18
|
-
} from "../../chunk-
|
|
19
|
-
import "../../chunk-HICZPTRR.js";
|
|
20
|
-
import "../../chunk-CIPO6DXK.js";
|
|
21
|
-
import "../../chunk-EDW2NVRV.js";
|
|
22
|
-
import "../../chunk-W72U7OU7.js";
|
|
23
|
-
import "../../chunk-ZG2YY5E7.js";
|
|
24
|
-
import "../../chunk-MJNXIEV2.js";
|
|
18
|
+
} from "../../chunk-CDLYRFDE.js";
|
|
25
19
|
import "../../chunk-LXC6P2EO.js";
|
|
26
20
|
import "../../chunk-EL5YVPD5.js";
|
|
21
|
+
import "../../chunk-UEBM4PC4.js";
|
|
22
|
+
import "../../chunk-OHPI2HRK.js";
|
|
23
|
+
import "../../chunk-LCLTCCXS.js";
|
|
27
24
|
import "../../chunk-PLJLE4A4.js";
|
|
28
|
-
import "../../chunk-
|
|
29
|
-
import "../../chunk-MX5MIFWA.js";
|
|
25
|
+
import "../../chunk-QY75VKAS.js";
|
|
30
26
|
import "../../chunk-KSOOKNBG.js";
|
|
27
|
+
import "../../chunk-EDW2NVRV.js";
|
|
31
28
|
import "../../chunk-6U3IUD57.js";
|
|
32
|
-
import "../../chunk-
|
|
29
|
+
import "../../chunk-W72U7OU7.js";
|
|
30
|
+
import "../../chunk-RFONYT63.js";
|
|
31
|
+
import "../../chunk-MJNXIEV2.js";
|
|
32
|
+
import "../../chunk-CZR7ARBA.js";
|
|
33
33
|
import "../../chunk-GGWZFCYS.js";
|
|
34
34
|
export {
|
|
35
35
|
AppHeader,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lib-internal helper — default href shape for onboarding-guide cards
|
|
3
|
+
* when `runtime.composeContentUrl` is not wired (single-platform
|
|
4
|
+
* embedders without cross-platform topology).
|
|
5
|
+
*
|
|
6
|
+
* Shared between `OnboardingGuidesCatalogView` (per-card href) and
|
|
7
|
+
* `OnboardingGuideDetailView` (per-related-card href) so both views
|
|
8
|
+
* compose hrefs from the same `basePath`-derived shape — no parallel
|
|
9
|
+
* 4-line helper to drift apart.
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildDefaultHref(basePath: string, slug: string): {
|
|
12
|
+
href: string;
|
|
13
|
+
targetPlatform: string | null;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=build-default-href.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-default-href.d.ts","sourceRoot":"","sources":["../../../src/components/onboarding-guides/build-default-href.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAEjD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { OnboardingGuide, OnboardingGuideFilters, OnboardingGuideListResponse, OnboardingGuideSectionSummary } from '../../chat/types/entities/onboarding-guide';
|
|
2
|
+
/**
|
|
3
|
+
* Cache key builder for the `['onboarding-guides']` namespace.
|
|
4
|
+
*
|
|
5
|
+
* Includes BOTH public-read sub-keys (`lists`, `list`, `details`,
|
|
6
|
+
* `detail`, `sections`) AND the `admin` sub-namespace. Admin mutations
|
|
7
|
+
* live hub-side but invalidate against this same builder so a single
|
|
8
|
+
* `qc.invalidateQueries({ queryKey: onboardingGuideKeys.all })` from
|
|
9
|
+
* an admin hook also clears the public read cache.
|
|
10
|
+
*/
|
|
11
|
+
export declare const onboardingGuideKeys: {
|
|
12
|
+
all: readonly ["onboarding-guides"];
|
|
13
|
+
lists: () => readonly ["onboarding-guides", "list"];
|
|
14
|
+
list: (filters: OnboardingGuideFilters) => readonly ["onboarding-guides", "list", OnboardingGuideFilters];
|
|
15
|
+
details: () => readonly ["onboarding-guides", "detail"];
|
|
16
|
+
detail: (slug: string) => readonly ["onboarding-guides", "detail", string];
|
|
17
|
+
sections: () => readonly ["onboarding-guides", "sections"];
|
|
18
|
+
admin: {
|
|
19
|
+
all: readonly ["admin", "onboarding-guides"];
|
|
20
|
+
lists: () => readonly ["admin", "onboarding-guides", "list"];
|
|
21
|
+
detail: (slug: string) => readonly ["admin", "onboarding-guide", string];
|
|
22
|
+
stats: () => readonly ["admin", "onboarding-guides", "stats"];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare function useOnboardingGuides(filters?: OnboardingGuideFilters): import("@tanstack/react-query").UseQueryResult<NoInfer<OnboardingGuideListResponse>, Error>;
|
|
26
|
+
export declare function useOnboardingGuide(slug: string | undefined): import("@tanstack/react-query").UseQueryResult<NoInfer<OnboardingGuide>, Error>;
|
|
27
|
+
export declare function useOnboardingGuideSections(): import("@tanstack/react-query").UseQueryResult<NoInfer<OnboardingGuideSectionSummary[]>, Error>;
|
|
28
|
+
//# sourceMappingURL=use-onboarding-guides.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-onboarding-guides.d.ts","sourceRoot":"","sources":["../../../../src/components/onboarding-guides/hooks/use-onboarding-guides.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,4CAA4C,CAAA;AAEnD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;oBAGd,sBAAsB;;mBAGvB,MAAM;;;;;uBAKJ,MAAM;;;CAIxB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,sBAAsB,+FAcnE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,mFAU1D;AAED,wBAAgB,0BAA0B,oGAWzC"}
|
|
@@ -0,0 +1,373 @@
|
|
|
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
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunk572WQWIXcjs = require('../../chunk-572WQWIX.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkIH76P5R6cjs = require('../../chunk-IH76P5R6.cjs');
|
|
9
|
+
require('../../chunk-OB45JHDY.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunkZGTDUPTWcjs = require('../../chunk-ZGTDUPTW.cjs');
|
|
22
|
+
require('../../chunk-XL4V2PYG.cjs');
|
|
23
|
+
require('../../chunk-BZFW3FOF.cjs');
|
|
24
|
+
require('../../chunk-XDPSSE4O.cjs');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
var _chunkWBR7H6E3cjs = require('../../chunk-WBR7H6E3.cjs');
|
|
28
|
+
require('../../chunk-5V6MSE3B.cjs');
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var _chunkG7UE6RKVcjs = require('../../chunk-G7UE6RKV.cjs');
|
|
33
|
+
require('../../chunk-JJR27M56.cjs');
|
|
34
|
+
require('../../chunk-664KA5FI.cjs');
|
|
35
|
+
require('../../chunk-65CPJ4SX.cjs');
|
|
36
|
+
require('../../chunk-WZW7C7TF.cjs');
|
|
37
|
+
require('../../chunk-XQFFGR6U.cjs');
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var _chunkHOHDXYPRcjs = require('../../chunk-HOHDXYPR.cjs');
|
|
41
|
+
require('../../chunk-27APPAJN.cjs');
|
|
42
|
+
require('../../chunk-OZ3GH6OQ.cjs');
|
|
43
|
+
require('../../chunk-VRHGVLSL.cjs');
|
|
44
|
+
|
|
45
|
+
// src/components/onboarding-guides/onboarding-guides-catalog-view.tsx
|
|
46
|
+
var _react = require('react');
|
|
47
|
+
var _lucidereact = require('lucide-react');
|
|
48
|
+
|
|
49
|
+
// src/components/onboarding-guides/build-default-href.ts
|
|
50
|
+
function buildDefaultHref(basePath, slug) {
|
|
51
|
+
return { href: `${basePath}/${slug}`, targetPlatform: null };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// src/components/onboarding-guides/onboarding-guides-catalog-view.tsx
|
|
55
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
56
|
+
function OnboardingGuidesCatalogView({
|
|
57
|
+
initialGuides,
|
|
58
|
+
initialSections,
|
|
59
|
+
initialSection = "",
|
|
60
|
+
renderCard,
|
|
61
|
+
basePath = "/onboarding-guides"
|
|
62
|
+
}) {
|
|
63
|
+
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
64
|
+
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
65
|
+
const [isPending, startTransition] = _react.useTransition.call(void 0, );
|
|
66
|
+
const runtime = _chunkHOHDXYPRcjs.useChatRuntime.call(void 0, );
|
|
67
|
+
const activeSection = initialSection || "all";
|
|
68
|
+
const grouped = _react.useMemo.call(void 0, () => {
|
|
69
|
+
const map = /* @__PURE__ */ new Map();
|
|
70
|
+
for (const g of initialGuides) {
|
|
71
|
+
const existing = map.get(g.section);
|
|
72
|
+
if (existing) {
|
|
73
|
+
if (g.section_order < existing.section_order)
|
|
74
|
+
existing.section_order = g.section_order;
|
|
75
|
+
existing.guides.push(g);
|
|
76
|
+
} else {
|
|
77
|
+
map.set(g.section, { section_order: g.section_order, guides: [g] });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
for (const entry of map.values()) {
|
|
81
|
+
entry.guides.sort(
|
|
82
|
+
(a, b) => a.step_order - b.step_order || a.title.localeCompare(b.title)
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
return Array.from(map.entries()).map(([section, info]) => ({ section, ...info })).sort(
|
|
86
|
+
(a, b) => a.section_order - b.section_order || a.section.localeCompare(b.section)
|
|
87
|
+
);
|
|
88
|
+
}, [initialGuides]);
|
|
89
|
+
const sectionFilterOptions = _react.useMemo.call(void 0,
|
|
90
|
+
() => [
|
|
91
|
+
{ value: "all", label: `All (${initialGuides.length})` },
|
|
92
|
+
...initialSections.map((s) => ({
|
|
93
|
+
value: s.section,
|
|
94
|
+
label: `${s.section} (${s.count})`
|
|
95
|
+
}))
|
|
96
|
+
],
|
|
97
|
+
[initialGuides.length, initialSections]
|
|
98
|
+
);
|
|
99
|
+
const setSection = (value) => {
|
|
100
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
101
|
+
if (value === "all") {
|
|
102
|
+
params.delete("section");
|
|
103
|
+
} else {
|
|
104
|
+
params.set("section", value);
|
|
105
|
+
}
|
|
106
|
+
const qs = params.toString();
|
|
107
|
+
startTransition(() => {
|
|
108
|
+
router.push(qs ? `${basePath}?${qs}` : basePath);
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
const source = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _2 => _2.source]), () => ( "openframe"));
|
|
112
|
+
const docSearch = _chunk572WQWIXcjs.useDocSearch.call(void 0, {
|
|
113
|
+
source,
|
|
114
|
+
baseRoute: basePath,
|
|
115
|
+
onNavigate: (path) => router.push(path),
|
|
116
|
+
tableIds: ["onboarding-guides"]
|
|
117
|
+
});
|
|
118
|
+
const defaultRenderCard = (guide) => {
|
|
119
|
+
const cta = _optionalChain([runtime, 'optionalAccess', _3 => _3.composeContentUrl]) ? runtime.composeContentUrl(
|
|
120
|
+
"onboarding_guide",
|
|
121
|
+
guide.slug,
|
|
122
|
+
guide.onboarding_guide_platforms
|
|
123
|
+
) : buildDefaultHref(basePath, guide.slug);
|
|
124
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
125
|
+
_chunkZGTDUPTWcjs.OnboardingGuideCard,
|
|
126
|
+
{
|
|
127
|
+
guide,
|
|
128
|
+
href: cta.href,
|
|
129
|
+
targetPlatform: cta.targetPlatform,
|
|
130
|
+
size: "catalog"
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
const renderCardFn = _nullishCoalesce(renderCard, () => ( defaultRenderCard));
|
|
135
|
+
const preControls = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
|
|
136
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
137
|
+
_chunk572WQWIXcjs.DocSearchBar,
|
|
138
|
+
{
|
|
139
|
+
placeholder: "Search onboarding guides, releases, case studies\u2026",
|
|
140
|
+
query: docSearch.query,
|
|
141
|
+
onQueryChange: docSearch.setQuery,
|
|
142
|
+
results: docSearch.results,
|
|
143
|
+
isLoading: docSearch.isLoading,
|
|
144
|
+
onResultSelect: docSearch.handleResultSelect,
|
|
145
|
+
showDropdown: docSearch.keepDropdownOpen
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
initialSections.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
149
|
+
_chunkZGTDUPTWcjs.FilterPillRow,
|
|
150
|
+
{
|
|
151
|
+
label: "Section",
|
|
152
|
+
selectedValue: activeSection,
|
|
153
|
+
onValueChange: setSection,
|
|
154
|
+
options: sectionFilterOptions
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] });
|
|
158
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIH76P5R6cjs.DevSectionPage, { sectionKey: "onboarding", preControls, children: initialGuides.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center py-16", children: [
|
|
159
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.GraduationCap, { className: "h-12 w-12 text-ods-text-secondary mx-auto mb-4" }),
|
|
160
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold mb-2", children: "No onboarding guides found" }),
|
|
161
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary font-['DM_Sans'] text-[14px]", children: activeSection !== "all" ? "No guides in this section yet." : "We're working on the onboarding library. Check back soon." })
|
|
162
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
className: isPending ? "opacity-60 transition-opacity space-y-10" : "space-y-10",
|
|
166
|
+
children: grouped.map((sec) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: "space-y-4", children: [
|
|
167
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "h2", { className: "text-h3 tracking-[-0.36px] text-ods-text-primary flex items-center gap-2", children: [
|
|
168
|
+
sec.section,
|
|
169
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "inline-flex items-center justify-center rounded-full bg-ods-text-secondary/20 text-ods-text-secondary text-xs font-medium px-2 py-0.5", children: sec.guides.length })
|
|
170
|
+
] }),
|
|
171
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "flex flex-col gap-4", children: sec.guides.map((guide) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: renderCardFn(guide) }, guide.id)) })
|
|
172
|
+
] }, sec.section))
|
|
173
|
+
}
|
|
174
|
+
) });
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// src/components/onboarding-guides/onboarding-guide-detail-view.tsx
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
function OnboardingGuideDetailView({
|
|
181
|
+
initialData: guide,
|
|
182
|
+
related = [],
|
|
183
|
+
MarkdownRenderer = _chunkZGTDUPTWcjs.SimpleMarkdownRenderer,
|
|
184
|
+
renderRelatedCard,
|
|
185
|
+
backHref,
|
|
186
|
+
backLabel = "Back to Getting Started",
|
|
187
|
+
basePath = "/onboarding-guides"
|
|
188
|
+
}) {
|
|
189
|
+
const resolvedBackHref = _nullishCoalesce(backHref, () => ( basePath));
|
|
190
|
+
const runtime = _chunkHOHDXYPRcjs.useChatRuntime.call(void 0, );
|
|
191
|
+
const { ref: videoWarmupRef } = _chunkZGTDUPTWcjs.useVideoWarmup.call(void 0, {
|
|
192
|
+
videoUrl: guide.main_video_url,
|
|
193
|
+
supabaseStorageOrigin: _optionalChain([runtime, 'optionalAccess', _4 => _4.endpoints, 'access', _5 => _5.supabaseStorageOrigin])
|
|
194
|
+
});
|
|
195
|
+
const captionsUrl = _chunkZGTDUPTWcjs.getCaptionsUrl.call(void 0,
|
|
196
|
+
"onboarding_guide",
|
|
197
|
+
guide.id,
|
|
198
|
+
guide.srt_content
|
|
199
|
+
);
|
|
200
|
+
const videoPoster = guide.main_video_thumbnail || guide.featured_image || guide.og_image_url || _optionalChain([runtime, 'optionalAccess', _6 => _6.resolvePlaceholderUrl, 'optionalCall', _7 => _7(guide.title, { aspect: "wide" })]) || void 0;
|
|
201
|
+
const defaultRenderRelatedCard = (g) => {
|
|
202
|
+
const cta = _optionalChain([runtime, 'optionalAccess', _8 => _8.composeContentUrl]) ? runtime.composeContentUrl(
|
|
203
|
+
"onboarding_guide",
|
|
204
|
+
g.slug,
|
|
205
|
+
g.onboarding_guide_platforms
|
|
206
|
+
) : buildDefaultHref(basePath, g.slug);
|
|
207
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
208
|
+
_chunkZGTDUPTWcjs.OnboardingGuideCard,
|
|
209
|
+
{
|
|
210
|
+
guide: g,
|
|
211
|
+
href: cta.href,
|
|
212
|
+
targetPlatform: cta.targetPlatform
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
};
|
|
216
|
+
const renderRelatedCardFn = _nullishCoalesce(renderRelatedCard, () => ( defaultRenderRelatedCard));
|
|
217
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZGTDUPTWcjs.ArticleDetailLayout, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6 md:space-y-8", children: [
|
|
218
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
219
|
+
_chunkWBR7H6E3cjs.next_link_default,
|
|
220
|
+
{
|
|
221
|
+
href: resolvedBackHref,
|
|
222
|
+
className: "inline-flex items-center gap-2 text-ods-text-secondary hover:text-ods-accent transition-colors",
|
|
223
|
+
children: [
|
|
224
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowLeft, { className: "h-4 w-4" }),
|
|
225
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-h5", children: backLabel })
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-h1 tracking-[-1.12px] text-ods-text-primary", children: guide.title }),
|
|
230
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
231
|
+
_chunkZGTDUPTWcjs.EntityAuthorCard,
|
|
232
|
+
{
|
|
233
|
+
author: guide.author,
|
|
234
|
+
publishedAt: guide.published_at,
|
|
235
|
+
extraCells: [
|
|
236
|
+
{
|
|
237
|
+
value: `${guide.section} \xB7 Step ${guide.step_order}`,
|
|
238
|
+
label: "Section",
|
|
239
|
+
uppercase: false
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
),
|
|
244
|
+
(guide.main_video_url || guide.youtube_url) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: videoWarmupRef, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
245
|
+
_chunkZGTDUPTWcjs.EntityVideoSection,
|
|
246
|
+
{
|
|
247
|
+
mainVideoUrl: guide.main_video_url,
|
|
248
|
+
youtubeUrl: guide.youtube_url || void 0,
|
|
249
|
+
highlightVideoUrl: guide.highlight_video_url,
|
|
250
|
+
mainVideoPoster: videoPoster,
|
|
251
|
+
highlightVideoThumbnail: guide.highlight_video_thumbnail || void 0,
|
|
252
|
+
videoSummary: void 0,
|
|
253
|
+
videoBites: void 0,
|
|
254
|
+
title: guide.title,
|
|
255
|
+
srtContent: guide.srt_content,
|
|
256
|
+
captionsUrl,
|
|
257
|
+
MarkdownRenderer
|
|
258
|
+
}
|
|
259
|
+
) }),
|
|
260
|
+
guide.content && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MarkdownRenderer, { content: guide.content }) }),
|
|
261
|
+
guide.video_bites && guide.video_bites.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
262
|
+
_chunkZGTDUPTWcjs.VideoBitesDisplay,
|
|
263
|
+
{
|
|
264
|
+
bites: guide.video_bites,
|
|
265
|
+
filterPublished: true,
|
|
266
|
+
showTitle: false
|
|
267
|
+
}
|
|
268
|
+
),
|
|
269
|
+
related.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4 pt-8 border-t border-ods-border", children: [
|
|
270
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "h2", { className: "text-h3 tracking-[-0.36px] text-ods-text-primary", children: [
|
|
271
|
+
"More in ",
|
|
272
|
+
guide.section
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "flex flex-col gap-3", children: related.map((r) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: renderRelatedCardFn(r) }, r.id)) })
|
|
275
|
+
] })
|
|
276
|
+
] }) });
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// src/components/onboarding-guides/onboarding-guides-catalog-skeleton.tsx
|
|
280
|
+
|
|
281
|
+
function OnboardingGuidesCatalogSkeleton() {
|
|
282
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
283
|
+
_chunkIH76P5R6cjs.DevSectionPage,
|
|
284
|
+
{
|
|
285
|
+
sectionKey: "onboarding",
|
|
286
|
+
preControls: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4 animate-pulse", children: [
|
|
287
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-12 w-full bg-ods-card border border-ods-border rounded-md" }),
|
|
288
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-3 p-4 bg-ods-card border border-ods-border rounded-lg", children: [
|
|
289
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 w-14 bg-ods-border/60 rounded" }),
|
|
290
|
+
[0, 1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
291
|
+
"div",
|
|
292
|
+
{
|
|
293
|
+
className: "h-10 w-24 bg-ods-card border border-ods-border rounded-md"
|
|
294
|
+
},
|
|
295
|
+
i
|
|
296
|
+
))
|
|
297
|
+
] })
|
|
298
|
+
] }),
|
|
299
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-10 animate-pulse", children: [4, 3, 3].map((cardCount, sectionIdx) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: "space-y-4", children: [
|
|
300
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "h2", { className: "text-h3 tracking-[-0.36px] text-ods-text-primary flex items-center gap-2", children: [
|
|
301
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-6 w-40 bg-ods-border/70 rounded" }),
|
|
302
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-5 w-8 bg-ods-text-secondary/20 rounded-full" })
|
|
303
|
+
] }),
|
|
304
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "flex flex-col gap-4", children: Array.from({ length: cardCount }).map((_, cardIdx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZGTDUPTWcjs.OnboardingGuideCardSkeleton, { size: "catalog" }) }, cardIdx)) })
|
|
305
|
+
] }, sectionIdx)) })
|
|
306
|
+
}
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// src/components/onboarding-guides/hooks/use-onboarding-guides.ts
|
|
311
|
+
var _reactquery = require('@tanstack/react-query');
|
|
312
|
+
var onboardingGuideKeys = {
|
|
313
|
+
all: ["onboarding-guides"],
|
|
314
|
+
lists: () => [...onboardingGuideKeys.all, "list"],
|
|
315
|
+
list: (filters) => [...onboardingGuideKeys.lists(), filters],
|
|
316
|
+
details: () => [...onboardingGuideKeys.all, "detail"],
|
|
317
|
+
detail: (slug) => [...onboardingGuideKeys.details(), slug],
|
|
318
|
+
sections: () => [...onboardingGuideKeys.all, "sections"],
|
|
319
|
+
admin: {
|
|
320
|
+
all: ["admin", "onboarding-guides"],
|
|
321
|
+
lists: () => ["admin", "onboarding-guides", "list"],
|
|
322
|
+
detail: (slug) => ["admin", "onboarding-guide", slug],
|
|
323
|
+
stats: () => ["admin", "onboarding-guides", "stats"]
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
function useOnboardingGuides(filters) {
|
|
327
|
+
return _reactquery.useQuery.call(void 0, {
|
|
328
|
+
queryKey: onboardingGuideKeys.list(filters || {}),
|
|
329
|
+
queryFn: async () => {
|
|
330
|
+
const params = new URLSearchParams();
|
|
331
|
+
if (_optionalChain([filters, 'optionalAccess', _9 => _9.search])) params.set("search", filters.search);
|
|
332
|
+
if (_optionalChain([filters, 'optionalAccess', _10 => _10.section])) params.set("section", filters.section);
|
|
333
|
+
if (_optionalChain([filters, 'optionalAccess', _11 => _11.limit])) params.set("limit", filters.limit.toString());
|
|
334
|
+
if (_optionalChain([filters, 'optionalAccess', _12 => _12.offset])) params.set("offset", filters.offset.toString());
|
|
335
|
+
const res = await fetch(`/api/onboarding-guides?${params}`);
|
|
336
|
+
if (!res.ok) throw new Error("Failed to fetch onboarding guides");
|
|
337
|
+
return res.json();
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
function useOnboardingGuide(slug) {
|
|
342
|
+
return _reactquery.useQuery.call(void 0, {
|
|
343
|
+
queryKey: onboardingGuideKeys.detail(slug || ""),
|
|
344
|
+
queryFn: async () => {
|
|
345
|
+
const res = await fetch(`/api/onboarding-guides/${slug}`);
|
|
346
|
+
if (!res.ok) throw new Error("Failed to fetch onboarding guide");
|
|
347
|
+
return res.json();
|
|
348
|
+
},
|
|
349
|
+
enabled: !!slug
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
function useOnboardingGuideSections() {
|
|
353
|
+
return _reactquery.useQuery.call(void 0, {
|
|
354
|
+
queryKey: onboardingGuideKeys.sections(),
|
|
355
|
+
queryFn: async () => {
|
|
356
|
+
const res = await fetch("/api/onboarding-guides/sections");
|
|
357
|
+
if (!res.ok)
|
|
358
|
+
throw new Error("Failed to fetch onboarding-guide sections");
|
|
359
|
+
return res.json();
|
|
360
|
+
},
|
|
361
|
+
staleTime: 0
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
exports.OnboardingGuideDetailView = OnboardingGuideDetailView; exports.OnboardingGuidesCatalogSkeleton = OnboardingGuidesCatalogSkeleton; exports.OnboardingGuidesCatalogView = OnboardingGuidesCatalogView; exports.onboardingGuideKeys = onboardingGuideKeys; exports.useOnboardingGuide = useOnboardingGuide; exports.useOnboardingGuideSections = useOnboardingGuideSections; exports.useOnboardingGuides = useOnboardingGuides;
|
|
373
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/onboarding-guides/index.cjs","../../../src/components/onboarding-guides/onboarding-guides-catalog-view.tsx","../../../src/components/onboarding-guides/build-default-href.ts","../../../src/components/onboarding-guides/onboarding-guide-detail-view.tsx","../../../src/components/onboarding-guides/onboarding-guides-catalog-skeleton.tsx","../../../src/components/onboarding-guides/hooks/use-onboarding-guides.ts"],"names":["jsx"],"mappings":"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","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/components/onboarding-guides/index.cjs","sourcesContent":[null,"'use client'\n\n/**\n * Public-facing catalog view for `/onboarding-guides` on openframe.\n *\n * Self-contained: every concern that used to require a hub-side\n * wrapper now flows through lib primitives + the ChatRuntime context.\n *\n * - Chrome: `<DevSectionPage sectionKey=\"onboarding\">` (same lib\n * primitive every other dev-center surface uses).\n * - Search bar: lib `<DocSearchBar>` + `useDocSearch` directly,\n * pre-scoped to `tableIds: ['onboarding-guides']`. The chat\n * runtime's `source` discriminates the RAG namespace.\n * - Section filter: lib `<FilterSection>` + URL push via embed-shim\n * `useRouter`/`useSearchParams`.\n * - Cards: lib `<OnboardingGuideCard>` with hrefs composed via\n * `runtime.composeContentUrl?.('onboarding_guide', slug, platforms)`.\n * Falls back to a same-origin relative path when no composer is\n * wired (single-platform embedders).\n *\n * No hub-side wrapper file required.\n */\n\nimport { useMemo, useTransition, type ReactNode } from 'react'\nimport { GraduationCap } from 'lucide-react'\n\nimport { useRouter, useSearchParams } from '../../embed-shims'\nimport { DevSectionPage } from '../shared/dev-section'\nimport { DocSearchBar, useDocSearch } from '../shared/doc-search'\nimport { FilterPillRow } from '../ui/filter-pill-row'\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card'\nimport { useChatRuntime } from '../../contexts/chat-runtime-context'\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide'\nimport { buildDefaultHref } from './build-default-href'\n\nexport interface OnboardingGuidesCatalogViewProps {\n initialGuides: OnboardingGuide[]\n initialSections: Array<{\n section: string\n section_order: number\n count: number\n }>\n initialSection?: string\n /** Optional per-row card renderer override. When omitted, lib\n * renders `<OnboardingGuideCard>` with runtime-composed href.\n * Embedders only override to swap the card shape entirely. */\n renderCard?: (guide: OnboardingGuide) => ReactNode\n /** Base path the catalog is mounted under. Used as the fallback\n * `href` prefix for card hrefs when `runtime.composeContentUrl` is\n * not wired. Embedders mounting at `/docs/onboarding/` instead of\n * `/onboarding-guides/` should override. Also used by `setSection`\n * for the `?section=` URL push. Default `/onboarding-guides`. */\n basePath?: string\n}\n\nexport function OnboardingGuidesCatalogView({\n initialGuides,\n initialSections,\n initialSection = '',\n renderCard,\n basePath = '/onboarding-guides',\n}: OnboardingGuidesCatalogViewProps) {\n const router = useRouter()\n const searchParams = useSearchParams()\n const [isPending, startTransition] = useTransition()\n const runtime = useChatRuntime()\n const activeSection = initialSection || 'all'\n\n // Section grouping. Data arrives already filtered server-side via\n // `?section=`; this just buckets the visible rows for the section-\n // header layout — no client-side `.filter()`.\n const grouped = useMemo(() => {\n const map = new Map<\n string,\n { section_order: number; guides: OnboardingGuide[] }\n >()\n for (const g of initialGuides) {\n const existing = map.get(g.section)\n if (existing) {\n if (g.section_order < existing.section_order)\n existing.section_order = g.section_order\n existing.guides.push(g)\n } else {\n map.set(g.section, { section_order: g.section_order, guides: [g] })\n }\n }\n for (const entry of map.values()) {\n entry.guides.sort(\n (a, b) =>\n a.step_order - b.step_order || a.title.localeCompare(b.title),\n )\n }\n return Array.from(map.entries())\n .map(([section, info]) => ({ section, ...info }))\n .sort(\n (a, b) =>\n a.section_order - b.section_order ||\n a.section.localeCompare(b.section),\n )\n }, [initialGuides])\n\n // Section-filter options for the lib `<FilterSection>` row.\n const sectionFilterOptions = useMemo(\n () => [\n { value: 'all', label: `All (${initialGuides.length})` },\n ...initialSections.map((s) => ({\n value: s.section,\n label: `${s.section} (${s.count})`,\n })),\n ],\n [initialGuides.length, initialSections],\n )\n\n // Section pill change → push `?section=X` so the host RSC re-\n // fetches against the DAL. Wrapped in `useTransition` so the\n // results grid dims while the new payload is in flight.\n const setSection = (value: string) => {\n const params = new URLSearchParams(searchParams.toString())\n if (value === 'all') {\n params.delete('section')\n } else {\n params.set('section', value)\n }\n const qs = params.toString()\n startTransition(() => {\n router.push(qs ? `${basePath}?${qs}` : basePath)\n })\n }\n\n // Search bar — scoped to onboarding-guides only via the RAG-search\n // `tableIds` parameter. The hook calls `/api/docs/search` directly;\n // hub or embedder must expose that endpoint (reverse-proxy on\n // non-Next.js hosts).\n const source = runtime?.source ?? 'openframe'\n const docSearch = useDocSearch({\n source,\n baseRoute: basePath,\n onNavigate: (path) => router.push(path),\n tableIds: ['onboarding-guides'],\n })\n\n // Per-row card renderer — uses runtime-composed href for cross-\n // platform navigation. Falls back to a same-origin relative URL\n // when no composer is wired.\n const defaultRenderCard = (guide: OnboardingGuide) => {\n const cta = runtime?.composeContentUrl\n ? runtime.composeContentUrl(\n 'onboarding_guide',\n guide.slug,\n guide.onboarding_guide_platforms,\n )\n : buildDefaultHref(basePath, guide.slug)\n return (\n <OnboardingGuideCard\n guide={guide}\n href={cta.href}\n targetPlatform={cta.targetPlatform}\n size=\"catalog\"\n />\n )\n }\n const renderCardFn = renderCard ?? defaultRenderCard\n\n const preControls = (\n <div className=\"space-y-4\">\n <DocSearchBar\n placeholder=\"Search onboarding guides, releases, case studies…\"\n query={docSearch.query}\n onQueryChange={docSearch.setQuery}\n results={docSearch.results}\n isLoading={docSearch.isLoading}\n onResultSelect={docSearch.handleResultSelect}\n showDropdown={docSearch.keepDropdownOpen}\n />\n {initialSections.length > 0 && (\n <FilterPillRow\n label=\"Section\"\n selectedValue={activeSection}\n onValueChange={setSection}\n options={sectionFilterOptions}\n />\n )}\n </div>\n )\n\n return (\n <DevSectionPage sectionKey=\"onboarding\" preControls={preControls}>\n {initialGuides.length === 0 ? (\n <div className=\"text-center py-16\">\n <GraduationCap className=\"h-12 w-12 text-ods-text-secondary mx-auto mb-4\" />\n <h2 className=\"text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold mb-2\">\n No onboarding guides found\n </h2>\n <p className=\"text-ods-text-secondary font-['DM_Sans'] text-[14px]\">\n {activeSection !== 'all'\n ? 'No guides in this section yet.'\n : \"We're working on the onboarding library. Check back soon.\"}\n </p>\n </div>\n ) : (\n <div\n className={\n isPending\n ? 'opacity-60 transition-opacity space-y-10'\n : 'space-y-10'\n }\n >\n {grouped.map((sec) => (\n <section key={sec.section} className=\"space-y-4\">\n <h2 className=\"text-h3 tracking-[-0.36px] text-ods-text-primary flex items-center gap-2\">\n {sec.section}\n <span className=\"inline-flex items-center justify-center rounded-full bg-ods-text-secondary/20 text-ods-text-secondary text-xs font-medium px-2 py-0.5\">\n {sec.guides.length}\n </span>\n </h2>\n {/* HORIZONTAL catalog list — single column so consecutive\n steps read top-to-bottom (Step 1 above Step 2 above\n Step 3); a grid would visually reorder them. */}\n <ul className=\"flex flex-col gap-4\">\n {sec.guides.map((guide) => (\n <li key={guide.id}>{renderCardFn(guide)}</li>\n ))}\n </ul>\n </section>\n ))}\n </div>\n )}\n </DevSectionPage>\n )\n}\n","/**\n * Lib-internal helper — default href shape for onboarding-guide cards\n * when `runtime.composeContentUrl` is not wired (single-platform\n * embedders without cross-platform topology).\n *\n * Shared between `OnboardingGuidesCatalogView` (per-card href) and\n * `OnboardingGuideDetailView` (per-related-card href) so both views\n * compose hrefs from the same `basePath`-derived shape — no parallel\n * 4-line helper to drift apart.\n */\nexport function buildDefaultHref(\n basePath: string,\n slug: string,\n): { href: string; targetPlatform: string | null } {\n return { href: `${basePath}/${slug}`, targetPlatform: null }\n}\n","'use client'\n\n/**\n * Public-facing detail view for `/onboarding-guides/<slug>` on\n * openframe.\n *\n * Self-contained: every concern that used to require a hub-side\n * wrapper now flows through lib primitives + the ChatRuntime context.\n *\n * - Markdown: lib `<SimpleMarkdownRenderer>` (already lib-resident).\n * - Video warmup: lib `useVideoWarmup` (reads Supabase storage\n * origin from `runtime.endpoints.supabaseStorageOrigin`; Mux\n * origins are hardcoded public CDN hosts).\n * - Captions URL: lib `getCaptionsUrl` (pure URL builder).\n * - Video poster: inline priority chain\n * (`main_video_thumbnail || featured_image || og_image_url`) —\n * same fallbacks the card uses.\n * - Related card hrefs: `runtime.composeContentUrl?.(\n * 'onboarding_guide', slug, platforms)` — falls back to same-\n * origin relative path when no composer is wired.\n *\n * No hub-side wrapper file required. Optional `MarkdownRenderer`\n * prop lets hosts swap in a renderer with extra plugins (Reddit /\n * Twitter / X embeds) when needed.\n */\n\nimport { type ComponentType, type ReactNode } from 'react'\nimport { ArrowLeft } from 'lucide-react'\n\nimport { Link } from '../../embed-shims'\nimport { ArticleDetailLayout } from '../layout/article-detail-layout'\nimport { EntityVideoSection } from '../features/entity-video-section'\nimport { VideoBitesDisplay } from '../features/video-bites-display'\nimport { useVideoWarmup } from '../features/use-video-warmup'\nimport { getCaptionsUrl } from '../features/captions-url'\nimport { SimpleMarkdownRenderer } from '../ui/simple-markdown-renderer'\nimport { EntityAuthorCard } from '../chat/entity-cards/entity-author-card'\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card'\nimport { useChatRuntime } from '../../contexts/chat-runtime-context'\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide'\nimport type { VideoTeaser } from '../../types/video-processing'\nimport { buildDefaultHref } from './build-default-href'\n\nexport interface OnboardingGuideDetailViewProps {\n initialData: OnboardingGuide\n related?: OnboardingGuide[]\n /** Optional markdown renderer override. Defaults to lib\n * `<SimpleMarkdownRenderer>`. Hosts override when they need extra\n * plugins (Reddit / Twitter / X / code-block enhancements). */\n MarkdownRenderer?: ComponentType<{ content: string }>\n /** Optional per-row related-card renderer override. When omitted,\n * lib renders `<OnboardingGuideCard>` with runtime-composed href. */\n renderRelatedCard?: (guide: OnboardingGuide) => ReactNode\n /** Back-link target. Defaults to `basePath` so the link returns to\n * the catalog the embedder is hosting (no drift when `basePath`\n * is overridden). The admin preview explicitly overrides to\n * `/admin/onboarding-guides`. */\n backHref?: string\n /** Back-link label. Defaults to \"Back to Getting Started\". */\n backLabel?: string\n /** Base path the related-card hrefs default to when\n * `runtime.composeContentUrl` is not wired. Embedders mounting at\n * `/docs/onboarding/` instead of `/onboarding-guides/` should\n * override. Default `/onboarding-guides`. */\n basePath?: string\n}\n\nexport function OnboardingGuideDetailView({\n initialData: guide,\n related = [],\n MarkdownRenderer = SimpleMarkdownRenderer,\n renderRelatedCard,\n backHref,\n backLabel = 'Back to Getting Started',\n basePath = '/onboarding-guides',\n}: OnboardingGuideDetailViewProps) {\n // Resolve `backHref` from `basePath` when not explicitly set — so\n // an embedder overriding `basePath=\"/docs/onboarding\"` automatically\n // gets the right back link without remembering to thread `backHref`\n // too. Admin preview still wins via its explicit `backHref` override.\n const resolvedBackHref = backHref ?? basePath\n const runtime = useChatRuntime()\n\n // Video warmup — preconnect always fires; preload only when the\n // container scrolls within ~1 viewport AND the URL is on the\n // configured Supabase storage origin. No origin in runtime ⇒\n // preconnect-only path (Mux/YouTube unaffected).\n const { ref: videoWarmupRef } = useVideoWarmup<HTMLDivElement>({\n videoUrl: guide.main_video_url,\n supabaseStorageOrigin: runtime?.endpoints.supabaseStorageOrigin,\n })\n\n const captionsUrl = getCaptionsUrl(\n 'onboarding_guide',\n guide.id,\n guide.srt_content,\n )\n\n // Video poster — fallback chain:\n // 1. Entity-owned thumbnails (main_video_thumbnail / featured_image / og_image_url)\n // 2. Branded OG placeholder from `runtime.resolvePlaceholderUrl(title)`\n // — restores the hub's prior behavior where a video without a\n // thumbnail still showed a branded poster instead of a black\n // frame.\n // 3. `undefined` (player picks its own default poster — usually\n // first-frame extraction).\n const videoPoster =\n guide.main_video_thumbnail ||\n guide.featured_image ||\n guide.og_image_url ||\n runtime?.resolvePlaceholderUrl?.(guide.title, { aspect: 'wide' }) ||\n undefined\n\n // Default related-card renderer — runtime-composed cross-platform href.\n const defaultRenderRelatedCard = (g: OnboardingGuide) => {\n const cta = runtime?.composeContentUrl\n ? runtime.composeContentUrl(\n 'onboarding_guide',\n g.slug,\n g.onboarding_guide_platforms,\n )\n : buildDefaultHref(basePath, g.slug)\n return (\n <OnboardingGuideCard\n guide={g}\n href={cta.href}\n targetPlatform={cta.targetPlatform}\n />\n )\n }\n const renderRelatedCardFn = renderRelatedCard ?? defaultRenderRelatedCard\n\n return (\n <ArticleDetailLayout>\n <div className=\"space-y-6 md:space-y-8\">\n {/* Back link */}\n <Link\n href={resolvedBackHref}\n className=\"inline-flex items-center gap-2 text-ods-text-secondary hover:text-ods-accent transition-colors\"\n >\n <ArrowLeft className=\"h-4 w-4\" />\n <span className=\"text-h5\">{backLabel}</span>\n </Link>\n\n <h1 className=\"text-h1 tracking-[-1.12px] text-ods-text-primary\">\n {guide.title}\n </h1>\n\n {/* Metadata grid — Section · Step | Published | Author. */}\n <EntityAuthorCard\n author={guide.author}\n publishedAt={guide.published_at}\n extraCells={[\n {\n value: `${guide.section} · Step ${guide.step_order}`,\n label: 'Section',\n uppercase: false,\n },\n ]}\n />\n\n {/* Video. `main_video_url` (Mux/MP4) and `youtube_url` are\n independent columns — either one populated should render\n the player. `EntityVideoSection` routes accordingly. */}\n {(guide.main_video_url || guide.youtube_url) && (\n <div ref={videoWarmupRef}>\n <EntityVideoSection\n mainVideoUrl={guide.main_video_url}\n youtubeUrl={guide.youtube_url || undefined}\n highlightVideoUrl={guide.highlight_video_url}\n mainVideoPoster={videoPoster}\n highlightVideoThumbnail={guide.highlight_video_thumbnail || undefined}\n videoSummary={undefined}\n videoBites={undefined}\n title={guide.title}\n srtContent={guide.srt_content}\n captionsUrl={captionsUrl}\n MarkdownRenderer={MarkdownRenderer}\n />\n </div>\n )}\n\n {/* Markdown body */}\n {guide.content && (\n <div className=\"space-y-4\">\n <MarkdownRenderer content={guide.content} />\n </div>\n )}\n\n {/* Video Bites */}\n {guide.video_bites && guide.video_bites.length > 0 && (\n <VideoBitesDisplay\n bites={guide.video_bites as VideoTeaser[]}\n filterPublished={true}\n showTitle={false}\n />\n )}\n\n {/* Related — same-section, ordered by step. */}\n {related.length > 0 && (\n <div className=\"space-y-4 pt-8 border-t border-ods-border\">\n <h2 className=\"text-h3 tracking-[-0.36px] text-ods-text-primary\">\n More in {guide.section}\n </h2>\n <ul className=\"flex flex-col gap-3\">\n {related.map((r) => (\n <li key={r.id}>{renderRelatedCardFn(r)}</li>\n ))}\n </ul>\n </div>\n )}\n </div>\n </ArticleDetailLayout>\n )\n}\n","'use client'\n\nimport { DevSectionPage } from '../shared/dev-section'\nimport { OnboardingGuideCardSkeleton } from '../chat/entity-cards/onboarding-guide-card'\n\n/**\n * Page-level Suspense fallback for `/onboarding-guides`.\n *\n * Mirrors the loaded `<OnboardingGuidesCatalogView>` shape — both\n * mount the same `<DevSectionPage sectionKey=\"onboarding\">` so the\n * hero, back button, and overall page scaffold render identically.\n *\n * The `preControls` slot reserves space for the search bar (h-12)\n * plus the section pill row (~74px including padding) so the\n * Suspense → loaded transition doesn't shift vertically.\n *\n * Card distribution `4 + 3 + 3 = 10` matches the typical openframe\n * onboarding dataset; per-card height (288 px) is byte-identical to\n * the loaded card so per-card shifts on resolve are zero.\n */\nexport function OnboardingGuidesCatalogSkeleton() {\n return (\n <DevSectionPage\n sectionKey=\"onboarding\"\n preControls={\n <div className=\"space-y-4 animate-pulse\">\n {/* Search input placeholder — matches `<SearchInput>` h-12. */}\n <div className=\"h-12 w-full bg-ods-card border border-ods-border rounded-md\" />\n {/* Section pill row placeholder — same wrapper class set the\n hub-side `<FilterSection>` uses (~74 px). */}\n <div className=\"flex flex-wrap items-center gap-3 p-4 bg-ods-card border border-ods-border rounded-lg\">\n <div className=\"h-4 w-14 bg-ods-border/60 rounded\" />\n {[0, 1, 2, 3].map((i) => (\n <div\n key={i}\n className=\"h-10 w-24 bg-ods-card border border-ods-border rounded-md\"\n />\n ))}\n </div>\n </div>\n }\n >\n <div className=\"space-y-10 animate-pulse\">\n {[4, 3, 3].map((cardCount, sectionIdx) => (\n <section key={sectionIdx} className=\"space-y-4\">\n <h2 className=\"text-h3 tracking-[-0.36px] text-ods-text-primary flex items-center gap-2\">\n <span className=\"h-6 w-40 bg-ods-border/70 rounded\" />\n <span className=\"h-5 w-8 bg-ods-text-secondary/20 rounded-full\" />\n </h2>\n <ul className=\"flex flex-col gap-4\">\n {Array.from({ length: cardCount }).map((_, cardIdx) => (\n <li key={cardIdx}>\n <OnboardingGuideCardSkeleton size=\"catalog\" />\n </li>\n ))}\n </ul>\n </section>\n ))}\n </div>\n </DevSectionPage>\n )\n}\n","'use client'\n\n/**\n * React Query hooks for Onboarding Guides — PUBLIC reads only.\n *\n * Admin mutations (create/update/delete/publish/stats/save-highlight)\n * stay HUB-side in `hooks/use-onboarding-guides.ts` and import the\n * `onboardingGuideKeys.admin` sub-namespace from this module so the\n * cache namespace `['onboarding-guides']` has a single source of truth.\n *\n * Endpoints (`/api/onboarding-guides*`) are host-supplied — non-Next.js\n * embedders must reverse-proxy the same routes. Same precedent as the\n * tickets list hook.\n */\n\nimport { useQuery } from '@tanstack/react-query'\n\nimport type {\n OnboardingGuide,\n OnboardingGuideFilters,\n OnboardingGuideListResponse,\n OnboardingGuideSectionSummary,\n} from '../../chat/types/entities/onboarding-guide'\n\n/**\n * Cache key builder for the `['onboarding-guides']` namespace.\n *\n * Includes BOTH public-read sub-keys (`lists`, `list`, `details`,\n * `detail`, `sections`) AND the `admin` sub-namespace. Admin mutations\n * live hub-side but invalidate against this same builder so a single\n * `qc.invalidateQueries({ queryKey: onboardingGuideKeys.all })` from\n * an admin hook also clears the public read cache.\n */\nexport const onboardingGuideKeys = {\n all: ['onboarding-guides'] as const,\n lists: () => [...onboardingGuideKeys.all, 'list'] as const,\n list: (filters: OnboardingGuideFilters) =>\n [...onboardingGuideKeys.lists(), filters] as const,\n details: () => [...onboardingGuideKeys.all, 'detail'] as const,\n detail: (slug: string) => [...onboardingGuideKeys.details(), slug] as const,\n sections: () => [...onboardingGuideKeys.all, 'sections'] as const,\n admin: {\n all: ['admin', 'onboarding-guides'] as const,\n lists: () => ['admin', 'onboarding-guides', 'list'] as const,\n detail: (slug: string) =>\n ['admin', 'onboarding-guide', slug] as const,\n stats: () => ['admin', 'onboarding-guides', 'stats'] as const,\n },\n}\n\nexport function useOnboardingGuides(filters?: OnboardingGuideFilters) {\n return useQuery({\n queryKey: onboardingGuideKeys.list(filters || {}),\n queryFn: async (): Promise<OnboardingGuideListResponse> => {\n const params = new URLSearchParams()\n if (filters?.search) params.set('search', filters.search)\n if (filters?.section) params.set('section', filters.section)\n if (filters?.limit) params.set('limit', filters.limit.toString())\n if (filters?.offset) params.set('offset', filters.offset.toString())\n const res = await fetch(`/api/onboarding-guides?${params}`)\n if (!res.ok) throw new Error('Failed to fetch onboarding guides')\n return res.json()\n },\n })\n}\n\nexport function useOnboardingGuide(slug: string | undefined) {\n return useQuery({\n queryKey: onboardingGuideKeys.detail(slug || ''),\n queryFn: async (): Promise<OnboardingGuide> => {\n const res = await fetch(`/api/onboarding-guides/${slug}`)\n if (!res.ok) throw new Error('Failed to fetch onboarding guide')\n return res.json()\n },\n enabled: !!slug,\n })\n}\n\nexport function useOnboardingGuideSections() {\n return useQuery({\n queryKey: onboardingGuideKeys.sections(),\n queryFn: async (): Promise<OnboardingGuideSectionSummary[]> => {\n const res = await fetch('/api/onboarding-guides/sections')\n if (!res.ok)\n throw new Error('Failed to fetch onboarding-guide sections')\n return res.json()\n },\n staleTime: 0,\n })\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Onboarding Guides surface barrel.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `components/tickets/` — top-level openframe-route-specific
|
|
5
|
+
* product surface (NOT under `shared/`, which is reserved for
|
|
6
|
+
* cross-platform marketing).
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT: this barrel MUST NOT re-export `OnboardingGuide`,
|
|
9
|
+
* `OnboardingGuideFilters`, `OnboardingGuideListResponse`, or
|
|
10
|
+
* `OnboardingGuideSectionSummary`. Those types already flow via
|
|
11
|
+
* `components/chat/types/entities/onboarding-guide.ts` (re-exported
|
|
12
|
+
* from `components/chat` through `./types/*`). A duplicate path
|
|
13
|
+
* triggers TypeScript's TS2308 ambiguous re-export at the top-level
|
|
14
|
+
* `components/index.ts` barrel — same gotcha documented for
|
|
15
|
+
* `RoadmapItem` at `shared/roadmap/index.ts:1-14`.
|
|
16
|
+
*
|
|
17
|
+
* Consumers needing the row type:
|
|
18
|
+
* import type { OnboardingGuide } from
|
|
19
|
+
* '@flamingo-stack/openframe-frontend-core/components/chat'
|
|
20
|
+
*/
|
|
21
|
+
export { OnboardingGuidesCatalogView, type OnboardingGuidesCatalogViewProps, } from './onboarding-guides-catalog-view';
|
|
22
|
+
export { OnboardingGuideDetailView, type OnboardingGuideDetailViewProps, } from './onboarding-guide-detail-view';
|
|
23
|
+
export { OnboardingGuidesCatalogSkeleton, } from './onboarding-guides-catalog-skeleton';
|
|
24
|
+
export { useOnboardingGuides, useOnboardingGuide, useOnboardingGuideSections, onboardingGuideKeys, } from './hooks/use-onboarding-guides';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/onboarding-guides/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,2BAA2B,EAC3B,KAAK,gCAAgC,GACtC,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,yBAAyB,EACzB,KAAK,8BAA8B,GACpC,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,+BAA+B,GAChC,MAAM,sCAAsC,CAAA;AAE7C,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,+BAA+B,CAAA"}
|