@flamingo-stack/openframe-frontend-core 0.0.692 → 0.0.693-snapshot.20261002120603

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.
Files changed (205) hide show
  1. package/dist/chat-protocol/events.d.ts +3 -0
  2. package/dist/chat-protocol/events.d.ts.map +1 -1
  3. package/dist/chat-protocol/frames.d.ts +6 -0
  4. package/dist/chat-protocol/frames.d.ts.map +1 -1
  5. package/dist/chat-protocol/index.cjs +26 -1
  6. package/dist/chat-protocol/index.cjs.map +1 -1
  7. package/dist/chat-protocol/index.d.ts +1 -0
  8. package/dist/chat-protocol/index.d.ts.map +1 -1
  9. package/dist/chat-protocol/index.js +23 -2
  10. package/dist/chat-protocol/index.js.map +1 -1
  11. package/dist/chat-protocol/leading-frames.d.ts.map +1 -1
  12. package/dist/chat-protocol/progress.d.ts +35 -0
  13. package/dist/chat-protocol/progress.d.ts.map +1 -0
  14. package/dist/{chunk-GDZ7IC5B.js → chunk-234IIQIS.js} +2 -2
  15. package/dist/{chunk-KDCIYRZV.cjs → chunk-2EQED5SZ.cjs} +34 -34
  16. package/dist/{chunk-KDCIYRZV.cjs.map → chunk-2EQED5SZ.cjs.map} +1 -1
  17. package/dist/{chunk-JUNOY5HK.js → chunk-2HX6AADM.js} +15 -17
  18. package/dist/chunk-2HX6AADM.js.map +1 -0
  19. package/dist/{chunk-X5XFKI6N.js → chunk-33L2IR62.js} +3 -3
  20. package/dist/{chunk-A5NHAHV6.js → chunk-42LIHMRA.js} +4 -4
  21. package/dist/{chunk-MIZU2OTO.cjs → chunk-63BLVGXZ.cjs} +4 -4
  22. package/dist/{chunk-MIZU2OTO.cjs.map → chunk-63BLVGXZ.cjs.map} +1 -1
  23. package/dist/{chunk-TEIHEFXP.js → chunk-6ZSDKDOV.js} +8 -8
  24. package/dist/{chunk-UVUNBXS6.js → chunk-7IINE3MK.js} +48 -5
  25. package/dist/chunk-7IINE3MK.js.map +1 -0
  26. package/dist/{chunk-N3526CTH.cjs → chunk-7TO3CWPM.cjs} +3 -3
  27. package/dist/{chunk-N3526CTH.cjs.map → chunk-7TO3CWPM.cjs.map} +1 -1
  28. package/dist/{chunk-TXFGG47A.js → chunk-7VO6NC67.js} +4 -4
  29. package/dist/{chunk-SC44YJCF.js → chunk-A7RKT5SO.js} +2 -2
  30. package/dist/{chunk-Y7ZEVTLC.js → chunk-BW6YBATM.js} +141 -71
  31. package/dist/chunk-BW6YBATM.js.map +1 -0
  32. package/dist/{chunk-GZRU2A4L.cjs → chunk-C27F6GBZ.cjs} +790 -720
  33. package/dist/chunk-C27F6GBZ.cjs.map +1 -0
  34. package/dist/{chunk-DVSPRY2V.cjs → chunk-ESMDIJIN.cjs} +3 -3
  35. package/dist/{chunk-DVSPRY2V.cjs.map → chunk-ESMDIJIN.cjs.map} +1 -1
  36. package/dist/{chunk-EXWS2QSD.cjs → chunk-FNGX5WZM.cjs} +497 -474
  37. package/dist/chunk-FNGX5WZM.cjs.map +1 -0
  38. package/dist/{chunk-RK47E3PP.js → chunk-GWQCUC53.js} +4 -4
  39. package/dist/{chunk-AVAZ6BD6.js → chunk-HBMGSGZY.js} +6 -6
  40. package/dist/{chunk-HM7ZGABI.js → chunk-HEBLLLLD.js} +2 -2
  41. package/dist/{chunk-7BNWMOPM.cjs → chunk-HJZ3UTUE.cjs} +83 -83
  42. package/dist/{chunk-7BNWMOPM.cjs.map → chunk-HJZ3UTUE.cjs.map} +1 -1
  43. package/dist/{chunk-ATREVNIN.cjs → chunk-JB25CCOB.cjs} +47 -47
  44. package/dist/{chunk-ATREVNIN.cjs.map → chunk-JB25CCOB.cjs.map} +1 -1
  45. package/dist/{chunk-Q25VYAEL.cjs → chunk-JISKS7RJ.cjs} +26 -26
  46. package/dist/{chunk-Q25VYAEL.cjs.map → chunk-JISKS7RJ.cjs.map} +1 -1
  47. package/dist/{chunk-WTYQCT4A.cjs → chunk-K5GSLGV2.cjs} +18 -18
  48. package/dist/{chunk-WTYQCT4A.cjs.map → chunk-K5GSLGV2.cjs.map} +1 -1
  49. package/dist/{chunk-CG7OWW7X.cjs → chunk-K5K2FRQK.cjs} +19 -19
  50. package/dist/{chunk-CG7OWW7X.cjs.map → chunk-K5K2FRQK.cjs.map} +1 -1
  51. package/dist/{chunk-CKUPANVU.cjs → chunk-KBSL4FCL.cjs} +9 -9
  52. package/dist/{chunk-CKUPANVU.cjs.map → chunk-KBSL4FCL.cjs.map} +1 -1
  53. package/dist/{chunk-SDORFSFK.cjs → chunk-KDUDL4PB.cjs} +37 -37
  54. package/dist/{chunk-SDORFSFK.cjs.map → chunk-KDUDL4PB.cjs.map} +1 -1
  55. package/dist/{chunk-5XPK2QGU.cjs → chunk-KJHIFF6H.cjs} +16 -16
  56. package/dist/{chunk-5XPK2QGU.cjs.map → chunk-KJHIFF6H.cjs.map} +1 -1
  57. package/dist/{chunk-MCNQKS6I.js → chunk-LHYOESIQ.js} +4 -4
  58. package/dist/{chunk-DUURFYGS.cjs → chunk-LPFU6U7O.cjs} +5 -5
  59. package/dist/{chunk-DUURFYGS.cjs.map → chunk-LPFU6U7O.cjs.map} +1 -1
  60. package/dist/{chunk-ZAV2F4VX.js → chunk-N7HFUBOV.js} +3 -3
  61. package/dist/{chunk-53O6PQ3F.cjs → chunk-NDLFK57D.cjs} +7 -7
  62. package/dist/{chunk-53O6PQ3F.cjs.map → chunk-NDLFK57D.cjs.map} +1 -1
  63. package/dist/{chunk-Z7QCNCBN.js → chunk-O4RDXDVS.js} +12 -12
  64. package/dist/{chunk-F6LXGP6S.cjs → chunk-Q2B2MGFU.cjs} +7 -7
  65. package/dist/{chunk-F6LXGP6S.cjs.map → chunk-Q2B2MGFU.cjs.map} +1 -1
  66. package/dist/{chunk-CKO6NKNE.js → chunk-QP54LMXJ.js} +38 -15
  67. package/dist/{chunk-CKO6NKNE.js.map → chunk-QP54LMXJ.js.map} +1 -1
  68. package/dist/{chunk-QRA2JXE4.cjs → chunk-RE6PGOSS.cjs} +6 -8
  69. package/dist/chunk-RE6PGOSS.cjs.map +1 -0
  70. package/dist/{chunk-C2SVJVEB.js → chunk-SH5GPYSV.js} +2 -2
  71. package/dist/{chunk-KQZMM3QJ.cjs → chunk-SJFB4Z4L.cjs} +105 -105
  72. package/dist/{chunk-KQZMM3QJ.cjs.map → chunk-SJFB4Z4L.cjs.map} +1 -1
  73. package/dist/{chunk-7EPGJOKN.js → chunk-TA3JJFEO.js} +4 -4
  74. package/dist/{chunk-LYJJH4D6.js → chunk-TBR3UTFY.js} +6 -6
  75. package/dist/{chunk-USKQURNF.cjs → chunk-TG3VBMDG.cjs} +3 -3
  76. package/dist/{chunk-USKQURNF.cjs.map → chunk-TG3VBMDG.cjs.map} +1 -1
  77. package/dist/{chunk-IQTQIBZ3.js → chunk-TV5SZJ3N.js} +12 -12
  78. package/dist/{chunk-RLNNV46K.js → chunk-TXSQLORA.js} +6 -6
  79. package/dist/{chunk-LYQULSK4.js → chunk-UCXZRJIE.js} +7 -7
  80. package/dist/{chunk-I27PWVWE.cjs → chunk-WT4HURQN.cjs} +46 -3
  81. package/dist/chunk-WT4HURQN.cjs.map +1 -0
  82. package/dist/{chunk-XAOAYDGR.js → chunk-WZJWIZVH.js} +4 -4
  83. package/dist/{chunk-PKZGXRU2.js → chunk-XKNKGBUX.js} +10 -8
  84. package/dist/{chunk-PKZGXRU2.js.map → chunk-XKNKGBUX.js.map} +1 -1
  85. package/dist/{chunk-LNKLB7GM.cjs → chunk-XNTQHC26.cjs} +28 -28
  86. package/dist/{chunk-LNKLB7GM.cjs.map → chunk-XNTQHC26.cjs.map} +1 -1
  87. package/dist/{chunk-2YVTGPM7.js → chunk-XZILGCXJ.js} +2 -2
  88. package/dist/{chunk-DKJDO7YM.cjs → chunk-Y5AFMYYN.cjs} +46 -44
  89. package/dist/chunk-Y5AFMYYN.cjs.map +1 -0
  90. package/dist/{chunk-FTK3S57R.cjs → chunk-ZCPMWXIB.cjs} +25 -25
  91. package/dist/{chunk-FTK3S57R.cjs.map → chunk-ZCPMWXIB.cjs.map} +1 -1
  92. package/dist/{chunk-RTKF5AYA.cjs → chunk-ZUGAHQDB.cjs} +7 -7
  93. package/dist/{chunk-RTKF5AYA.cjs.map → chunk-ZUGAHQDB.cjs.map} +1 -1
  94. package/dist/components/case-studies/index.cjs +21 -21
  95. package/dist/components/case-studies/index.js +8 -8
  96. package/dist/components/chat/chat-message-list.d.ts.map +1 -1
  97. package/dist/components/chat/chat-typing-indicator.d.ts.map +1 -1
  98. package/dist/components/chat/cycling-phrase.d.ts.map +1 -1
  99. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  100. package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
  101. package/dist/components/chat/hooks/use-unified-chat.d.ts.map +1 -1
  102. package/dist/components/chat/index.cjs +5 -5
  103. package/dist/components/chat/index.js +4 -4
  104. package/dist/components/chat/stream/chat-dialog-store.d.ts.map +1 -1
  105. package/dist/components/chat/stream/chat-stream-reducer.d.ts +4 -0
  106. package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
  107. package/dist/components/chat/types/component.types.d.ts +2 -0
  108. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  109. package/dist/components/chat/types/unified-chat-state.types.d.ts +5 -0
  110. package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
  111. package/dist/components/contact/index.cjs +9 -9
  112. package/dist/components/contact/index.js +8 -8
  113. package/dist/components/docs/index.cjs +12 -12
  114. package/dist/components/docs/index.js +11 -11
  115. package/dist/components/embeds/index.cjs +9 -9
  116. package/dist/components/embeds/index.js +8 -8
  117. package/dist/components/faq/index.cjs +10 -10
  118. package/dist/components/faq/index.js +9 -9
  119. package/dist/components/features/index.cjs +8 -8
  120. package/dist/components/features/index.js +7 -7
  121. package/dist/components/help-center-pages/index.cjs +107 -107
  122. package/dist/components/help-center-pages/index.js +22 -22
  123. package/dist/components/index.cjs +69 -69
  124. package/dist/components/index.js +22 -22
  125. package/dist/components/meeting-scheduler/index.cjs +59 -59
  126. package/dist/components/meeting-scheduler/index.js +9 -9
  127. package/dist/components/navigation/app-layout-drawer.d.ts.map +1 -1
  128. package/dist/components/navigation/index.cjs +11 -11
  129. package/dist/components/navigation/index.js +10 -10
  130. package/dist/components/onboarding-guides/index.cjs +12 -12
  131. package/dist/components/onboarding-guides/index.js +11 -11
  132. package/dist/components/related-content/index.cjs +6 -6
  133. package/dist/components/related-content/index.js +5 -5
  134. package/dist/components/tickets/index.cjs +13 -13
  135. package/dist/components/tickets/index.js +12 -12
  136. package/dist/components/ui/index.cjs +8 -8
  137. package/dist/components/ui/index.js +7 -7
  138. package/dist/components/ui/markdown/engine.d.ts +0 -21
  139. package/dist/components/ui/markdown/engine.d.ts.map +1 -1
  140. package/dist/hooks/index.cjs +6 -6
  141. package/dist/hooks/index.cjs.map +1 -1
  142. package/dist/hooks/index.js +5 -5
  143. package/dist/hooks/use-authed-asset-src.d.ts.map +1 -1
  144. package/dist/index.cjs +15 -15
  145. package/dist/index.cjs.map +1 -1
  146. package/dist/index.js +12 -12
  147. package/dist/tailwind.config.cjs +14 -1
  148. package/dist/tailwind.config.cjs.map +1 -1
  149. package/dist/tailwind.config.js +14 -1
  150. package/dist/tailwind.config.js.map +1 -1
  151. package/eslint-config/README.md +13 -0
  152. package/eslint-config/base.js +15 -0
  153. package/eslint-config/webview-performance.js +75 -0
  154. package/package.json +1 -1
  155. package/src/chat-protocol/__tests__/progress.test.ts +39 -0
  156. package/src/chat-protocol/events.ts +3 -0
  157. package/src/chat-protocol/frames.ts +7 -0
  158. package/src/chat-protocol/index.ts +2 -0
  159. package/src/chat-protocol/leading-frames.ts +4 -1
  160. package/src/chat-protocol/progress.ts +55 -0
  161. package/src/components/chat/chat-message-enhanced.tsx +1 -1
  162. package/src/components/chat/chat-message-list.tsx +65 -15
  163. package/src/components/chat/chat-typing-indicator.tsx +18 -29
  164. package/src/components/chat/cycling-phrase.tsx +1 -11
  165. package/src/components/chat/embeddable-chat.tsx +14 -6
  166. package/src/components/chat/hooks/use-sse-chat-adapter.ts +2 -0
  167. package/src/components/chat/hooks/use-unified-chat.ts +1 -0
  168. package/src/components/chat/stream/__tests__/chat-stream-reducer-progress.test.ts +40 -0
  169. package/src/components/chat/stream/chat-dialog-store.ts +1 -0
  170. package/src/components/chat/stream/chat-stream-reducer.ts +13 -0
  171. package/src/components/chat/types/component.types.ts +2 -0
  172. package/src/components/chat/types/unified-chat-state.types.ts +6 -0
  173. package/src/components/navigation/app-layout-drawer.tsx +53 -7
  174. package/src/components/ui/__tests__/__snapshots__/markdown-parity.test.tsx.snap +29 -29
  175. package/src/components/ui/markdown/engine.tsx +56 -12
  176. package/src/hooks/use-authed-asset-src.ts +58 -6
  177. package/tailwind.config.ts +13 -0
  178. package/dist/chunk-DKJDO7YM.cjs.map +0 -1
  179. package/dist/chunk-EXWS2QSD.cjs.map +0 -1
  180. package/dist/chunk-GZRU2A4L.cjs.map +0 -1
  181. package/dist/chunk-I27PWVWE.cjs.map +0 -1
  182. package/dist/chunk-JUNOY5HK.js.map +0 -1
  183. package/dist/chunk-QRA2JXE4.cjs.map +0 -1
  184. package/dist/chunk-UVUNBXS6.js.map +0 -1
  185. package/dist/chunk-Y7ZEVTLC.js.map +0 -1
  186. /package/dist/{chunk-GDZ7IC5B.js.map → chunk-234IIQIS.js.map} +0 -0
  187. /package/dist/{chunk-X5XFKI6N.js.map → chunk-33L2IR62.js.map} +0 -0
  188. /package/dist/{chunk-A5NHAHV6.js.map → chunk-42LIHMRA.js.map} +0 -0
  189. /package/dist/{chunk-TEIHEFXP.js.map → chunk-6ZSDKDOV.js.map} +0 -0
  190. /package/dist/{chunk-TXFGG47A.js.map → chunk-7VO6NC67.js.map} +0 -0
  191. /package/dist/{chunk-SC44YJCF.js.map → chunk-A7RKT5SO.js.map} +0 -0
  192. /package/dist/{chunk-RK47E3PP.js.map → chunk-GWQCUC53.js.map} +0 -0
  193. /package/dist/{chunk-AVAZ6BD6.js.map → chunk-HBMGSGZY.js.map} +0 -0
  194. /package/dist/{chunk-HM7ZGABI.js.map → chunk-HEBLLLLD.js.map} +0 -0
  195. /package/dist/{chunk-MCNQKS6I.js.map → chunk-LHYOESIQ.js.map} +0 -0
  196. /package/dist/{chunk-ZAV2F4VX.js.map → chunk-N7HFUBOV.js.map} +0 -0
  197. /package/dist/{chunk-Z7QCNCBN.js.map → chunk-O4RDXDVS.js.map} +0 -0
  198. /package/dist/{chunk-C2SVJVEB.js.map → chunk-SH5GPYSV.js.map} +0 -0
  199. /package/dist/{chunk-7EPGJOKN.js.map → chunk-TA3JJFEO.js.map} +0 -0
  200. /package/dist/{chunk-LYJJH4D6.js.map → chunk-TBR3UTFY.js.map} +0 -0
  201. /package/dist/{chunk-IQTQIBZ3.js.map → chunk-TV5SZJ3N.js.map} +0 -0
  202. /package/dist/{chunk-RLNNV46K.js.map → chunk-TXSQLORA.js.map} +0 -0
  203. /package/dist/{chunk-LYQULSK4.js.map → chunk-UCXZRJIE.js.map} +0 -0
  204. /package/dist/{chunk-XAOAYDGR.js.map → chunk-WZJWIZVH.js.map} +0 -0
  205. /package/dist/{chunk-2YVTGPM7.js.map → chunk-XZILGCXJ.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"leading-frames.d.ts","sourceRoot":"","sources":["../../src/chat-protocol/leading-frames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AASD;;;2DAG2D;AAC3D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,IAAI,CAsH3F"}
1
+ {"version":3,"file":"leading-frames.d.ts","sourceRoot":"","sources":["../../src/chat-protocol/leading-frames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AASD;;;2DAG2D;AAC3D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,IAAI,CAwH3F"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * What a turn is doing before its first answer token: the named stages a server
3
+ * reports while it works, and the line a client shows for each.
4
+ *
5
+ * A retrieval chat spends seconds before any text exists (reading the question,
6
+ * searching, reading what it found). A generic spinner for that whole time says
7
+ * nothing; a line naming the real step ("Searching 28 sources") does, and people
8
+ * wait more willingly for it. The stage is a FIXED vocabulary on the wire (never
9
+ * model text, a rewritten query or a source name), so it is safe on a public
10
+ * chat and the wording stays the client's: `chatProgressLabel` is the one place
11
+ * the copy lives.
12
+ *
13
+ * Wire: the existing `{ status: 'thinking' }` leading frame, with an optional
14
+ * `stage` and `count`. A client that predates the stage reads the frame exactly
15
+ * as before; a client that knows it shows the line. A stage it does not know is
16
+ * dropped (the frame is still a plain "thinking").
17
+ *
18
+ * Server-safe: no React, no browser APIs.
19
+ */
20
+ export declare const CHAT_PROGRESS_STAGES: readonly ["understanding", "searching", "searching_again", "reading"];
21
+ export type ChatProgressStage = (typeof CHAT_PROGRESS_STAGES)[number];
22
+ export interface ChatProgress {
23
+ stage: ChatProgressStage;
24
+ /** How many of the thing the stage works on: sources searched, results read. */
25
+ count?: number;
26
+ }
27
+ export declare function isChatProgressStage(value: unknown): value is ChatProgressStage;
28
+ /** A parsed status frame's progress, or null when it carries no stage this client knows. */
29
+ export declare function chatProgressOf(frame: {
30
+ stage?: unknown;
31
+ count?: unknown;
32
+ }): ChatProgress | null;
33
+ /** The one line shown for a stage. Specific when the server gave a real count, never an invented one. */
34
+ export declare function chatProgressLabel(progress: ChatProgress): string;
35
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/chat-protocol/progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,oBAAoB,uEAAwE,CAAC;AAE1G,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,iBAAiB,CAAC;IACzB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E;AAED,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,YAAY,GAAG,IAAI,CAO/F;AASD,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAEhE"}
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  embedAuthedFetch,
4
4
  hasEmbedAuthAdapter
5
- } from "./chunk-UVUNBXS6.js";
5
+ } from "./chunk-7IINE3MK.js";
6
6
 
7
7
  // src/utils/search-params.ts
8
8
  function positiveInt(raw, fallback, { min = 1, max } = {}) {
@@ -142,4 +142,4 @@ export {
142
142
  serializeSchemaParams,
143
143
  withQuery
144
144
  };
145
- //# sourceMappingURL=chunk-GDZ7IC5B.js.map
145
+ //# sourceMappingURL=chunk-234IIQIS.js.map
@@ -2,14 +2,14 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkF6LXGP6Scjs = require('./chunk-F6LXGP6S.cjs');
5
+ var _chunkQ2B2MGFUcjs = require('./chunk-Q2B2MGFU.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunk5XPK2QGUcjs = require('./chunk-5XPK2QGU.cjs');
9
+ var _chunkKJHIFF6Hcjs = require('./chunk-KJHIFF6H.cjs');
10
10
 
11
11
 
12
- var _chunkUSKQURNFcjs = require('./chunk-USKQURNF.cjs');
12
+ var _chunkTG3VBMDGcjs = require('./chunk-TG3VBMDG.cjs');
13
13
 
14
14
 
15
15
 
@@ -18,13 +18,13 @@ var _chunkUSKQURNFcjs = require('./chunk-USKQURNF.cjs');
18
18
 
19
19
 
20
20
 
21
- var _chunkEXWS2QSDcjs = require('./chunk-EXWS2QSD.cjs');
21
+ var _chunkFNGX5WZMcjs = require('./chunk-FNGX5WZM.cjs');
22
22
 
23
23
 
24
24
 
25
25
 
26
26
 
27
- var _chunkGZRU2A4Lcjs = require('./chunk-GZRU2A4L.cjs');
27
+ var _chunkC27F6GBZcjs = require('./chunk-C27F6GBZ.cjs');
28
28
 
29
29
 
30
30
 
@@ -34,10 +34,10 @@ var _chunkSADRZ4YIcjs = require('./chunk-SADRZ4YI.cjs');
34
34
 
35
35
 
36
36
 
37
- var _chunk53O6PQ3Fcjs = require('./chunk-53O6PQ3F.cjs');
37
+ var _chunkNDLFK57Dcjs = require('./chunk-NDLFK57D.cjs');
38
38
 
39
39
 
40
- var _chunkI27PWVWEcjs = require('./chunk-I27PWVWE.cjs');
40
+ var _chunkWT4HURQNcjs = require('./chunk-WT4HURQN.cjs');
41
41
 
42
42
 
43
43
  var _chunkU2YLMFJKcjs = require('./chunk-U2YLMFJK.cjs');
@@ -62,7 +62,7 @@ function OnboardingGuidesCatalogSkeleton() {
62
62
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-6 w-40 rounded bg-ods-border/70" }),
63
63
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "h-5 w-8 rounded-full bg-ods-text-secondary/20" })
64
64
  ] }),
65
- /* @__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, _chunk53O6PQ3Fcjs.OnboardingGuideCardSkeleton, { size: "catalog" }) }, cardIdx)) })
65
+ /* @__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, _chunkNDLFK57Dcjs.OnboardingGuideCardSkeleton, { size: "catalog" }) }, cardIdx)) })
66
66
  ] }, sectionIdx)) })
67
67
  ] });
68
68
  }
@@ -86,10 +86,10 @@ function OnboardingGuidesCatalogView({
86
86
  const sectionValue = selfFetch ? _nullishCoalesce(searchParams.get("section"), () => ( "")) : initialSection;
87
87
  const activeSection = sectionValue || "all";
88
88
  const guidesQs = sectionValue ? `?section=${encodeURIComponent(sectionValue)}` : "";
89
- const guidesRes = _chunkUSKQURNFcjs.useSelfFetch.call(void 0,
89
+ const guidesRes = _chunkTG3VBMDGcjs.useSelfFetch.call(void 0,
90
90
  selfFetch && guidesEndpoint ? `${guidesEndpoint}${guidesQs}` : null
91
91
  );
92
- const sectionsRes = _chunkUSKQURNFcjs.useSelfFetch.call(void 0, selfFetch && sectionsEndpoint ? sectionsEndpoint : null);
92
+ const sectionsRes = _chunkTG3VBMDGcjs.useSelfFetch.call(void 0, selfFetch && sectionsEndpoint ? sectionsEndpoint : null);
93
93
  const guides = _react.useMemo.call(void 0, () => _nullishCoalesce(_nullishCoalesce(initialGuides, () => ( _optionalChain([guidesRes, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.data]))), () => ( [])), [initialGuides, _optionalChain([guidesRes, 'access', _4 => _4.data, 'optionalAccess', _5 => _5.data])]);
94
94
  const sections = _react.useMemo.call(void 0,
95
95
  () => _nullishCoalesce(initialSections, () => ( (Array.isArray(sectionsRes.data) ? sectionsRes.data : []))),
@@ -132,25 +132,25 @@ function OnboardingGuidesCatalogView({
132
132
  });
133
133
  };
134
134
  const source = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _6 => _6.source]), () => ( "openframe"));
135
- const docSearch = _chunk5XPK2QGUcjs.useDocSearch.call(void 0, {
135
+ const docSearch = _chunkKJHIFF6Hcjs.useDocSearch.call(void 0, {
136
136
  source,
137
137
  baseRoute: basePath,
138
138
  onNavigate: (path) => router.push(path),
139
139
  tableIds: ["onboarding-guides"]
140
140
  });
141
141
  const defaultRenderCard = (guide) => {
142
- const cta = _chunkEXWS2QSDcjs.resolveContentHref.call(void 0, _optionalChain([runtime, 'optionalAccess', _7 => _7.composeContentUrl]), {
142
+ const cta = _chunkFNGX5WZMcjs.resolveContentHref.call(void 0, _optionalChain([runtime, 'optionalAccess', _7 => _7.composeContentUrl]), {
143
143
  type: "onboarding_guide",
144
144
  slug: guide.slug,
145
145
  basePath,
146
146
  platforms: guide.onboarding_guide_platforms
147
147
  });
148
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk53O6PQ3Fcjs.OnboardingGuideCard, { guide, href: cta.href, targetPlatform: cta.targetPlatform, size: "catalog" });
148
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNDLFK57Dcjs.OnboardingGuideCard, { guide, href: cta.href, targetPlatform: cta.targetPlatform, size: "catalog" });
149
149
  };
150
150
  const renderCardFn = _nullishCoalesce(renderCard, () => ( defaultRenderCard));
151
151
  const preControls = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
152
152
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
153
- _chunk5XPK2QGUcjs.DocSearchBar,
153
+ _chunkKJHIFF6Hcjs.DocSearchBar,
154
154
  {
155
155
  placeholder: "Search onboarding guides, releases, case studies\u2026",
156
156
  query: docSearch.query,
@@ -162,7 +162,7 @@ function OnboardingGuidesCatalogView({
162
162
  }
163
163
  ),
164
164
  sections.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
165
- _chunkEXWS2QSDcjs.FilterPillRow,
165
+ _chunkFNGX5WZMcjs.FilterPillRow,
166
166
  {
167
167
  label: "Section",
168
168
  selectedValue: activeSection,
@@ -172,7 +172,7 @@ function OnboardingGuidesCatalogView({
172
172
  )
173
173
  ] });
174
174
  if (selfFetch && guidesRes.error) {
175
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEXWS2QSDcjs.LoadError, { message: "Failed to load onboarding guides.", onRetry: guidesRes.reload });
175
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFNGX5WZMcjs.LoadError, { message: "Failed to load onboarding guides.", onRetry: guidesRes.reload });
176
176
  }
177
177
  if (selfFetch && guidesRes.data == null && isLoading) {
178
178
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, OnboardingGuidesCatalogSkeleton, {});
@@ -204,7 +204,7 @@ function OnboardingGuideDetailView({
204
204
  slug,
205
205
  guideEndpoint,
206
206
  related = [],
207
- MarkdownRenderer = _chunkEXWS2QSDcjs.RichMarkdownRenderer,
207
+ MarkdownRenderer = _chunkFNGX5WZMcjs.RichMarkdownRenderer,
208
208
  renderRelatedCard,
209
209
  backHref,
210
210
  backLabel = "Back to Getting Started",
@@ -214,51 +214,51 @@ function OnboardingGuideDetailView({
214
214
  }) {
215
215
  const resolvedBackHref = _nullishCoalesce(backHref, () => ( basePath));
216
216
  const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
217
- const captions = _chunkGZRU2A4Lcjs.useCaptions.call(void 0, );
217
+ const captions = _chunkC27F6GBZcjs.useCaptions.call(void 0, );
218
218
  const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
219
- const renderShell = (node) => shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEXWS2QSDcjs.PageShell, { children: node }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: node });
219
+ const renderShell = (node) => shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFNGX5WZMcjs.PageShell, { children: node }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: node });
220
220
  const url = initialData ? null : slug && guideEndpoint ? guideEndpoint(slug) : null;
221
- const { data: guide, isLoading, error, reload } = _chunkUSKQURNFcjs.useSelfFetch.call(void 0, url, { initialData });
222
- const { ref: videoWarmupRef } = _chunkGZRU2A4Lcjs.useVideoWarmup.call(void 0, {
221
+ const { data: guide, isLoading, error, reload } = _chunkTG3VBMDGcjs.useSelfFetch.call(void 0, url, { initialData });
222
+ const { ref: videoWarmupRef } = _chunkC27F6GBZcjs.useVideoWarmup.call(void 0, {
223
223
  videoUrl: _optionalChain([guide, 'optionalAccess', _8 => _8.main_video_url]),
224
224
  supabaseStorageOrigin: _optionalChain([runtime, 'optionalAccess', _9 => _9.endpoints, 'access', _10 => _10.supabaseStorageOrigin])
225
225
  });
226
226
  if (error || !guide && !isLoading) {
227
- return renderShell(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEXWS2QSDcjs.LoadError, { message: "Guide not found.", onRetry: reload }));
227
+ return renderShell(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFNGX5WZMcjs.LoadError, { message: "Guide not found.", onRetry: reload }));
228
228
  }
229
229
  if (!guide) {
230
230
  return renderShell(
231
231
  // Match the loaded page's top offset (TitleBlock's
232
232
  // `pt-[var(--spacing-system-l)]`) so content doesn't jump on load.
233
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pt-[var(--spacing-system-l)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6LXGP6Scjs.DetailPageSkeleton, { bare: true, showImageGallery: false }) })
233
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "pt-[var(--spacing-system-l)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQ2B2MGFUcjs.DetailPageSkeleton, { bare: true, showImageGallery: false }) })
234
234
  );
235
235
  }
236
236
  const { captionsUrl, highlightCaptionsUrl } = captions.forEntity("onboarding_guide", guide);
237
237
  const videoPoster = guide.main_video_thumbnail || guide.featured_image || guide.og_image_url || // `buildOgPlaceholderUrl` always returns a usable string (relative route at
238
238
  // worst), so it's the terminal fallback — no trailing `|| undefined` needed.
239
- _chunkI27PWVWEcjs.buildOgPlaceholderUrl.call(void 0, _optionalChain([runtime, 'optionalAccess', _11 => _11.endpoints]), guide.title, { aspect: "wide" });
239
+ _chunkWT4HURQNcjs.buildOgPlaceholderUrl.call(void 0, _optionalChain([runtime, 'optionalAccess', _11 => _11.endpoints]), guide.title, { aspect: "wide" });
240
240
  const defaultRenderRelatedCard = (g) => {
241
- const cta = _chunkEXWS2QSDcjs.resolveContentHref.call(void 0, _optionalChain([runtime, 'optionalAccess', _12 => _12.composeContentUrl]), {
241
+ const cta = _chunkFNGX5WZMcjs.resolveContentHref.call(void 0, _optionalChain([runtime, 'optionalAccess', _12 => _12.composeContentUrl]), {
242
242
  type: "onboarding_guide",
243
243
  slug: g.slug,
244
244
  basePath,
245
245
  platforms: g.onboarding_guide_platforms
246
246
  });
247
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk53O6PQ3Fcjs.OnboardingGuideCard, { guide: g, href: cta.href, targetPlatform: cta.targetPlatform });
247
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNDLFK57Dcjs.OnboardingGuideCard, { guide: g, href: cta.href, targetPlatform: cta.targetPlatform });
248
248
  };
249
249
  const renderRelatedCardFn = _nullishCoalesce(renderRelatedCard, () => ( defaultRenderRelatedCard));
250
250
  return renderShell(
251
251
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
252
- _chunkEXWS2QSDcjs.PageLayout,
252
+ _chunkFNGX5WZMcjs.PageLayout,
253
253
  {
254
254
  title: guide.title,
255
255
  titleSize: "h1",
256
256
  titleWrap: true,
257
257
  backButton: { label: backLabel, onClick: () => router.push(resolvedBackHref) },
258
258
  children: [
259
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEXWS2QSDcjs.EntityTagBadges, { tags: guide.onboarding_guide_tags }),
259
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFNGX5WZMcjs.EntityTagBadges, { tags: guide.onboarding_guide_tags }),
260
260
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
261
- _chunk53O6PQ3Fcjs.EntityAuthorCard,
261
+ _chunkNDLFK57Dcjs.EntityAuthorCard,
262
262
  {
263
263
  author: guide.author,
264
264
  authorHref,
@@ -273,7 +273,7 @@ function OnboardingGuideDetailView({
273
273
  }
274
274
  ),
275
275
  (guide.main_video_url || guide.youtube_url) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: videoWarmupRef, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
276
- _chunkGZRU2A4Lcjs.EntityVideoSection,
276
+ _chunkC27F6GBZcjs.EntityVideoSection,
277
277
  {
278
278
  mainVideoUrl: guide.main_video_url,
279
279
  youtubeUrl: guide.youtube_url || void 0,
@@ -291,17 +291,17 @@ function OnboardingGuideDetailView({
291
291
  ) }),
292
292
  guide.content && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MarkdownRenderer, { content: guide.content }) }),
293
293
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
294
- _chunkGZRU2A4Lcjs.VideoBitesStrip,
294
+ _chunkC27F6GBZcjs.VideoBitesStrip,
295
295
  {
296
296
  bites: _nullishCoalesce(guide.video_bites, () => ( [])),
297
297
  filterPublished: true,
298
298
  showTitle: false,
299
- profile: _chunk53O6PQ3Fcjs.toStripProfile.call(void 0, guide.author),
299
+ profile: _chunkNDLFK57Dcjs.toStripProfile.call(void 0, guide.author),
300
300
  href: `/onboarding-guides/${guide.slug}`
301
301
  }
302
302
  ),
303
303
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
304
- _chunkF6LXGP6Scjs.ArticleAuthorByline,
304
+ _chunkQ2B2MGFUcjs.ArticleAuthorByline,
305
305
  {
306
306
  author: _nullishCoalesce(_optionalChain([guide, 'access', _13 => _13.author, 'optionalAccess', _14 => _14.full_name]), () => ( null)),
307
307
  avatar: _optionalChain([guide, 'access', _15 => _15.author, 'optionalAccess', _16 => _16.avatar_url]),
@@ -389,4 +389,4 @@ function useOnboardingGuideSections() {
389
389
 
390
390
 
391
391
  exports.OnboardingGuidesCatalogSkeleton = OnboardingGuidesCatalogSkeleton; exports.OnboardingGuidesCatalogView = OnboardingGuidesCatalogView; exports.OnboardingGuideDetailView = OnboardingGuideDetailView; exports.onboardingGuideKeys = onboardingGuideKeys; exports.useOnboardingGuides = useOnboardingGuides; exports.useOnboardingGuide = useOnboardingGuide; exports.useOnboardingGuideSections = useOnboardingGuideSections;
392
- //# sourceMappingURL=chunk-KDCIYRZV.cjs.map
392
+ //# sourceMappingURL=chunk-2EQED5SZ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-KDCIYRZV.cjs","../src/components/onboarding-guides/onboarding-guides-catalog-view.tsx","../src/components/onboarding-guides/onboarding-guides-catalog-skeleton.tsx","../src/components/onboarding-guides/onboarding-guide-detail-view.tsx","../src/components/onboarding-guides/hooks/use-onboarding-guides.ts"],"names":["jsx","jsxs"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AAC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;AAMjBA,0BAAAA;AAAC,YAAA;AAAA,YAAA;AACwD,cAAA;AACtC,cAAA;AACN,cAAA;AACyB,cAAA;AACE,cAAA;AAAA,YAAA;AACxC,UAAA;AAKAA,0BAAAA;AAAC,YAAA;AAAA,YAAA;AACoC,cAAA;AACb,cAAA;AACE,cAAA;AACQ,cAAA;AAC1B,cAAA;AACN,cAAA;AAAA,YAAA;AACF,UAAA;AAIiB,UAAA;AACC,4BAAA;AAAmD,cAAA;AAAe,cAAA;AAAQ,YAAA;AAErF,4BAAA;AAIL,UAAA;AAsBY,0BAAA;AAAkC,QAAA;AAAA,MAAA;AAClD,IAAA;AACF,EAAA;AACF;AHyD+E;AACA;AIxTtD;AAkBU;AACR,EAAA;AACuB,EAAA;AACmC,EAAA;AAC/B,EAAA;AACa,EAAA;AACV,EAAA;AAChD,EAAA;AAC6B,IAAA;AACgB,IAAA;AACU,IAAA;AACT,IAAA;AACrD,EAAA;AACF;AAEsE;AACpD,EAAA;AACkC,IAAA;AACW,IAAA;AACtB,MAAA;AACqB,MAAA;AACG,MAAA;AACK,MAAA;AACG,MAAA;AAKF,MAAA;AACP,MAAA;AACM,MAAA;AACzC,MAAA;AACzB,IAAA;AACD,EAAA;AACH;AAE6D;AAC3C,EAAA;AACiC,IAAA;AACA,IAAA;AACW,MAAA;AACO,MAAA;AACxC,MAAA;AACzB,IAAA;AACW,IAAA;AACZ,EAAA;AACH;AAE6C;AAC3B,EAAA;AACyB,IAAA;AACwB,IAAA;AACJ,MAAA;AACe,MAAA;AACjD,MAAA;AACzB,IAAA;AACW,IAAA;AACZ,EAAA;AACH;AJkS+E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-KDCIYRZV.cjs","sourcesContent":[null,"'use client';\n\n/**\n * Public-facing catalog view for `/onboarding-guides`.\n *\n * Two data modes:\n * - **controlled** (hub SSR): pass `initialGuides` + `initialSections`\n * (server-fetched; section changes re-render the host with new props).\n * - **self-fetching** (config-only embed): omit the data props and pass\n * `guidesEndpoint` + `sectionsEndpoint` (the api routes). The view fetches\n * the guides (refetching on `?section=` change) + the section list itself —\n * no host data layer. (Plain fetch + useEffect, the DeliveryLists pattern.)\n *\n * The view renders ONLY its body + its OWN controls (the RAG `<DocSearchBar>` +\n * dynamic section pills — onboarding's controls are content-driven, unlike the\n * static search/filter the `DevSectionView` chrome ships). It does NOT render the\n * page chrome: the CALLER wraps it in `<DevSectionPage sectionKey=\"onboarding\">`\n * (hero + back button), exactly like the roadmap / releases / delivery pages — so\n * every dev-center surface composes the same way and the view stays embeddable in\n * tabbed contexts. Card hrefs flow through `runtime.composeContentUrl`.\n */\n\nimport { GraduationCap } from 'lucide-react';\nimport { useMemo, useTransition, type ReactNode } from 'react';\n\nimport { useChatRuntime } from '../../contexts/chat-runtime-context';\nimport { useRouter, useSearchParams } from '../../embed-shims';\nimport { useSelfFetch } from '../../hooks/use-self-fetch';\nimport { resolveContentHref } from '../../utils/content-href';\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card';\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide';\nimport { DocSearchBar, useDocSearch } from '../shared/doc-search';\nimport { LoadError } from '../ui/error-state';\nimport { FilterPillRow } from '../ui/filter-pill-row';\nimport { OnboardingGuidesCatalogSkeleton } from './onboarding-guides-catalog-skeleton';\n\ntype SectionSummary = { section: string; section_order: number; count: number };\n\nexport interface OnboardingGuidesCatalogViewProps {\n /** Controlled / SSR: server-fetched guides. Omit + pass `guidesEndpoint`\n * for the self-fetching config-only mode. */\n initialGuides?: OnboardingGuide[];\n initialSections?: SectionSummary[];\n initialSection?: string;\n /** Self-fetch: GET list endpoint (the api route). Appends `?section=`. */\n guidesEndpoint?: string;\n /** Self-fetch: GET section-summary endpoint (the api route). */\n sectionsEndpoint?: string;\n /** Optional per-row card renderer override. */\n renderCard?: (guide: OnboardingGuide) => ReactNode;\n /** Base path the catalog is mounted under (fallback href prefix + `?section=`\n * push target). Default `/onboarding-guides`. */\n basePath?: string;\n}\n\nexport function OnboardingGuidesCatalogView({\n initialGuides,\n initialSections,\n initialSection = '',\n guidesEndpoint,\n sectionsEndpoint,\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\n // Self-fetch only when the host supplied NO data but DID give an endpoint.\n const selfFetch = initialGuides === undefined && guidesEndpoint !== undefined;\n // Active section: from the URL when self-fetching, from the prop (host RSC\n // already read the URL server-side) when controlled.\n const sectionValue = selfFetch ? (searchParams.get('section') ?? '') : initialSection;\n const activeSection = sectionValue || 'all';\n\n // Self-fetch the guides (refetched whenever `?section=` changes — it's folded\n // into the url) + the section summaries. Controlled mode passes `null` urls so\n // the hook never fetches. The guides fetch carries the error/retry affordance.\n const guidesQs = sectionValue ? `?section=${encodeURIComponent(sectionValue)}` : '';\n const guidesRes = useSelfFetch<{ data?: OnboardingGuide[] }>(\n selfFetch && guidesEndpoint ? `${guidesEndpoint}${guidesQs}` : null,\n );\n const sectionsRes = useSelfFetch<SectionSummary[]>(selfFetch && sectionsEndpoint ? sectionsEndpoint : null);\n\n // Invariant: `guidesRes.data` is `null` until the first fetch resolves, then\n // `{ data: [...] }`. The `?.data ?? []` chain collapses never-fetched (null) and\n // legitimately-empty ([]) to the same `[]` — so the first-load skeleton gate below\n // keys on the OUTER `guidesRes.data == null` to distinguish them (an empty section\n // toggle keeps the chrome; only a true cold start shows the full-page skeleton).\n // Memoised because the `??` fallback minted a NEW array on every\n // render, which made the memo below re-run every time — i.e. do nothing.\n const guides = useMemo(() => initialGuides ?? guidesRes.data?.data ?? [], [initialGuides, guidesRes.data?.data]);\n const sections = useMemo(\n () => initialSections ?? (Array.isArray(sectionsRes.data) ? sectionsRes.data : []),\n [initialSections, sectionsRes.data],\n );\n const isLoading = selfFetch ? guidesRes.isLoading : false;\n\n // Section grouping. Data arrives already filtered (server-side `?section=`\n // for the host, or our `?section=` fetch); this just buckets visible rows.\n const grouped = useMemo(() => {\n const map = new Map<string, { section_order: number; guides: OnboardingGuide[] }>();\n for (const g of guides) {\n const existing = map.get(g.section);\n if (existing) {\n if (g.section_order < existing.section_order) 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((a, b) => a.step_order - b.step_order || a.title.localeCompare(b.title));\n }\n return Array.from(map.entries())\n .map(([section, info]) => ({ section, ...info }))\n .sort((a, b) => a.section_order - b.section_order || a.section.localeCompare(b.section));\n }, [guides]);\n\n const sectionFilterOptions = useMemo(\n () => [\n { value: 'all', label: `All (${guides.length})` },\n ...sections.map(s => ({ value: s.section, label: `${s.section} (${s.count})` })),\n ],\n [guides.length, sections],\n );\n\n // Section pill change → push `?section=X`. Controlled mode: host RSC\n // re-fetches. Self-fetch mode: our guides effect re-fetches on the URL change.\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 RAG-search `tableIds`.\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 — runtime-composed href, fallback to relative.\n const defaultRenderCard = (guide: OnboardingGuide) => {\n const cta = resolveContentHref(runtime?.composeContentUrl, {\n type: 'onboarding_guide',\n slug: guide.slug,\n basePath,\n platforms: guide.onboarding_guide_platforms,\n });\n return <OnboardingGuideCard guide={guide} href={cta.href} targetPlatform={cta.targetPlatform} size=\"catalog\" />;\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 {sections.length > 0 && (\n <FilterPillRow\n label=\"Section\"\n selectedValue={activeSection}\n onValueChange={setSection}\n options={sectionFilterOptions}\n />\n )}\n </div>\n );\n\n // A failed guides fetch → a RETRYABLE error (not the indistinguishable-from-\n // empty \"no guides found\" state) — parity with the sibling self-fetch views.\n if (selfFetch && guidesRes.error) {\n return <LoadError message=\"Failed to load onboarding guides.\" onRetry={guidesRes.reload} />;\n }\n // Full-page skeleton ONLY on the very first load (no data has loaded yet) — a\n // later section toggle that legitimately returns ZERO guides keeps the page\n // chrome (search + section pills) and dims the grid via the className below.\n if (selfFetch && guidesRes.data == null && isLoading) {\n return <OnboardingGuidesCatalogSkeleton />;\n }\n\n return (\n <div className=\"flex w-full flex-col gap-10\">\n {preControls}\n {guides.length === 0 ? (\n <div className=\"py-16 text-center\">\n <GraduationCap className=\"mx-auto mb-4 h-12 w-12 text-ods-text-secondary\" />\n <h2 className=\"mb-2 text-ods-text-primary text-h3\">No onboarding guides found</h2>\n <p className=\"text-ods-text-secondary text-h6\">\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 className={isPending || isLoading ? 'space-y-10 opacity-60 transition-opacity' : 'space-y-10'}>\n {grouped.map(sec => (\n <section key={sec.section} className=\"space-y-4\">\n <h2 className=\"flex items-center gap-2 text-ods-text-primary text-h3\">\n {sec.section}\n <span className=\"inline-flex items-center justify-center rounded-full bg-ods-text-secondary/20 px-2 py-0.5 text-ods-text-secondary text-h6\">\n {sec.guides.length}\n </span>\n </h2>\n {/* HORIZONTAL catalog list — single column so consecutive steps\n read top-to-bottom; 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 </div>\n );\n}\n","'use client';\n\nimport { OnboardingGuideCardSkeleton } from '../chat/entity-cards/onboarding-guide-card';\n\n/**\n * Loading skeleton for `/onboarding-guides` — CHROME-LESS, exactly like the\n * loaded `<OnboardingGuidesCatalogView>`. The HOST page owns the\n * `<DevSectionPage sectionKey=\"onboarding\">` shell (hero + back button);\n * this component renders only what replaces the view: the search/pill\n * placeholder block and the section card lists.\n *\n * HISTORY: this used to mount its own `<DevSectionPage>` — nested inside the\n * page's shell that double-rendered the hero + back button during loading\n * (the view was made chrome-less in the page restructure; the skeleton was\n * missed). Keep BOTH chrome-less.\n *\n * Wrapper mirrors the loaded view's `w-full flex flex-col gap-10`; per-card\n * height matches the loaded catalog card so resolve shifts are zero.\n */\nexport function OnboardingGuidesCatalogSkeleton() {\n return (\n <div className=\"flex w-full animate-pulse flex-col gap-10\">\n {/* Search input placeholder — matches `<SearchInput>` h-12 — plus the\n section pill row (~74 px incl. padding), same as the loaded\n preControls block. */}\n <div className=\"space-y-4\">\n <div className=\"h-12 w-full rounded-md border border-ods-border bg-ods-card\" />\n <div className=\"flex flex-wrap items-center gap-3 rounded-lg border border-ods-border bg-ods-card p-4\">\n <div className=\"h-4 w-14 rounded bg-ods-border/60\" />\n {[0, 1, 2, 3].map(i => (\n <div key={i} className=\"h-10 w-24 rounded-md border border-ods-border bg-ods-card\" />\n ))}\n </div>\n </div>\n <div className=\"space-y-10\">\n {[4, 3, 3].map((cardCount, sectionIdx) => (\n <section key={sectionIdx} className=\"space-y-4\">\n <h2 className=\"flex items-center gap-2 tracking-[-0.36px] text-ods-text-primary text-h3\">\n <span className=\"h-6 w-40 rounded bg-ods-border/70\" />\n <span className=\"h-5 w-8 rounded-full bg-ods-text-secondary/20\" />\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 </div>\n );\n}\n","'use client';\n\n/**\n * Public-facing detail view for `/onboarding-guides/<slug>`.\n *\n * Two modes:\n * - **controlled** (hub SSR): pass `initialData` (a server-fetched guide).\n * - **self-fetching** (config-only embed): pass `slug` + `guideEndpoint`\n * (the api route) and the view fetches the guide itself — no host data\n * layer. (Plain fetch + useEffect, the DeliveryLists pattern.)\n *\n * Everything else flows through lib primitives + the ChatRuntime context\n * (markdown, video warmup, captions, related-card hrefs via\n * `runtime.composeContentUrl`). Optional `MarkdownRenderer` lets hosts swap a\n * renderer with extra plugins.\n */\n\nimport { Fragment, type ComponentType, type ReactNode } from 'react';\nimport { useChatRuntime } from '../../contexts/chat-runtime-context';\nimport { useRouter } from '../../embed-shims';\nimport { useSelfFetch } from '../../hooks/use-self-fetch';\nimport type { VideoTeaser } from '../../types/video-processing';\nimport { resolveContentHref } from '../../utils/content-href';\nimport { buildOgPlaceholderUrl } from '../../utils/og-placeholder';\nimport { EntityAuthorCard } from '../chat/entity-cards/entity-author-card';\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card';\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide';\nimport { EntityTagBadges } from '../features/entity-tag-badges';\nimport { EntityVideoSection } from '../features/entity-video-section';\nimport { useCaptions } from '../features/use-captions';\nimport { useVideoWarmup } from '../features/use-video-warmup';\nimport { toStripProfile } from '../features/video-bites-shared';\nimport { VideoBitesStrip } from '../features/video-bites-strip';\n// PageShell (max-w-[1920px]) — the guide detail content must share the SAME\n// container sizing as the related-content/FAQ rail the host page renders\n// below it (which uses the wide shell). ArticleDetailLayout (1280px) made\n// the detail block visibly narrower than the rail.\nimport { PageShell } from '../layout/article-detail-layout';\nimport { PageLayout } from '../layout/page-layout';\nimport { ArticleAuthorByline } from '../shared/article-author-byline';\nimport { DetailPageSkeleton } from '../shared/detail-page-skeleton';\nimport { LoadError } from '../ui/error-state';\nimport { RichMarkdownRenderer } from '../ui/markdown';\n\nexport interface OnboardingGuideDetailViewProps {\n /** Server-fetched guide (controlled / SSR mode). Omit it and pass\n * `slug` + `guideEndpoint` for the self-fetching config-only mode. */\n initialData?: OnboardingGuide;\n /** Self-fetch: the guide's slug (the host reads it from its route). */\n slug?: string;\n /** Self-fetch: builds the GET url for a single guide (the api route).\n * e.g. `(s) => \\`/content/api/onboarding-guides/${s}\\``. */\n guideEndpoint?: (slug: string) => string;\n related?: OnboardingGuide[];\n /** Link target for the author name in the metadata grid — the host\n * computes it (public author page; absent ⇒ plain text). */\n authorHref?: string;\n /** Bio paragraph for the end-of-article author byline. Defaults to the\n * guide payload's `author.about` (hubs that hydrate it can omit this). */\n authorBio?: string | null;\n /** Byline fallback paragraph when the bio is empty — the host passes its\n * platform-aware copy (the lib has no config awareness). Absent ⇒ the\n * byline renders nothing below the name when the bio is empty. */\n fallbackBio?: string | null;\n /** Optional markdown renderer override. Defaults to lib\n * `<RichMarkdownRenderer>`. */\n MarkdownRenderer?: ComponentType<{ content: string }>;\n /** Optional per-row related-card renderer override. */\n renderRelatedCard?: (guide: OnboardingGuide) => ReactNode;\n /** Back-link target. Defaults to `basePath`. */\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. Default `/onboarding-guides`. */\n basePath?: string;\n /** Optional slot rendered inside the page chrome, BELOW the article + related\n * guides — e.g. the hub's cross-type related-content / FAQ rail. Lets the hub\n * mount this view directly (no local wrapper); embedders omit it. */\n relatedContent?: ReactNode;\n /** Render the standalone `<PageShell>`. Default true. Pass false when the host\n * layout already provides the page container — only the padding box renders,\n * avoiding a nested `<main>`. */\n shell?: boolean;\n}\n\nexport function OnboardingGuideDetailView({\n authorHref,\n authorBio,\n fallbackBio,\n initialData,\n slug,\n guideEndpoint,\n related = [],\n MarkdownRenderer = RichMarkdownRenderer,\n renderRelatedCard,\n backHref,\n backLabel = 'Back to Getting Started',\n basePath = '/onboarding-guides',\n relatedContent,\n shell = true,\n}: OnboardingGuideDetailViewProps) {\n const resolvedBackHref = backHref ?? basePath;\n const runtime = useChatRuntime();\n const captions = useCaptions();\n const router = useRouter();\n // `shell` true → standalone `<PageShell>`; false → padding-only box (no nested\n // <main>) for hosts whose layout already provides the container.\n const renderShell = (node: ReactNode) =>\n shell ? <PageShell>{node}</PageShell> : <div className=\"page-shell-content\">{node}</div>;\n\n // Controlled (hub SSR `initialData`) OR self-fetch by slug (config-only embed).\n const url = initialData ? null : slug && guideEndpoint ? guideEndpoint(slug) : null;\n const { data: guide, isLoading, error, reload } = useSelfFetch<OnboardingGuide>(url, { initialData });\n\n // Hooks must run unconditionally — feed them optional-chained values so they\n // no-op while the guide is still loading.\n const { ref: videoWarmupRef } = useVideoWarmup<HTMLDivElement>({\n videoUrl: guide?.main_video_url,\n supabaseStorageOrigin: runtime?.endpoints.supabaseStorageOrigin,\n });\n\n if (error || (!guide && !isLoading)) {\n return renderShell(<LoadError message=\"Guide not found.\" onRetry={reload} />);\n }\n if (!guide) {\n // Skeleton (not a bare \"Loading…\") for parity with every other shared view —\n // catalog, roadmap, releases all render a skeleton on first load, so the detail\n // page shouldn't flash text then content. `bare` + `PageShell` so the loading\n // state matches the loaded page's full width / padding / min-height.\n return renderShell(\n // Match the loaded page's top offset (TitleBlock's\n // `pt-[var(--spacing-system-l)]`) so content doesn't jump on load.\n <div className=\"pt-[var(--spacing-system-l)]\">\n <DetailPageSkeleton bare showImageGallery={false} />\n </div>,\n );\n }\n\n // Track URLs via the ONE captions configurer (`useCaptions`); same-origin\n // hosts get the relative `/api/captions/...` default. Zero per-page wiring.\n const { captionsUrl, highlightCaptionsUrl } = captions.forEntity('onboarding_guide', guide);\n\n const videoPoster =\n guide.main_video_thumbnail ||\n guide.featured_image ||\n guide.og_image_url ||\n // `buildOgPlaceholderUrl` always returns a usable string (relative route at\n // worst), so it's the terminal fallback — no trailing `|| undefined` needed.\n buildOgPlaceholderUrl(runtime?.endpoints, guide.title, { aspect: 'wide' });\n\n const defaultRenderRelatedCard = (g: OnboardingGuide) => {\n const cta = resolveContentHref(runtime?.composeContentUrl, {\n type: 'onboarding_guide',\n slug: g.slug,\n basePath,\n platforms: g.onboarding_guide_platforms,\n });\n return <OnboardingGuideCard guide={g} href={cta.href} targetPlatform={cta.targetPlatform} />;\n };\n const renderRelatedCardFn = renderRelatedCard ?? defaultRenderRelatedCard;\n\n return renderShell(\n <PageLayout\n title={guide.title}\n titleSize=\"h1\"\n titleWrap\n backButton={{ label: backLabel, onClick: () => router.push(resolvedBackHref) }}\n >\n {/* Tags — flat onboarding_guide_tags[] from entity_tags. */}\n <EntityTagBadges tags={guide.onboarding_guide_tags} />\n\n {/* Metadata grid — Section · Step | Published | Author. */}\n <EntityAuthorCard\n author={guide.author}\n authorHref={authorHref}\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 independent\n columns — either populated renders the player. */}\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 highlightCaptionsUrl={highlightCaptionsUrl}\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 — unified strip; renders nothing when no published bites. */}\n <VideoBitesStrip\n bites={(guide.video_bites as VideoTeaser[] | null) ?? []}\n filterPublished={true}\n showTitle={false}\n profile={toStripProfile(guide.author)}\n href={`/onboarding-guides/${guide.slug}`}\n />\n\n {/* End-of-article author byline (avatar + linked name + bio) — the\n author DESCRIPTION block every article-shaped detail page renders.\n Hidden when the guide has no author (the byline returns null). */}\n <ArticleAuthorByline\n author={guide.author?.full_name ?? null}\n avatar={guide.author?.avatar_url}\n jobTitle={guide.author?.job_title}\n bio={authorBio ?? guide.author?.about}\n href={authorHref}\n fallbackBio={fallbackBio}\n />\n\n {/* Related — same-section, ordered by step. */}\n {related.length > 0 && (\n <div className=\"space-y-4 border-t border-ods-border pt-8\">\n <h2 className=\"tracking-[-0.36px] text-ods-text-primary text-h3\">More in {guide.section}</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\n {/*\n * Host slot — cross-type related-content / FAQ rail.\n *\n * KEYED DELIBERATELY. This is one member of PageLayout's static children\n * array, and the only member whose element may be created in a SERVER\n * component and crossed over the RSC boundary. Static JSX children are\n * normally exempt from the key warning because `jsxs` runs\n * `validateChildKeys` and stamps `_store.validated = 1` on each element —\n * but a slot arriving over the wire is referenced as a lazy chunk wrapper,\n * so validation marks the WRAPPER and the fulfilled path never copies the\n * flag onto the revived element. It reaches the reconciler with\n * `validated: 0, key: null` and warns, blaming PageLayout (the owner of the\n * enclosing element) rather than anything actually at fault.\n *\n * A keyed Fragment emits no DOM, so rendered output is byte-identical.\n * Do NOT \"fix\" this in PageLayout via `React.Children.toArray` — that would\n * auto-key every consumer's children and change reconciliation identity for\n * all of them, and that file carries an explicit FROZEN contract.\n */}\n <Fragment key=\"related-content\">{relatedContent}</Fragment>\n </PageLayout>,\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) => [...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) => ['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 // Comma-joined, matching the route's `task_ids`-style split. This is the\n // chat-card loader's path: `ids` ALSO tells the route to drop the\n // platform scope, so omitting it silently returned a platform-filtered\n // catalog page under a cache key that claimed to be the id-filtered set.\n if (filters?.ids?.length) params.set('ids', filters.ids.join(','));\n const res = await fetch(`/api/onboarding-guides?${params}`);\n if (!res.ok) throw new Error('Failed to fetch onboarding guides');\n return (await res.json()) as OnboardingGuideListResponse;\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 (await res.json()) as OnboardingGuide;\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) throw new Error('Failed to fetch onboarding-guide sections');\n return (await res.json()) as OnboardingGuideSectionSummary[];\n },\n staleTime: 0,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-2EQED5SZ.cjs","../src/components/onboarding-guides/onboarding-guides-catalog-view.tsx","../src/components/onboarding-guides/onboarding-guides-catalog-skeleton.tsx","../src/components/onboarding-guides/onboarding-guide-detail-view.tsx","../src/components/onboarding-guides/hooks/use-onboarding-guides.ts"],"names":["jsx","jsxs"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC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E,cAAA;AACQ,cAAA;AAC1B,cAAA;AACN,cAAA;AAAA,YAAA;AACF,UAAA;AAIiB,UAAA;AACC,4BAAA;AAAmD,cAAA;AAAe,cAAA;AAAQ,YAAA;AAErF,4BAAA;AAIL,UAAA;AAsBY,0BAAA;AAAkC,QAAA;AAAA,MAAA;AAClD,IAAA;AACF,EAAA;AACF;AHyD+E;AACA;AIxTtD;AAkBU;AACR,EAAA;AACuB,EAAA;AACmC,EAAA;AAC/B,EAAA;AACa,EAAA;AACV,EAAA;AAChD,EAAA;AAC6B,IAAA;AACgB,IAAA;AACU,IAAA;AACT,IAAA;AACrD,EAAA;AACF;AAEsE;AACpD,EAAA;AACkC,IAAA;AACW,IAAA;AACtB,MAAA;AACqB,MAAA;AACG,MAAA;AACK,MAAA;AACG,MAAA;AAKF,MAAA;AACP,MAAA;AACM,MAAA;AACzC,MAAA;AACzB,IAAA;AACD,EAAA;AACH;AAE6D;AAC3C,EAAA;AACiC,IAAA;AACA,IAAA;AACW,MAAA;AACO,MAAA;AACxC,MAAA;AACzB,IAAA;AACW,IAAA;AACZ,EAAA;AACH;AAE6C;AAC3B,EAAA;AACyB,IAAA;AACwB,IAAA;AACJ,MAAA;AACe,MAAA;AACjD,MAAA;AACzB,IAAA;AACW,IAAA;AACZ,EAAA;AACH;AJkS+E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-2EQED5SZ.cjs","sourcesContent":[null,"'use client';\n\n/**\n * Public-facing catalog view for `/onboarding-guides`.\n *\n * Two data modes:\n * - **controlled** (hub SSR): pass `initialGuides` + `initialSections`\n * (server-fetched; section changes re-render the host with new props).\n * - **self-fetching** (config-only embed): omit the data props and pass\n * `guidesEndpoint` + `sectionsEndpoint` (the api routes). The view fetches\n * the guides (refetching on `?section=` change) + the section list itself —\n * no host data layer. (Plain fetch + useEffect, the DeliveryLists pattern.)\n *\n * The view renders ONLY its body + its OWN controls (the RAG `<DocSearchBar>` +\n * dynamic section pills — onboarding's controls are content-driven, unlike the\n * static search/filter the `DevSectionView` chrome ships). It does NOT render the\n * page chrome: the CALLER wraps it in `<DevSectionPage sectionKey=\"onboarding\">`\n * (hero + back button), exactly like the roadmap / releases / delivery pages — so\n * every dev-center surface composes the same way and the view stays embeddable in\n * tabbed contexts. Card hrefs flow through `runtime.composeContentUrl`.\n */\n\nimport { GraduationCap } from 'lucide-react';\nimport { useMemo, useTransition, type ReactNode } from 'react';\n\nimport { useChatRuntime } from '../../contexts/chat-runtime-context';\nimport { useRouter, useSearchParams } from '../../embed-shims';\nimport { useSelfFetch } from '../../hooks/use-self-fetch';\nimport { resolveContentHref } from '../../utils/content-href';\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card';\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide';\nimport { DocSearchBar, useDocSearch } from '../shared/doc-search';\nimport { LoadError } from '../ui/error-state';\nimport { FilterPillRow } from '../ui/filter-pill-row';\nimport { OnboardingGuidesCatalogSkeleton } from './onboarding-guides-catalog-skeleton';\n\ntype SectionSummary = { section: string; section_order: number; count: number };\n\nexport interface OnboardingGuidesCatalogViewProps {\n /** Controlled / SSR: server-fetched guides. Omit + pass `guidesEndpoint`\n * for the self-fetching config-only mode. */\n initialGuides?: OnboardingGuide[];\n initialSections?: SectionSummary[];\n initialSection?: string;\n /** Self-fetch: GET list endpoint (the api route). Appends `?section=`. */\n guidesEndpoint?: string;\n /** Self-fetch: GET section-summary endpoint (the api route). */\n sectionsEndpoint?: string;\n /** Optional per-row card renderer override. */\n renderCard?: (guide: OnboardingGuide) => ReactNode;\n /** Base path the catalog is mounted under (fallback href prefix + `?section=`\n * push target). Default `/onboarding-guides`. */\n basePath?: string;\n}\n\nexport function OnboardingGuidesCatalogView({\n initialGuides,\n initialSections,\n initialSection = '',\n guidesEndpoint,\n sectionsEndpoint,\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\n // Self-fetch only when the host supplied NO data but DID give an endpoint.\n const selfFetch = initialGuides === undefined && guidesEndpoint !== undefined;\n // Active section: from the URL when self-fetching, from the prop (host RSC\n // already read the URL server-side) when controlled.\n const sectionValue = selfFetch ? (searchParams.get('section') ?? '') : initialSection;\n const activeSection = sectionValue || 'all';\n\n // Self-fetch the guides (refetched whenever `?section=` changes — it's folded\n // into the url) + the section summaries. Controlled mode passes `null` urls so\n // the hook never fetches. The guides fetch carries the error/retry affordance.\n const guidesQs = sectionValue ? `?section=${encodeURIComponent(sectionValue)}` : '';\n const guidesRes = useSelfFetch<{ data?: OnboardingGuide[] }>(\n selfFetch && guidesEndpoint ? `${guidesEndpoint}${guidesQs}` : null,\n );\n const sectionsRes = useSelfFetch<SectionSummary[]>(selfFetch && sectionsEndpoint ? sectionsEndpoint : null);\n\n // Invariant: `guidesRes.data` is `null` until the first fetch resolves, then\n // `{ data: [...] }`. The `?.data ?? []` chain collapses never-fetched (null) and\n // legitimately-empty ([]) to the same `[]` — so the first-load skeleton gate below\n // keys on the OUTER `guidesRes.data == null` to distinguish them (an empty section\n // toggle keeps the chrome; only a true cold start shows the full-page skeleton).\n // Memoised because the `??` fallback minted a NEW array on every\n // render, which made the memo below re-run every time — i.e. do nothing.\n const guides = useMemo(() => initialGuides ?? guidesRes.data?.data ?? [], [initialGuides, guidesRes.data?.data]);\n const sections = useMemo(\n () => initialSections ?? (Array.isArray(sectionsRes.data) ? sectionsRes.data : []),\n [initialSections, sectionsRes.data],\n );\n const isLoading = selfFetch ? guidesRes.isLoading : false;\n\n // Section grouping. Data arrives already filtered (server-side `?section=`\n // for the host, or our `?section=` fetch); this just buckets visible rows.\n const grouped = useMemo(() => {\n const map = new Map<string, { section_order: number; guides: OnboardingGuide[] }>();\n for (const g of guides) {\n const existing = map.get(g.section);\n if (existing) {\n if (g.section_order < existing.section_order) 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((a, b) => a.step_order - b.step_order || a.title.localeCompare(b.title));\n }\n return Array.from(map.entries())\n .map(([section, info]) => ({ section, ...info }))\n .sort((a, b) => a.section_order - b.section_order || a.section.localeCompare(b.section));\n }, [guides]);\n\n const sectionFilterOptions = useMemo(\n () => [\n { value: 'all', label: `All (${guides.length})` },\n ...sections.map(s => ({ value: s.section, label: `${s.section} (${s.count})` })),\n ],\n [guides.length, sections],\n );\n\n // Section pill change → push `?section=X`. Controlled mode: host RSC\n // re-fetches. Self-fetch mode: our guides effect re-fetches on the URL change.\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 RAG-search `tableIds`.\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 — runtime-composed href, fallback to relative.\n const defaultRenderCard = (guide: OnboardingGuide) => {\n const cta = resolveContentHref(runtime?.composeContentUrl, {\n type: 'onboarding_guide',\n slug: guide.slug,\n basePath,\n platforms: guide.onboarding_guide_platforms,\n });\n return <OnboardingGuideCard guide={guide} href={cta.href} targetPlatform={cta.targetPlatform} size=\"catalog\" />;\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 {sections.length > 0 && (\n <FilterPillRow\n label=\"Section\"\n selectedValue={activeSection}\n onValueChange={setSection}\n options={sectionFilterOptions}\n />\n )}\n </div>\n );\n\n // A failed guides fetch → a RETRYABLE error (not the indistinguishable-from-\n // empty \"no guides found\" state) — parity with the sibling self-fetch views.\n if (selfFetch && guidesRes.error) {\n return <LoadError message=\"Failed to load onboarding guides.\" onRetry={guidesRes.reload} />;\n }\n // Full-page skeleton ONLY on the very first load (no data has loaded yet) — a\n // later section toggle that legitimately returns ZERO guides keeps the page\n // chrome (search + section pills) and dims the grid via the className below.\n if (selfFetch && guidesRes.data == null && isLoading) {\n return <OnboardingGuidesCatalogSkeleton />;\n }\n\n return (\n <div className=\"flex w-full flex-col gap-10\">\n {preControls}\n {guides.length === 0 ? (\n <div className=\"py-16 text-center\">\n <GraduationCap className=\"mx-auto mb-4 h-12 w-12 text-ods-text-secondary\" />\n <h2 className=\"mb-2 text-ods-text-primary text-h3\">No onboarding guides found</h2>\n <p className=\"text-ods-text-secondary text-h6\">\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 className={isPending || isLoading ? 'space-y-10 opacity-60 transition-opacity' : 'space-y-10'}>\n {grouped.map(sec => (\n <section key={sec.section} className=\"space-y-4\">\n <h2 className=\"flex items-center gap-2 text-ods-text-primary text-h3\">\n {sec.section}\n <span className=\"inline-flex items-center justify-center rounded-full bg-ods-text-secondary/20 px-2 py-0.5 text-ods-text-secondary text-h6\">\n {sec.guides.length}\n </span>\n </h2>\n {/* HORIZONTAL catalog list — single column so consecutive steps\n read top-to-bottom; 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 </div>\n );\n}\n","'use client';\n\nimport { OnboardingGuideCardSkeleton } from '../chat/entity-cards/onboarding-guide-card';\n\n/**\n * Loading skeleton for `/onboarding-guides` — CHROME-LESS, exactly like the\n * loaded `<OnboardingGuidesCatalogView>`. The HOST page owns the\n * `<DevSectionPage sectionKey=\"onboarding\">` shell (hero + back button);\n * this component renders only what replaces the view: the search/pill\n * placeholder block and the section card lists.\n *\n * HISTORY: this used to mount its own `<DevSectionPage>` — nested inside the\n * page's shell that double-rendered the hero + back button during loading\n * (the view was made chrome-less in the page restructure; the skeleton was\n * missed). Keep BOTH chrome-less.\n *\n * Wrapper mirrors the loaded view's `w-full flex flex-col gap-10`; per-card\n * height matches the loaded catalog card so resolve shifts are zero.\n */\nexport function OnboardingGuidesCatalogSkeleton() {\n return (\n <div className=\"flex w-full animate-pulse flex-col gap-10\">\n {/* Search input placeholder — matches `<SearchInput>` h-12 — plus the\n section pill row (~74 px incl. padding), same as the loaded\n preControls block. */}\n <div className=\"space-y-4\">\n <div className=\"h-12 w-full rounded-md border border-ods-border bg-ods-card\" />\n <div className=\"flex flex-wrap items-center gap-3 rounded-lg border border-ods-border bg-ods-card p-4\">\n <div className=\"h-4 w-14 rounded bg-ods-border/60\" />\n {[0, 1, 2, 3].map(i => (\n <div key={i} className=\"h-10 w-24 rounded-md border border-ods-border bg-ods-card\" />\n ))}\n </div>\n </div>\n <div className=\"space-y-10\">\n {[4, 3, 3].map((cardCount, sectionIdx) => (\n <section key={sectionIdx} className=\"space-y-4\">\n <h2 className=\"flex items-center gap-2 tracking-[-0.36px] text-ods-text-primary text-h3\">\n <span className=\"h-6 w-40 rounded bg-ods-border/70\" />\n <span className=\"h-5 w-8 rounded-full bg-ods-text-secondary/20\" />\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 </div>\n );\n}\n","'use client';\n\n/**\n * Public-facing detail view for `/onboarding-guides/<slug>`.\n *\n * Two modes:\n * - **controlled** (hub SSR): pass `initialData` (a server-fetched guide).\n * - **self-fetching** (config-only embed): pass `slug` + `guideEndpoint`\n * (the api route) and the view fetches the guide itself — no host data\n * layer. (Plain fetch + useEffect, the DeliveryLists pattern.)\n *\n * Everything else flows through lib primitives + the ChatRuntime context\n * (markdown, video warmup, captions, related-card hrefs via\n * `runtime.composeContentUrl`). Optional `MarkdownRenderer` lets hosts swap a\n * renderer with extra plugins.\n */\n\nimport { Fragment, type ComponentType, type ReactNode } from 'react';\nimport { useChatRuntime } from '../../contexts/chat-runtime-context';\nimport { useRouter } from '../../embed-shims';\nimport { useSelfFetch } from '../../hooks/use-self-fetch';\nimport type { VideoTeaser } from '../../types/video-processing';\nimport { resolveContentHref } from '../../utils/content-href';\nimport { buildOgPlaceholderUrl } from '../../utils/og-placeholder';\nimport { EntityAuthorCard } from '../chat/entity-cards/entity-author-card';\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card';\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide';\nimport { EntityTagBadges } from '../features/entity-tag-badges';\nimport { EntityVideoSection } from '../features/entity-video-section';\nimport { useCaptions } from '../features/use-captions';\nimport { useVideoWarmup } from '../features/use-video-warmup';\nimport { toStripProfile } from '../features/video-bites-shared';\nimport { VideoBitesStrip } from '../features/video-bites-strip';\n// PageShell (max-w-[1920px]) — the guide detail content must share the SAME\n// container sizing as the related-content/FAQ rail the host page renders\n// below it (which uses the wide shell). ArticleDetailLayout (1280px) made\n// the detail block visibly narrower than the rail.\nimport { PageShell } from '../layout/article-detail-layout';\nimport { PageLayout } from '../layout/page-layout';\nimport { ArticleAuthorByline } from '../shared/article-author-byline';\nimport { DetailPageSkeleton } from '../shared/detail-page-skeleton';\nimport { LoadError } from '../ui/error-state';\nimport { RichMarkdownRenderer } from '../ui/markdown';\n\nexport interface OnboardingGuideDetailViewProps {\n /** Server-fetched guide (controlled / SSR mode). Omit it and pass\n * `slug` + `guideEndpoint` for the self-fetching config-only mode. */\n initialData?: OnboardingGuide;\n /** Self-fetch: the guide's slug (the host reads it from its route). */\n slug?: string;\n /** Self-fetch: builds the GET url for a single guide (the api route).\n * e.g. `(s) => \\`/content/api/onboarding-guides/${s}\\``. */\n guideEndpoint?: (slug: string) => string;\n related?: OnboardingGuide[];\n /** Link target for the author name in the metadata grid — the host\n * computes it (public author page; absent ⇒ plain text). */\n authorHref?: string;\n /** Bio paragraph for the end-of-article author byline. Defaults to the\n * guide payload's `author.about` (hubs that hydrate it can omit this). */\n authorBio?: string | null;\n /** Byline fallback paragraph when the bio is empty — the host passes its\n * platform-aware copy (the lib has no config awareness). Absent ⇒ the\n * byline renders nothing below the name when the bio is empty. */\n fallbackBio?: string | null;\n /** Optional markdown renderer override. Defaults to lib\n * `<RichMarkdownRenderer>`. */\n MarkdownRenderer?: ComponentType<{ content: string }>;\n /** Optional per-row related-card renderer override. */\n renderRelatedCard?: (guide: OnboardingGuide) => ReactNode;\n /** Back-link target. Defaults to `basePath`. */\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. Default `/onboarding-guides`. */\n basePath?: string;\n /** Optional slot rendered inside the page chrome, BELOW the article + related\n * guides — e.g. the hub's cross-type related-content / FAQ rail. Lets the hub\n * mount this view directly (no local wrapper); embedders omit it. */\n relatedContent?: ReactNode;\n /** Render the standalone `<PageShell>`. Default true. Pass false when the host\n * layout already provides the page container — only the padding box renders,\n * avoiding a nested `<main>`. */\n shell?: boolean;\n}\n\nexport function OnboardingGuideDetailView({\n authorHref,\n authorBio,\n fallbackBio,\n initialData,\n slug,\n guideEndpoint,\n related = [],\n MarkdownRenderer = RichMarkdownRenderer,\n renderRelatedCard,\n backHref,\n backLabel = 'Back to Getting Started',\n basePath = '/onboarding-guides',\n relatedContent,\n shell = true,\n}: OnboardingGuideDetailViewProps) {\n const resolvedBackHref = backHref ?? basePath;\n const runtime = useChatRuntime();\n const captions = useCaptions();\n const router = useRouter();\n // `shell` true → standalone `<PageShell>`; false → padding-only box (no nested\n // <main>) for hosts whose layout already provides the container.\n const renderShell = (node: ReactNode) =>\n shell ? <PageShell>{node}</PageShell> : <div className=\"page-shell-content\">{node}</div>;\n\n // Controlled (hub SSR `initialData`) OR self-fetch by slug (config-only embed).\n const url = initialData ? null : slug && guideEndpoint ? guideEndpoint(slug) : null;\n const { data: guide, isLoading, error, reload } = useSelfFetch<OnboardingGuide>(url, { initialData });\n\n // Hooks must run unconditionally — feed them optional-chained values so they\n // no-op while the guide is still loading.\n const { ref: videoWarmupRef } = useVideoWarmup<HTMLDivElement>({\n videoUrl: guide?.main_video_url,\n supabaseStorageOrigin: runtime?.endpoints.supabaseStorageOrigin,\n });\n\n if (error || (!guide && !isLoading)) {\n return renderShell(<LoadError message=\"Guide not found.\" onRetry={reload} />);\n }\n if (!guide) {\n // Skeleton (not a bare \"Loading…\") for parity with every other shared view —\n // catalog, roadmap, releases all render a skeleton on first load, so the detail\n // page shouldn't flash text then content. `bare` + `PageShell` so the loading\n // state matches the loaded page's full width / padding / min-height.\n return renderShell(\n // Match the loaded page's top offset (TitleBlock's\n // `pt-[var(--spacing-system-l)]`) so content doesn't jump on load.\n <div className=\"pt-[var(--spacing-system-l)]\">\n <DetailPageSkeleton bare showImageGallery={false} />\n </div>,\n );\n }\n\n // Track URLs via the ONE captions configurer (`useCaptions`); same-origin\n // hosts get the relative `/api/captions/...` default. Zero per-page wiring.\n const { captionsUrl, highlightCaptionsUrl } = captions.forEntity('onboarding_guide', guide);\n\n const videoPoster =\n guide.main_video_thumbnail ||\n guide.featured_image ||\n guide.og_image_url ||\n // `buildOgPlaceholderUrl` always returns a usable string (relative route at\n // worst), so it's the terminal fallback — no trailing `|| undefined` needed.\n buildOgPlaceholderUrl(runtime?.endpoints, guide.title, { aspect: 'wide' });\n\n const defaultRenderRelatedCard = (g: OnboardingGuide) => {\n const cta = resolveContentHref(runtime?.composeContentUrl, {\n type: 'onboarding_guide',\n slug: g.slug,\n basePath,\n platforms: g.onboarding_guide_platforms,\n });\n return <OnboardingGuideCard guide={g} href={cta.href} targetPlatform={cta.targetPlatform} />;\n };\n const renderRelatedCardFn = renderRelatedCard ?? defaultRenderRelatedCard;\n\n return renderShell(\n <PageLayout\n title={guide.title}\n titleSize=\"h1\"\n titleWrap\n backButton={{ label: backLabel, onClick: () => router.push(resolvedBackHref) }}\n >\n {/* Tags — flat onboarding_guide_tags[] from entity_tags. */}\n <EntityTagBadges tags={guide.onboarding_guide_tags} />\n\n {/* Metadata grid — Section · Step | Published | Author. */}\n <EntityAuthorCard\n author={guide.author}\n authorHref={authorHref}\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 independent\n columns — either populated renders the player. */}\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 highlightCaptionsUrl={highlightCaptionsUrl}\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 — unified strip; renders nothing when no published bites. */}\n <VideoBitesStrip\n bites={(guide.video_bites as VideoTeaser[] | null) ?? []}\n filterPublished={true}\n showTitle={false}\n profile={toStripProfile(guide.author)}\n href={`/onboarding-guides/${guide.slug}`}\n />\n\n {/* End-of-article author byline (avatar + linked name + bio) — the\n author DESCRIPTION block every article-shaped detail page renders.\n Hidden when the guide has no author (the byline returns null). */}\n <ArticleAuthorByline\n author={guide.author?.full_name ?? null}\n avatar={guide.author?.avatar_url}\n jobTitle={guide.author?.job_title}\n bio={authorBio ?? guide.author?.about}\n href={authorHref}\n fallbackBio={fallbackBio}\n />\n\n {/* Related — same-section, ordered by step. */}\n {related.length > 0 && (\n <div className=\"space-y-4 border-t border-ods-border pt-8\">\n <h2 className=\"tracking-[-0.36px] text-ods-text-primary text-h3\">More in {guide.section}</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\n {/*\n * Host slot — cross-type related-content / FAQ rail.\n *\n * KEYED DELIBERATELY. This is one member of PageLayout's static children\n * array, and the only member whose element may be created in a SERVER\n * component and crossed over the RSC boundary. Static JSX children are\n * normally exempt from the key warning because `jsxs` runs\n * `validateChildKeys` and stamps `_store.validated = 1` on each element —\n * but a slot arriving over the wire is referenced as a lazy chunk wrapper,\n * so validation marks the WRAPPER and the fulfilled path never copies the\n * flag onto the revived element. It reaches the reconciler with\n * `validated: 0, key: null` and warns, blaming PageLayout (the owner of the\n * enclosing element) rather than anything actually at fault.\n *\n * A keyed Fragment emits no DOM, so rendered output is byte-identical.\n * Do NOT \"fix\" this in PageLayout via `React.Children.toArray` — that would\n * auto-key every consumer's children and change reconciliation identity for\n * all of them, and that file carries an explicit FROZEN contract.\n */}\n <Fragment key=\"related-content\">{relatedContent}</Fragment>\n </PageLayout>,\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) => [...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) => ['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 // Comma-joined, matching the route's `task_ids`-style split. This is the\n // chat-card loader's path: `ids` ALSO tells the route to drop the\n // platform scope, so omitting it silently returned a platform-filtered\n // catalog page under a cache key that claimed to be the id-filtered set.\n if (filters?.ids?.length) params.set('ids', filters.ids.join(','));\n const res = await fetch(`/api/onboarding-guides?${params}`);\n if (!res.ok) throw new Error('Failed to fetch onboarding guides');\n return (await res.json()) as OnboardingGuideListResponse;\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 (await res.json()) as OnboardingGuide;\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) throw new Error('Failed to fetch onboarding-guide sections');\n return (await res.json()) as OnboardingGuideSectionSummary[];\n },\n staleTime: 0,\n });\n}\n"]}
@@ -8,6 +8,9 @@ import {
8
8
  OpenframeLogoGreyIcon,
9
9
  OsqueryLogoGreyIcon
10
10
  } from "./chunk-PBDSPANS.js";
11
+ import {
12
+ useIsomorphicLayoutEffect
13
+ } from "./chunk-7IINE3MK.js";
11
14
 
12
15
  // src/hooks/ui/use-is-truncated.ts
13
16
  import { useCallback, useEffect, useState } from "react";
@@ -46,10 +49,6 @@ function useDebounce(value, delay2 = 500) {
46
49
  return debouncedValue;
47
50
  }
48
51
 
49
- // src/hooks/ui/use-isomorphic-layout-effect.ts
50
- import { useEffect as useEffect3, useLayoutEffect } from "react";
51
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect3;
52
-
53
52
  // src/hooks/ui/use-media-query.ts
54
53
  import { useState as useState3 } from "react";
55
54
  function useMediaQuery(query) {
@@ -86,11 +85,11 @@ function useLgUp() {
86
85
  }
87
86
 
88
87
  // src/hooks/ui/use-header-height.ts
89
- import { useEffect as useEffect4, useState as useState4 } from "react";
88
+ import { useEffect as useEffect3, useState as useState4 } from "react";
90
89
  function useHeaderHeight(defaultHeight = 72, options = {}) {
91
90
  const { enabled = true } = options;
92
91
  const [height, setHeight] = useState4(defaultHeight);
93
- useEffect4(() => {
92
+ useEffect3(() => {
94
93
  if (!enabled) return void 0;
95
94
  const measure = () => {
96
95
  let total = 0;
@@ -130,14 +129,14 @@ function useHeaderHeight(defaultHeight = 72, options = {}) {
130
129
  }
131
130
 
132
131
  // src/hooks/ui/use-marquee-engine.ts
133
- import { useCallback as useCallback2, useEffect as useEffect5, useRef } from "react";
132
+ import { useCallback as useCallback2, useEffect as useEffect4, useRef } from "react";
134
133
  var RESYNC_EPSILON = 1.5;
135
134
  function useMarqueeEngine(options) {
136
135
  const posRef = useRef(0);
137
136
  const glideRemainingRef = useRef(0);
138
137
  const speedEnvRef = useRef(0);
139
138
  const optsRef = useRef(options);
140
- useEffect5(() => {
139
+ useEffect4(() => {
141
140
  optsRef.current = options;
142
141
  });
143
142
  const wrap = useCallback2((pos) => {
@@ -153,7 +152,7 @@ function useMarqueeEngine(options) {
153
152
  glideRemainingRef.current += px;
154
153
  }, []);
155
154
  const active = options.active;
156
- useEffect5(() => {
155
+ useEffect4(() => {
157
156
  if (!active) return void 0;
158
157
  let raf = 0;
159
158
  let last = performance.now();
@@ -198,9 +197,9 @@ function useMarqueeEngine(options) {
198
197
  }
199
198
 
200
199
  // src/hooks/ui/use-reset-on-page-hidden.ts
201
- import { useEffect as useEffect6 } from "react";
200
+ import { useEffect as useEffect5 } from "react";
202
201
  function useResetOnPageHidden(reset) {
203
- useEffect6(() => {
202
+ useEffect5(() => {
204
203
  const onVisibility = () => {
205
204
  if (document.visibilityState === "hidden") reset();
206
205
  };
@@ -214,11 +213,11 @@ function useResetOnPageHidden(reset) {
214
213
  }
215
214
 
216
215
  // src/hooks/ui/use-suppress-clone-focus.ts
217
- import { useEffect as useEffect7, useRef as useRef2 } from "react";
216
+ import { useEffect as useEffect6, useRef as useRef2 } from "react";
218
217
  var CLONE_FOCUSABLE_SELECTOR = 'a[href],button,input,select,textarea,iframe,summary,audio[controls],video[controls],[tabindex],[contenteditable]:not([contenteditable="false"])';
219
218
  function useSuppressCloneFocus(active) {
220
219
  const ref = useRef2(null);
221
- useEffect7(() => {
220
+ useEffect6(() => {
222
221
  const root = ref.current;
223
222
  if (!root || !active) return void 0;
224
223
  const suppress = () => {
@@ -352,7 +351,7 @@ function pick(source, keys) {
352
351
  var NO_CLIENT_CACHE = { staleTime: 0 };
353
352
 
354
353
  // src/hooks/use-near-viewport.ts
355
- import { useEffect as useEffect8, useRef as useRef3, useState as useState5, useCallback as useCallback3 } from "react";
354
+ import { useEffect as useEffect7, useRef as useRef3, useState as useState5, useCallback as useCallback3 } from "react";
356
355
  var observers = /* @__PURE__ */ new Map();
357
356
  var subscribers = /* @__PURE__ */ new WeakMap();
358
357
  var THRESHOLD_EPSILON = 0.01;
@@ -404,7 +403,7 @@ function useNearViewport(rootMargin = NEAR_VIEWPORT_ROOT_MARGIN, threshold = 0)
404
403
  },
405
404
  [key, rootMargin, threshold]
406
405
  );
407
- useEffect8(() => {
406
+ useEffect7(() => {
408
407
  return () => {
409
408
  const el = elRef.current;
410
409
  if (!el) return;
@@ -739,7 +738,6 @@ function navigateSamePageHash(target, options = {}) {
739
738
  export {
740
739
  useIsTruncated,
741
740
  useDebounce,
742
- useIsomorphicLayoutEffect,
743
741
  useMediaQuery,
744
742
  breakpoints,
745
743
  useSmUp,
@@ -784,4 +782,4 @@ export {
784
782
  getHashTargetElement,
785
783
  navigateSamePageHash
786
784
  };
787
- //# sourceMappingURL=chunk-JUNOY5HK.js.map
785
+ //# sourceMappingURL=chunk-2HX6AADM.js.map