@sonordev/site-kit 4.3.2 → 5.0.0

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 (281) hide show
  1. package/agent-manifest.json +1 -1
  2. package/dist/AnalyticsProvider-KCLRFOX6.mjs +10 -0
  3. package/dist/{AnalyticsProvider-TWRQHKPZ.mjs.map → AnalyticsProvider-KCLRFOX6.mjs.map} +1 -1
  4. package/dist/AnalyticsProvider-TXM3DRLI.js +31 -0
  5. package/dist/{AnalyticsProvider-DNMYYBKX.js.map → AnalyticsProvider-TXM3DRLI.js.map} +1 -1
  6. package/dist/BlogViewTracker-J6LRGUHU.js +51 -0
  7. package/dist/BlogViewTracker-J6LRGUHU.js.map +1 -0
  8. package/dist/BlogViewTracker-PZWAWB3O.mjs +48 -0
  9. package/dist/BlogViewTracker-PZWAWB3O.mjs.map +1 -0
  10. package/dist/ChatWidget-LD54Z2PQ.js +20 -0
  11. package/dist/{ChatWidget-MDWEXISQ.js.map → ChatWidget-LD54Z2PQ.js.map} +1 -1
  12. package/dist/ChatWidget-PMDPSZXG.mjs +11 -0
  13. package/dist/{ChatWidget-UQMEJAHY.mjs.map → ChatWidget-PMDPSZXG.mjs.map} +1 -1
  14. package/dist/EngageWidget-4CBFRN4Y.mjs +9 -0
  15. package/dist/{EngageWidget-UIIN43ZU.mjs.map → EngageWidget-4CBFRN4Y.mjs.map} +1 -1
  16. package/dist/EngageWidget-BF5NMQ5A.js +18 -0
  17. package/dist/{EngageWidget-VRC7NUG6.js.map → EngageWidget-BF5NMQ5A.js.map} +1 -1
  18. package/dist/{FileField-LVF3SCDC.mjs → FileField-FFRHS3XP.mjs} +5 -5
  19. package/dist/{FileField-LVF3SCDC.mjs.map → FileField-FFRHS3XP.mjs.map} +1 -1
  20. package/dist/{FileField-W4VXQ3CM.js → FileField-VXADIOMN.js} +6 -6
  21. package/dist/{FileField-W4VXQ3CM.js.map → FileField-VXADIOMN.js.map} +1 -1
  22. package/dist/{FormSpotlight-CRLFAPNI.js → FormSpotlight-JG4ZHS56.js} +15 -15
  23. package/dist/{FormSpotlight-CRLFAPNI.js.map → FormSpotlight-JG4ZHS56.js.map} +1 -1
  24. package/dist/{FormSpotlight-ZPISKGIX.mjs → FormSpotlight-KE46EDP5.mjs} +3 -3
  25. package/dist/{FormSpotlight-ZPISKGIX.mjs.map → FormSpotlight-KE46EDP5.mjs.map} +1 -1
  26. package/dist/{FormStage-QMRPAROJ.js → FormStage-5Z53Z2WY.js} +13 -13
  27. package/dist/{FormStage-QMRPAROJ.js.map → FormStage-5Z53Z2WY.js.map} +1 -1
  28. package/dist/{FormStage-WQOAP7CR.mjs → FormStage-PZKWEXZE.mjs} +3 -3
  29. package/dist/{FormStage-WQOAP7CR.mjs.map → FormStage-PZKWEXZE.mjs.map} +1 -1
  30. package/dist/ManagedForm-E4WHMARH.js +23 -0
  31. package/dist/{ManagedForm-7L2W5BBZ.js.map → ManagedForm-E4WHMARH.js.map} +1 -1
  32. package/dist/ManagedForm-VU2TKV6J.mjs +14 -0
  33. package/dist/{ManagedForm-D7CFOIXH.mjs.map → ManagedForm-VU2TKV6J.mjs.map} +1 -1
  34. package/dist/ManagedNewsletterForm-6DET3VGZ.mjs +62 -0
  35. package/dist/ManagedNewsletterForm-6DET3VGZ.mjs.map +1 -0
  36. package/dist/ManagedNewsletterForm-PG4EX3W6.js +64 -0
  37. package/dist/ManagedNewsletterForm-PG4EX3W6.js.map +1 -0
  38. package/dist/{SignalCore-JQLRWMPJ.mjs → SignalCore-RZVTLUC2.mjs} +5 -5
  39. package/dist/{SignalCore-JQLRWMPJ.mjs.map → SignalCore-RZVTLUC2.mjs.map} +1 -1
  40. package/dist/{SignalCore-DNXKQKRO.js → SignalCore-TCUVXVMN.js} +11 -11
  41. package/dist/{SignalCore-DNXKQKRO.js.map → SignalCore-TCUVXVMN.js.map} +1 -1
  42. package/dist/SitemapSync-AJU4DM3G.js +17 -0
  43. package/dist/{SitemapSync-SR6OJRIA.js.map → SitemapSync-AJU4DM3G.js.map} +1 -1
  44. package/dist/SitemapSync-T75NAFB3.mjs +8 -0
  45. package/dist/{SitemapSync-RFY6PUG7.mjs.map → SitemapSync-T75NAFB3.mjs.map} +1 -1
  46. package/dist/analytics/index.js +9 -9
  47. package/dist/analytics/index.mjs +4 -4
  48. package/dist/blog/AuthorCard.d.ts.map +1 -1
  49. package/dist/blog/AuthorPage.d.ts.map +1 -1
  50. package/dist/blog/BlogList.d.ts +7 -1
  51. package/dist/blog/BlogList.d.ts.map +1 -1
  52. package/dist/blog/BlogPost.d.ts +1 -1
  53. package/dist/blog/BlogPost.d.ts.map +1 -1
  54. package/dist/blog/BlogSidebar.d.ts +0 -7
  55. package/dist/blog/BlogSidebar.d.ts.map +1 -1
  56. package/dist/blog/BlogViewTracker.d.ts +10 -0
  57. package/dist/blog/BlogViewTracker.d.ts.map +1 -0
  58. package/dist/blog/ClusterLandingPage.d.ts.map +1 -1
  59. package/dist/blog/ManagedNewsletterForm.d.ts +13 -0
  60. package/dist/blog/ManagedNewsletterForm.d.ts.map +1 -0
  61. package/dist/blog/NewsletterShell.d.ts +18 -0
  62. package/dist/blog/NewsletterShell.d.ts.map +1 -0
  63. package/dist/blog/NewsletterWidget.d.ts +31 -0
  64. package/dist/blog/NewsletterWidget.d.ts.map +1 -0
  65. package/dist/blog/RelatedPosts.d.ts.map +1 -1
  66. package/dist/blog/author-social.d.ts +15 -0
  67. package/dist/blog/author-social.d.ts.map +1 -0
  68. package/dist/blog/author-social.test.d.ts +2 -0
  69. package/dist/blog/author-social.test.d.ts.map +1 -0
  70. package/dist/blog/blog-view-tracker.test.d.ts +2 -0
  71. package/dist/blog/blog-view-tracker.test.d.ts.map +1 -0
  72. package/dist/blog/category-metadata.test.d.ts +2 -0
  73. package/dist/blog/category-metadata.test.d.ts.map +1 -0
  74. package/dist/blog/index.d.ts +4 -2
  75. package/dist/blog/index.d.ts.map +1 -1
  76. package/dist/blog/index.js +94 -505
  77. package/dist/blog/index.js.map +1 -1
  78. package/dist/blog/index.mjs +59 -491
  79. package/dist/blog/index.mjs.map +1 -1
  80. package/dist/blog/newsletter-widget.test.d.ts +2 -0
  81. package/dist/blog/newsletter-widget.test.d.ts.map +1 -0
  82. package/dist/blog/reading-time.d.ts +10 -0
  83. package/dist/blog/reading-time.d.ts.map +1 -0
  84. package/dist/blog/reading-time.test.d.ts +2 -0
  85. package/dist/blog/reading-time.test.d.ts.map +1 -0
  86. package/dist/blog/server-core-contract.test.d.ts +2 -0
  87. package/dist/blog/server-core-contract.test.d.ts.map +1 -0
  88. package/dist/blog/server-core.d.ts +16 -4
  89. package/dist/blog/server-core.d.ts.map +1 -1
  90. package/dist/blog/server-ui.d.ts +5 -0
  91. package/dist/blog/server-ui.d.ts.map +1 -1
  92. package/dist/blog/server-ui.js +35 -10
  93. package/dist/blog/server-ui.js.map +1 -1
  94. package/dist/blog/server-ui.mjs +8 -6
  95. package/dist/blog/server-ui.mjs.map +1 -1
  96. package/dist/blog/server.d.ts +16 -4
  97. package/dist/blog/server.d.ts.map +1 -1
  98. package/dist/blog/server.js +40 -40
  99. package/dist/blog/server.mjs +1 -1
  100. package/dist/blog/tag-links.test.d.ts +2 -0
  101. package/dist/blog/tag-links.test.d.ts.map +1 -0
  102. package/dist/blog/types-wire-shape.test.d.ts +2 -0
  103. package/dist/blog/types-wire-shape.test.d.ts.map +1 -0
  104. package/dist/blog/types.d.ts +25 -19
  105. package/dist/blog/types.d.ts.map +1 -1
  106. package/dist/blog/widget-styles.d.ts +9 -0
  107. package/dist/blog/widget-styles.d.ts.map +1 -0
  108. package/dist/{chunk-EUAOOOIE.js → chunk-3FZ76VI5.js} +14 -14
  109. package/dist/{chunk-EUAOOOIE.js.map → chunk-3FZ76VI5.js.map} +1 -1
  110. package/dist/{chunk-C22WW7G2.mjs → chunk-3SMG4EXR.mjs} +3 -3
  111. package/dist/{chunk-C22WW7G2.mjs.map → chunk-3SMG4EXR.mjs.map} +1 -1
  112. package/dist/{chunk-FPWPRFTP.js → chunk-4D2G5ZNP.js} +15 -15
  113. package/dist/{chunk-FPWPRFTP.js.map → chunk-4D2G5ZNP.js.map} +1 -1
  114. package/dist/{chunk-45VPULF2.mjs → chunk-4UHO6DPJ.mjs} +4 -4
  115. package/dist/{chunk-45VPULF2.mjs.map → chunk-4UHO6DPJ.mjs.map} +1 -1
  116. package/dist/{chunk-I6XKZNFT.mjs → chunk-5JNLZRLX.mjs} +3 -3
  117. package/dist/{chunk-I6XKZNFT.mjs.map → chunk-5JNLZRLX.mjs.map} +1 -1
  118. package/dist/{chunk-ULP6BTN2.js → chunk-5JQLLF2T.js} +12 -12
  119. package/dist/{chunk-ULP6BTN2.js.map → chunk-5JQLLF2T.js.map} +1 -1
  120. package/dist/{chunk-H27UCW6K.js → chunk-5OHHYGD6.js} +15 -15
  121. package/dist/{chunk-H27UCW6K.js.map → chunk-5OHHYGD6.js.map} +1 -1
  122. package/dist/{chunk-CQWG5ICB.js → chunk-62ODUWUX.js} +4 -4
  123. package/dist/{chunk-CQWG5ICB.js.map → chunk-62ODUWUX.js.map} +1 -1
  124. package/dist/{chunk-I2IA3JXD.js → chunk-6QQFEJIP.js} +8 -8
  125. package/dist/{chunk-I2IA3JXD.js.map → chunk-6QQFEJIP.js.map} +1 -1
  126. package/dist/{chunk-RUOEUMAW.js → chunk-7T4VMXKD.js} +3 -3
  127. package/dist/{chunk-RUOEUMAW.js.map → chunk-7T4VMXKD.js.map} +1 -1
  128. package/dist/chunk-AK6JZ3OE.mjs +65 -0
  129. package/dist/chunk-AK6JZ3OE.mjs.map +1 -0
  130. package/dist/{chunk-MWKYLWCH.mjs → chunk-AXYKBQVI.mjs} +8 -8
  131. package/dist/{chunk-MWKYLWCH.mjs.map → chunk-AXYKBQVI.mjs.map} +1 -1
  132. package/dist/{chunk-VLHHBJSV.js → chunk-BQY3FJ3R.js} +8 -8
  133. package/dist/{chunk-VLHHBJSV.js.map → chunk-BQY3FJ3R.js.map} +1 -1
  134. package/dist/{chunk-6VHVIBLQ.mjs → chunk-DHXQBTXE.mjs} +62 -41
  135. package/dist/chunk-DHXQBTXE.mjs.map +1 -0
  136. package/dist/chunk-DO6ATNLN.js +67 -0
  137. package/dist/chunk-DO6ATNLN.js.map +1 -0
  138. package/dist/{chunk-E242GZNE.js → chunk-DX6D7HDI.js} +4 -4
  139. package/dist/{chunk-E242GZNE.js.map → chunk-DX6D7HDI.js.map} +1 -1
  140. package/dist/{chunk-ZWMAQ52D.mjs → chunk-EISVUD75.mjs} +3 -3
  141. package/dist/{chunk-ZWMAQ52D.mjs.map → chunk-EISVUD75.mjs.map} +1 -1
  142. package/dist/{chunk-JNKQKGYH.mjs → chunk-FCKL5CF3.mjs} +3 -3
  143. package/dist/{chunk-JNKQKGYH.mjs.map → chunk-FCKL5CF3.mjs.map} +1 -1
  144. package/dist/{chunk-NDS6MXIP.mjs → chunk-FDWDXMJL.mjs} +3 -3
  145. package/dist/{chunk-NDS6MXIP.mjs.map → chunk-FDWDXMJL.mjs.map} +1 -1
  146. package/dist/{chunk-ZXRORNAW.js → chunk-FQ3JQV3M.js} +4 -4
  147. package/dist/{chunk-ZXRORNAW.js.map → chunk-FQ3JQV3M.js.map} +1 -1
  148. package/dist/{chunk-A7OO6OPW.mjs → chunk-FTBABL3T.mjs} +3 -3
  149. package/dist/{chunk-A7OO6OPW.mjs.map → chunk-FTBABL3T.mjs.map} +1 -1
  150. package/dist/{chunk-5EFSD7VM.js → chunk-GCZMDY2T.js} +490 -20
  151. package/dist/chunk-GCZMDY2T.js.map +1 -0
  152. package/dist/{chunk-4OSZ2JD3.js → chunk-HCN2US4M.js} +18 -18
  153. package/dist/{chunk-4OSZ2JD3.js.map → chunk-HCN2US4M.js.map} +1 -1
  154. package/dist/{chunk-3BXYZC3V.mjs → chunk-HEUCDF3O.mjs} +3 -3
  155. package/dist/{chunk-3BXYZC3V.mjs.map → chunk-HEUCDF3O.mjs.map} +1 -1
  156. package/dist/chunk-HX6ZG3PP.js +19 -0
  157. package/dist/chunk-HX6ZG3PP.js.map +1 -0
  158. package/dist/{chunk-UR4HKLHW.js → chunk-IX5RAZWX.js} +6 -6
  159. package/dist/{chunk-UR4HKLHW.js.map → chunk-IX5RAZWX.js.map} +1 -1
  160. package/dist/{chunk-NQEUFRMX.mjs → chunk-J4JXAFSW.mjs} +3 -3
  161. package/dist/{chunk-NQEUFRMX.mjs.map → chunk-J4JXAFSW.mjs.map} +1 -1
  162. package/dist/{chunk-FBI6LYTM.js → chunk-JBGRXICL.js} +62 -41
  163. package/dist/chunk-JBGRXICL.js.map +1 -0
  164. package/dist/{chunk-FIA3WNEM.js → chunk-JIUVBSQZ.js} +3 -3
  165. package/dist/{chunk-FIA3WNEM.js.map → chunk-JIUVBSQZ.js.map} +1 -1
  166. package/dist/chunk-JPTJGLKS.mjs +6 -0
  167. package/dist/{chunk-NQNSATTA.mjs.map → chunk-JPTJGLKS.mjs.map} +1 -1
  168. package/dist/{chunk-YWBXKEAF.js → chunk-JY3KZDEM.js} +3 -3
  169. package/dist/{chunk-YWBXKEAF.js.map → chunk-JY3KZDEM.js.map} +1 -1
  170. package/dist/{chunk-67MTTPJV.js → chunk-KWH6RAVY.js} +11 -11
  171. package/dist/{chunk-67MTTPJV.js.map → chunk-KWH6RAVY.js.map} +1 -1
  172. package/dist/{chunk-M52FYLV4.js → chunk-LLKXPJSE.js} +7 -7
  173. package/dist/{chunk-M52FYLV4.js.map → chunk-LLKXPJSE.js.map} +1 -1
  174. package/dist/{chunk-6ABCPVJL.js → chunk-LZY374FB.js} +4 -4
  175. package/dist/{chunk-6ABCPVJL.js.map → chunk-LZY374FB.js.map} +1 -1
  176. package/dist/{chunk-OQTP5M5Y.js → chunk-MGPHBVOK.js} +9 -9
  177. package/dist/{chunk-OQTP5M5Y.js.map → chunk-MGPHBVOK.js.map} +1 -1
  178. package/dist/{chunk-VYNOQCEK.js → chunk-MPO6TRLS.js} +14 -14
  179. package/dist/{chunk-VYNOQCEK.js.map → chunk-MPO6TRLS.js.map} +1 -1
  180. package/dist/{chunk-EQZ42LAK.mjs → chunk-MVJQ4ZA2.mjs} +4 -4
  181. package/dist/{chunk-EQZ42LAK.mjs.map → chunk-MVJQ4ZA2.mjs.map} +1 -1
  182. package/dist/{chunk-VU45CH5R.mjs → chunk-MWXBRCM2.mjs} +3 -3
  183. package/dist/{chunk-VU45CH5R.mjs.map → chunk-MWXBRCM2.mjs.map} +1 -1
  184. package/dist/{chunk-C3M5E4YI.js → chunk-N3RWPAR5.js} +5 -5
  185. package/dist/{chunk-C3M5E4YI.js.map → chunk-N3RWPAR5.js.map} +1 -1
  186. package/dist/{chunk-6WJDTGM6.js → chunk-OGPS3DKE.js} +5 -5
  187. package/dist/{chunk-6WJDTGM6.js.map → chunk-OGPS3DKE.js.map} +1 -1
  188. package/dist/{chunk-D4KHH44S.mjs → chunk-PPCTL4B5.mjs} +2 -2
  189. package/dist/{chunk-D4KHH44S.mjs.map → chunk-PPCTL4B5.mjs.map} +1 -1
  190. package/dist/{chunk-R6XBPA6C.mjs → chunk-PZE5L2FK.mjs} +4 -4
  191. package/dist/{chunk-R6XBPA6C.mjs.map → chunk-PZE5L2FK.mjs.map} +1 -1
  192. package/dist/{chunk-PSBAUXUH.mjs → chunk-QH3WVTEK.mjs} +4 -4
  193. package/dist/{chunk-PSBAUXUH.mjs.map → chunk-QH3WVTEK.mjs.map} +1 -1
  194. package/dist/{chunk-LQENHKD3.mjs → chunk-QI2H5KK6.mjs} +4 -4
  195. package/dist/{chunk-LQENHKD3.mjs.map → chunk-QI2H5KK6.mjs.map} +1 -1
  196. package/dist/chunk-S65JSRWW.js +8 -0
  197. package/dist/{chunk-UXIUJYFK.js.map → chunk-S65JSRWW.js.map} +1 -1
  198. package/dist/{chunk-36E6QKGL.mjs → chunk-SW6KWUNI.mjs} +3 -3
  199. package/dist/{chunk-36E6QKGL.mjs.map → chunk-SW6KWUNI.mjs.map} +1 -1
  200. package/dist/{chunk-NJ4YX3CI.mjs → chunk-SXPINIJG.mjs} +4 -4
  201. package/dist/{chunk-NJ4YX3CI.mjs.map → chunk-SXPINIJG.mjs.map} +1 -1
  202. package/dist/{chunk-R7V7HNJJ.js → chunk-UABMMR7U.js} +2 -2
  203. package/dist/{chunk-R7V7HNJJ.js.map → chunk-UABMMR7U.js.map} +1 -1
  204. package/dist/{chunk-X2PAODFM.mjs → chunk-UFURXSAI.mjs} +3 -3
  205. package/dist/{chunk-X2PAODFM.mjs.map → chunk-UFURXSAI.mjs.map} +1 -1
  206. package/dist/{chunk-JJS63TDR.mjs → chunk-UV6KQUSL.mjs} +483 -21
  207. package/dist/chunk-UV6KQUSL.mjs.map +1 -0
  208. package/dist/{chunk-H3F4GV2S.js → chunk-VACFVPNF.js} +14 -14
  209. package/dist/{chunk-H3F4GV2S.js.map → chunk-VACFVPNF.js.map} +1 -1
  210. package/dist/{chunk-LVM63JSA.mjs → chunk-XPAHKYX7.mjs} +3 -3
  211. package/dist/{chunk-LVM63JSA.mjs.map → chunk-XPAHKYX7.mjs.map} +1 -1
  212. package/dist/chunk-YFX3Q56O.mjs +16 -0
  213. package/dist/chunk-YFX3Q56O.mjs.map +1 -0
  214. package/dist/{chunk-TY3BPHTE.mjs → chunk-YGRHEEPX.mjs} +7 -7
  215. package/dist/{chunk-TY3BPHTE.mjs.map → chunk-YGRHEEPX.mjs.map} +1 -1
  216. package/dist/{chunk-BUF6IZUE.mjs → chunk-YSZB2DRX.mjs} +3 -3
  217. package/dist/{chunk-BUF6IZUE.mjs.map → chunk-YSZB2DRX.mjs.map} +1 -1
  218. package/dist/{chunk-INR6AQ54.mjs → chunk-YVE65W47.mjs} +4 -4
  219. package/dist/{chunk-INR6AQ54.mjs.map → chunk-YVE65W47.mjs.map} +1 -1
  220. package/dist/cli/index.js +7 -27
  221. package/dist/cli/index.js.map +1 -1
  222. package/dist/cli/index.mjs +5 -25
  223. package/dist/cli/index.mjs.map +1 -1
  224. package/dist/client/index.js +4 -4
  225. package/dist/client/index.mjs +3 -3
  226. package/dist/commerce/index.js +56 -56
  227. package/dist/commerce/index.mjs +5 -5
  228. package/dist/engage/index.js +10 -10
  229. package/dist/engage/index.mjs +7 -7
  230. package/dist/fleet/index.js +8 -8
  231. package/dist/fleet/index.mjs +4 -4
  232. package/dist/forms/index.js +16 -16
  233. package/dist/forms/index.mjs +9 -9
  234. package/dist/forms/server.js +10 -10
  235. package/dist/forms/server.mjs +8 -8
  236. package/dist/forms/static.js +7 -7
  237. package/dist/forms/static.mjs +6 -6
  238. package/dist/images/index.js +11 -11
  239. package/dist/images/index.mjs +4 -4
  240. package/dist/index.js +63 -63
  241. package/dist/index.mjs +9 -9
  242. package/dist/layout/client.js +8 -8
  243. package/dist/layout/client.mjs +7 -7
  244. package/dist/layout/index.js +10 -10
  245. package/dist/layout/index.mjs +8 -8
  246. package/dist/llms/index.js +12 -12
  247. package/dist/llms/index.mjs +2 -2
  248. package/dist/maps/index.js +5 -5
  249. package/dist/maps/index.mjs +3 -3
  250. package/dist/search/index.js +4 -4
  251. package/dist/search/index.mjs +3 -3
  252. package/dist/seo/client.js +5 -5
  253. package/dist/seo/client.mjs +4 -4
  254. package/dist/seo/index.js +5 -5
  255. package/dist/seo/index.mjs +4 -4
  256. package/dist/server/index.js +3 -3
  257. package/dist/server/index.mjs +2 -2
  258. package/dist/shared/version.d.ts +1 -1
  259. package/dist/signal/index.js +11 -11
  260. package/dist/signal/index.mjs +2 -2
  261. package/dist/sitemap/index.js +2 -2
  262. package/dist/sitemap/index.mjs +1 -1
  263. package/dist/sync/index.js +16 -16
  264. package/dist/sync/index.mjs +4 -4
  265. package/package.json +1 -1
  266. package/dist/AnalyticsProvider-DNMYYBKX.js +0 -31
  267. package/dist/AnalyticsProvider-TWRQHKPZ.mjs +0 -10
  268. package/dist/ChatWidget-MDWEXISQ.js +0 -20
  269. package/dist/ChatWidget-UQMEJAHY.mjs +0 -11
  270. package/dist/EngageWidget-UIIN43ZU.mjs +0 -9
  271. package/dist/EngageWidget-VRC7NUG6.js +0 -18
  272. package/dist/ManagedForm-7L2W5BBZ.js +0 -23
  273. package/dist/ManagedForm-D7CFOIXH.mjs +0 -14
  274. package/dist/SitemapSync-RFY6PUG7.mjs +0 -8
  275. package/dist/SitemapSync-SR6OJRIA.js +0 -17
  276. package/dist/chunk-5EFSD7VM.js.map +0 -1
  277. package/dist/chunk-6VHVIBLQ.mjs.map +0 -1
  278. package/dist/chunk-FBI6LYTM.js.map +0 -1
  279. package/dist/chunk-JJS63TDR.mjs.map +0 -1
  280. package/dist/chunk-NQNSATTA.mjs +0 -6
  281. package/dist/chunk-UXIUJYFK.js +0 -8
@@ -2,429 +2,72 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkGQF6QAQS_js = require('../chunk-GQF6QAQS.js');
5
- var chunk5EFSD7VM_js = require('../chunk-5EFSD7VM.js');
5
+ var chunkDO6ATNLN_js = require('../chunk-DO6ATNLN.js');
6
+ var chunkGCZMDY2T_js = require('../chunk-GCZMDY2T.js');
7
+ require('../chunk-HX6ZG3PP.js');
6
8
  var chunkTPL2IHFI_js = require('../chunk-TPL2IHFI.js');
7
9
  var chunkJ7QI3GDX_js = require('../chunk-J7QI3GDX.js');
8
10
  require('../chunk-SNAQBZPT.js');
11
+ var React = require('react');
9
12
  var jsxRuntime = require('react/jsx-runtime');
10
- var react = require('react');
11
13
 
12
- async function fetchRecentPosts(apiUrl, apiKey, limit = 5) {
13
- try {
14
- const response = await fetch(`${apiUrl}/public/blog/recent?limit=${limit}`, {
15
- headers: { "x-api-key": apiKey },
16
- next: { revalidate: 300 }
17
- });
18
- if (!response.ok) return [];
19
- const data = await response.json();
20
- return data.posts || [];
21
- } catch (error) {
22
- console.error("[Blog] Error fetching recent posts:", error);
23
- return [];
24
- }
25
- }
26
- async function fetchCategories(apiUrl, apiKey) {
27
- try {
28
- const response = await fetch(`${apiUrl}/public/blog/categories`, {
29
- headers: { "x-api-key": apiKey },
30
- next: { revalidate: 300 }
31
- });
32
- if (!response.ok) return [];
33
- const data = await response.json();
34
- return data.categories || [];
35
- } catch (error) {
36
- console.error("[Blog] Error fetching categories:", error);
37
- return [];
38
- }
39
- }
40
- async function fetchTags(apiUrl, apiKey) {
41
- try {
42
- const response = await fetch(`${apiUrl}/public/blog/tags`, {
43
- headers: { "x-api-key": apiKey },
44
- next: { revalidate: 300 }
45
- });
46
- if (!response.ok) return [];
47
- const data = await response.json();
48
- return data.tags || [];
49
- } catch (error) {
50
- console.error("[Blog] Error fetching tags:", error);
51
- return [];
52
- }
53
- }
54
- async function BlogSidebar({
55
- apiUrl = process.env.SONOR_API_URL || "https://api.sonor.io",
56
- apiKey = process.env.SONOR_API_KEY || "",
57
- showCategories = true,
58
- showRecentPosts = true,
59
- recentPostsCount = 5,
60
- showTags = true,
61
- showSearch = true,
62
- basePath = "/blog",
63
- className,
64
- currentCategory,
65
- children
66
- }) {
67
- if (!apiKey) {
68
- console.warn("[Blog] No API key configured for sidebar");
69
- return null;
70
- }
71
- const [categories, recentPosts, tags] = await Promise.all([
72
- showCategories ? fetchCategories(apiUrl, apiKey) : Promise.resolve([]),
73
- showRecentPosts ? fetchRecentPosts(apiUrl, apiKey, recentPostsCount) : Promise.resolve([]),
74
- showTags ? fetchTags(apiUrl, apiKey) : Promise.resolve([])
75
- ]);
76
- return /* @__PURE__ */ jsxRuntime.jsxs("aside", { className, style: { display: "flex", flexDirection: "column", gap: 32 }, children: [
77
- showSearch && /* @__PURE__ */ jsxRuntime.jsx(SearchWidget, { basePath }),
78
- showCategories && categories.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
79
- CategoriesWidget,
80
- {
81
- categories,
82
- basePath,
83
- currentCategory
84
- }
85
- ),
86
- showRecentPosts && recentPosts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(RecentPostsWidget, { posts: recentPosts, basePath }),
87
- showTags && tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(TagsWidget, { tags, basePath }),
88
- children
89
- ] });
90
- }
91
- function SearchWidget({ basePath }) {
92
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: widgetStyle, children: [
93
- /* @__PURE__ */ jsxRuntime.jsx("h4", { style: widgetTitleStyle, children: "Search" }),
94
- /* @__PURE__ */ jsxRuntime.jsx("form", { action: basePath, method: "get", children: /* @__PURE__ */ jsxRuntime.jsx(
95
- "input",
96
- {
97
- type: "search",
98
- name: "search",
99
- placeholder: "Search posts...",
100
- style: {
101
- width: "100%",
102
- padding: "10px 12px",
103
- border: "1px solid var(--sk-border)",
104
- borderRadius: 8,
105
- fontSize: 14
106
- }
107
- }
108
- ) })
109
- ] });
110
- }
111
- function CategoriesWidget({
112
- categories,
113
- basePath,
114
- currentCategory
115
- }) {
116
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: widgetStyle, children: [
117
- /* @__PURE__ */ jsxRuntime.jsx("h4", { style: widgetTitleStyle, children: "Categories" }),
118
- /* @__PURE__ */ jsxRuntime.jsxs("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: [
119
- /* @__PURE__ */ jsxRuntime.jsx("li", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(
120
- "a",
121
- {
122
- href: basePath,
123
- style: {
124
- ...categoryLinkStyle,
125
- fontWeight: !currentCategory ? 600 : 400,
126
- color: !currentCategory ? "var(--sk-primary)" : "var(--sk-text-primary)"
127
- },
128
- children: "All Posts"
129
- }
130
- ) }),
131
- categories.map((cat) => /* @__PURE__ */ jsxRuntime.jsx("li", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsxRuntime.jsxs(
132
- "a",
133
- {
134
- href: `${basePath}?category=${cat.slug}`,
135
- style: {
136
- ...categoryLinkStyle,
137
- fontWeight: currentCategory === cat.slug ? 600 : 400,
138
- color: currentCategory === cat.slug ? "var(--sk-primary)" : "var(--sk-text-primary)"
139
- },
140
- children: [
141
- cat.name,
142
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: "var(--sk-text-tertiary)", marginLeft: 8 }, children: [
143
- "(",
144
- cat.post_count,
145
- ")"
146
- ] })
147
- ]
148
- }
149
- ) }, cat.slug))
150
- ] })
151
- ] });
152
- }
153
- function RecentPostsWidget({
154
- posts,
155
- basePath
156
- }) {
157
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: widgetStyle, children: [
158
- /* @__PURE__ */ jsxRuntime.jsx("h4", { style: widgetTitleStyle, children: "Recent Posts" }),
159
- /* @__PURE__ */ jsxRuntime.jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: posts.map((post) => {
160
- const date = post.published_at ? new Date(post.published_at).toLocaleDateString("en-US", {
161
- month: "short",
162
- day: "numeric"
163
- }) : null;
164
- return /* @__PURE__ */ jsxRuntime.jsx(
165
- "li",
166
- {
167
- style: {
168
- marginBottom: 16,
169
- paddingBottom: 16,
170
- borderBottom: "1px solid var(--sk-border)"
171
- },
172
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 12 }, children: [
173
- post.featured_image && /* @__PURE__ */ jsxRuntime.jsx("a", { href: `${basePath}/${post.slug}`, children: /* @__PURE__ */ jsxRuntime.jsx(
174
- "img",
175
- {
176
- src: post.featured_image,
177
- alt: "",
178
- style: {
179
- width: 64,
180
- height: 48,
181
- objectFit: "cover",
182
- borderRadius: 6,
183
- flexShrink: 0
184
- }
185
- }
186
- ) }),
187
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
188
- /* @__PURE__ */ jsxRuntime.jsx(
189
- "a",
190
- {
191
- href: `${basePath}/${post.slug}`,
192
- style: {
193
- fontSize: 14,
194
- fontWeight: 500,
195
- color: "var(--sk-text-primary)",
196
- textDecoration: "none",
197
- display: "-webkit-box",
198
- WebkitLineClamp: 2,
199
- WebkitBoxOrient: "vertical",
200
- overflow: "hidden"
201
- },
202
- children: post.title
203
- }
204
- ),
205
- date && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--sk-text-tertiary)", display: "block", marginTop: 4 }, children: date })
206
- ] })
207
- ] })
208
- },
209
- post.id
210
- );
211
- }) })
212
- ] });
213
- }
214
- function TagsWidget({
215
- tags,
216
- basePath
217
- }) {
218
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: widgetStyle, children: [
219
- /* @__PURE__ */ jsxRuntime.jsx("h4", { style: widgetTitleStyle, children: "Popular Tags" }),
220
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: tags.slice(0, 15).map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
221
- "a",
222
- {
223
- href: `${basePath}?tag=${tag.slug}`,
224
- style: {
225
- padding: "4px 10px",
226
- backgroundColor: "var(--sk-bg-elevated)",
227
- borderRadius: 9999,
228
- fontSize: 12,
229
- color: "var(--sk-text-primary)",
230
- textDecoration: "none",
231
- transition: "background-color 0.2s"
232
- },
233
- children: tag.name
234
- },
235
- tag.slug
236
- )) })
237
- ] });
238
- }
14
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
+
16
+ var React__default = /*#__PURE__*/_interopDefault(React);
17
+
18
+ var ManagedNewsletterForm = React__default.default.lazy(() => import('../ManagedNewsletterForm-PG4EX3W6.js'));
239
19
  function NewsletterWidget({
240
20
  title = "Subscribe to Our Newsletter",
241
21
  description = "Get the latest posts delivered straight to your inbox.",
242
- buttonText = "Subscribe"
22
+ buttonText = "Subscribe",
23
+ onSubmit,
24
+ formSlug,
25
+ successMessage = "You're subscribed \u2014 thanks!"
243
26
  }) {
244
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { ...widgetStyle, backgroundColor: "rgba(var(--sk-primary-rgb), 0.1)" }, children: [
245
- /* @__PURE__ */ jsxRuntime.jsx("h4", { style: { ...widgetTitleStyle, color: "var(--sk-primary)" }, children: title }),
246
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: 14, color: "var(--sk-text-secondary)", marginBottom: 16 }, children: description }),
247
- /* @__PURE__ */ jsxRuntime.jsxs(
248
- "form",
249
- {
250
- onSubmit: (e) => {
251
- e.preventDefault();
252
- },
253
- style: { display: "flex", gap: 8 },
254
- children: [
255
- /* @__PURE__ */ jsxRuntime.jsx(
256
- "input",
257
- {
258
- type: "email",
259
- name: "email",
260
- placeholder: "Enter your email",
261
- required: true,
262
- style: {
263
- flex: 1,
264
- padding: "10px 12px",
265
- border: "1px solid var(--sk-border)",
266
- borderRadius: 8,
267
- fontSize: 14
268
- }
269
- }
270
- ),
271
- /* @__PURE__ */ jsxRuntime.jsx(
272
- "button",
273
- {
274
- type: "submit",
275
- style: {
276
- padding: "10px 16px",
277
- backgroundColor: "var(--sk-primary)",
278
- color: "var(--sk-bg)",
279
- border: "none",
280
- borderRadius: 8,
281
- fontSize: 14,
282
- fontWeight: 500,
283
- cursor: "pointer"
284
- },
285
- children: buttonText
286
- }
287
- )
288
- ]
289
- }
290
- )
291
- ] });
292
- }
293
- var widgetStyle = {
294
- padding: 20,
295
- backgroundColor: "var(--sk-bg-elevated)",
296
- borderRadius: 12
297
- };
298
- var widgetTitleStyle = {
299
- margin: "0 0 16px",
300
- fontSize: 16,
301
- fontWeight: 600,
302
- color: "var(--sk-text-primary)"
303
- };
304
- var categoryLinkStyle = {
305
- display: "flex",
306
- alignItems: "center",
307
- fontSize: 14,
308
- textDecoration: "none"
309
- };
310
- async function BlogLayout({
311
- apiUrl = process.env.SONOR_API_URL || "https://api.sonor.io",
312
- apiKey = process.env.SONOR_API_KEY || "",
313
- layout = "sidebar-right",
314
- showSidebar = true,
315
- sidebarProps = {},
316
- hero,
317
- maxWidth = 1280,
318
- basePath = "/blog",
319
- className,
320
- currentCategory,
321
- children
322
- }) {
323
- const hasSidebar = showSidebar && layout !== "full-width";
324
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
325
- hero && /* @__PURE__ */ jsxRuntime.jsx(
326
- "section",
327
- {
328
- style: {
329
- padding: "60px 20px",
330
- backgroundColor: hero.backgroundColor || "var(--sk-primary)",
331
- backgroundImage: hero.backgroundImage ? `url(${hero.backgroundImage})` : void 0,
332
- backgroundSize: "cover",
333
- backgroundPosition: "center",
334
- color: "var(--sk-bg)",
335
- textAlign: "center"
336
- },
337
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { maxWidth, margin: "0 auto" }, children: [
338
- hero.title && /* @__PURE__ */ jsxRuntime.jsx(
339
- "h1",
340
- {
341
- style: {
342
- fontSize: "clamp(32px, 5vw, 48px)",
343
- fontWeight: 700,
344
- marginBottom: 16
345
- },
346
- children: hero.title
347
- }
348
- ),
349
- hero.subtitle && /* @__PURE__ */ jsxRuntime.jsx(
350
- "p",
351
- {
352
- style: {
353
- fontSize: "clamp(16px, 2vw, 20px)",
354
- opacity: 0.9,
355
- maxWidth: 600,
356
- margin: "0 auto"
357
- },
358
- children: hero.subtitle
359
- }
360
- )
361
- ] })
362
- }
363
- ),
364
- /* @__PURE__ */ jsxRuntime.jsx(
365
- "div",
27
+ const [email, setEmail] = React.useState("");
28
+ const [status, setStatus] = React.useState("idle");
29
+ const [errorMessage, setErrorMessage] = React.useState(null);
30
+ if (!onSubmit && formSlug) {
31
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
32
+ ManagedNewsletterForm,
366
33
  {
367
- style: {
368
- maxWidth,
369
- margin: "0 auto",
370
- padding: "40px 20px"
371
- },
372
- children: /* @__PURE__ */ jsxRuntime.jsxs(
373
- "div",
374
- {
375
- style: {
376
- display: hasSidebar ? "grid" : "block",
377
- gridTemplateColumns: hasSidebar ? layout === "sidebar-left" ? "300px 1fr" : "1fr 300px" : void 0,
378
- gap: 48
379
- },
380
- children: [
381
- hasSidebar && layout === "sidebar-left" && /* @__PURE__ */ jsxRuntime.jsx(
382
- BlogSidebar,
383
- {
384
- apiUrl,
385
- apiKey,
386
- basePath,
387
- currentCategory,
388
- ...sidebarProps
389
- }
390
- ),
391
- /* @__PURE__ */ jsxRuntime.jsx("main", { style: { minWidth: 0 }, children }),
392
- hasSidebar && layout === "sidebar-right" && /* @__PURE__ */ jsxRuntime.jsx(
393
- BlogSidebar,
394
- {
395
- apiUrl,
396
- apiKey,
397
- basePath,
398
- currentCategory,
399
- ...sidebarProps
400
- }
401
- )
402
- ]
403
- }
404
- )
405
- }
406
- )
407
- ] });
408
- }
409
- async function BlogPage({ listComponent, ...layoutProps }) {
410
- return /* @__PURE__ */ jsxRuntime.jsx(BlogLayout, { ...layoutProps, children: listComponent });
411
- }
412
- async function BlogPostPage({ postComponent, ...layoutProps }) {
413
- return /* @__PURE__ */ jsxRuntime.jsx(BlogLayout, { ...layoutProps, showSidebar: false, layout: "full-width", children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { maxWidth: 800, margin: "0 auto" }, children: postComponent }) });
414
- }
415
- async function CategoryPage({
416
- category,
417
- categoryName,
418
- listComponent,
419
- hero,
420
- ...layoutProps
421
- }) {
422
- const categoryHero = hero || {
423
- title: categoryName || category,
424
- subtitle: `Browse all posts in ${categoryName || category}`,
425
- backgroundColor: "var(--sk-primary)"
426
- };
427
- return /* @__PURE__ */ jsxRuntime.jsx(BlogLayout, { ...layoutProps, hero: categoryHero, currentCategory: category, children: listComponent });
34
+ formSlug,
35
+ title,
36
+ description,
37
+ buttonText,
38
+ successMessage
39
+ },
40
+ formSlug
41
+ ) });
42
+ }
43
+ if (!onSubmit) {
44
+ console.warn(
45
+ "[Blog] NewsletterWidget needs an onSubmit callback or a formSlug \u2014 rendering nothing rather than a form that discards emails."
46
+ );
47
+ return null;
48
+ }
49
+ return /* @__PURE__ */ jsxRuntime.jsx(
50
+ chunkDO6ATNLN_js.NewsletterShell,
51
+ {
52
+ title,
53
+ description,
54
+ buttonText,
55
+ email,
56
+ onEmailChange: setEmail,
57
+ onFormSubmit: (e) => {
58
+ e.preventDefault();
59
+ setStatus("submitting");
60
+ setErrorMessage(null);
61
+ onSubmit(email).then(() => setStatus("success")).catch((err) => {
62
+ setStatus("error");
63
+ setErrorMessage(err instanceof Error ? err.message : null);
64
+ });
65
+ },
66
+ status,
67
+ successMessage,
68
+ errorMessage
69
+ }
70
+ );
428
71
  }
429
72
  function TrustBlock({ author }) {
430
73
  const hasYears = typeof author.years_experience === "number" && author.years_experience > 0;
@@ -563,11 +206,7 @@ function AuthorCard({ author, showBio = true, showSocial = true, showTrustBlock
563
206
  author.company ? ` at ${author.company}` : ""
564
207
  ] }),
565
208
  showBio && author.bio && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: "4px 0", color: "var(--sk-text-secondary)", fontSize: 14 }, children: author.bio }),
566
- showSocial && author.social_links && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 12, marginTop: 8 }, children: [
567
- author.social_links.twitter && /* @__PURE__ */ jsxRuntime.jsx("a", { href: `https://twitter.com/${author.social_links.twitter}`, target: "_blank", rel: "noopener noreferrer", children: "Twitter" }),
568
- author.social_links.linkedin && /* @__PURE__ */ jsxRuntime.jsx("a", { href: author.social_links.linkedin, target: "_blank", rel: "noopener noreferrer", children: "LinkedIn" }),
569
- author.social_links.github && /* @__PURE__ */ jsxRuntime.jsx("a", { href: `https://github.com/${author.social_links.github}`, target: "_blank", rel: "noopener noreferrer", children: "GitHub" })
570
- ] })
209
+ showSocial && chunkGCZMDY2T_js.getAuthorSocialLinks(author).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 12, marginTop: 8 }, children: chunkGCZMDY2T_js.getAuthorSocialLinks(author).map((link) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: link.href, target: "_blank", rel: "noopener noreferrer", children: link.label }, link.label)) })
571
210
  ] })
572
211
  ] }),
573
212
  showTrustBlock && /* @__PURE__ */ jsxRuntime.jsx(TrustBlock, { author })
@@ -628,13 +267,7 @@ function AuthorHero({ author }) {
628
267
  );
629
268
  }
630
269
  function SocialLinks({ author }) {
631
- const links = [];
632
- if (author.linkedin_url) links.push({ label: "LinkedIn", href: author.linkedin_url });
633
- else if (author.social_links?.linkedin) links.push({ label: "LinkedIn", href: author.social_links.linkedin });
634
- if (author.twitter_url) links.push({ label: "Twitter", href: author.twitter_url });
635
- else if (author.social_links?.twitter) links.push({ label: "Twitter", href: `https://twitter.com/${author.social_links.twitter}` });
636
- if (author.website_url) links.push({ label: "Website", href: author.website_url });
637
- else if (author.website) links.push({ label: "Website", href: author.website });
270
+ const links = chunkGCZMDY2T_js.getAuthorSocialLinks(author);
638
271
  if (links.length === 0) return null;
639
272
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 16, marginTop: 16 }, children: links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
640
273
  "a",
@@ -689,8 +322,8 @@ function PostCard({ post, basePath }) {
689
322
  date && /* @__PURE__ */ jsxRuntime.jsx("time", { style: { fontSize: 12, color: "var(--sk-text-tertiary, #6b7280)", marginBottom: 6 }, children: date }),
690
323
  /* @__PURE__ */ jsxRuntime.jsx("a", { href, style: { textDecoration: "none", color: "inherit" }, children: /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { margin: "0 0 8px", fontSize: 18, fontWeight: 600, lineHeight: 1.3, color: "var(--sk-text-primary, #111827)" }, children: post.title }) }),
691
324
  post.excerpt && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0, fontSize: 14, lineHeight: 1.6, color: "var(--sk-text-secondary, #4b5563)", flex: 1 }, children: post.excerpt }),
692
- post.reading_time_minutes && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 12, color: "var(--sk-text-tertiary, #6b7280)", marginTop: 12 }, children: [
693
- post.reading_time_minutes,
325
+ chunkGCZMDY2T_js.readingTimeMinutes(post) && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 12, color: "var(--sk-text-tertiary, #6b7280)", marginTop: 12 }, children: [
326
+ chunkGCZMDY2T_js.readingTimeMinutes(post),
694
327
  " min read"
695
328
  ] })
696
329
  ] })
@@ -735,68 +368,6 @@ function AuthorPage({ author, posts, basePath = "/blog" }) {
735
368
  ] })
736
369
  ] });
737
370
  }
738
- async function fetchRelatedPosts(apiUrl, apiKey, currentPostId, limit) {
739
- try {
740
- const response = await fetch(`${apiUrl}/api/public/blog/related`, {
741
- method: "POST",
742
- headers: {
743
- "Content-Type": "application/json",
744
- "x-api-key": apiKey
745
- },
746
- body: JSON.stringify({
747
- currentPostId,
748
- limit
749
- })
750
- });
751
- if (!response.ok) {
752
- console.error("Failed to fetch related posts:", response.statusText);
753
- return [];
754
- }
755
- const data = await response.json();
756
- return data.posts || [];
757
- } catch (error) {
758
- console.error("Failed to fetch related posts:", error);
759
- return [];
760
- }
761
- }
762
- async function RelatedPosts({
763
- apiUrl = process.env.SONOR_API_URL || "https://api.sonor.io",
764
- apiKey = process.env.SONOR_API_KEY || "",
765
- currentPostId,
766
- limit = 3,
767
- className,
768
- renderItem
769
- }) {
770
- if (!apiKey) {
771
- console.warn("[Blog] No API key configured for RelatedPosts");
772
- return null;
773
- }
774
- const posts = await fetchRelatedPosts(apiUrl, apiKey, currentPostId, limit);
775
- if (posts.length === 0) return null;
776
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className, children: [
777
- /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { marginBottom: 16 }, children: "Related Posts" }),
778
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gap: 16 }, children: posts.map(
779
- (post) => renderItem ? renderItem(post) : /* @__PURE__ */ jsxRuntime.jsxs("article", { style: { borderBottom: "1px solid var(--sk-border)", paddingBottom: 16 }, children: [
780
- post.featured_image && /* @__PURE__ */ jsxRuntime.jsx(
781
- "img",
782
- {
783
- src: post.featured_image,
784
- alt: post.title,
785
- style: {
786
- width: "100%",
787
- height: 120,
788
- objectFit: "cover",
789
- borderRadius: 8,
790
- marginBottom: 8
791
- }
792
- }
793
- ),
794
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: `/blog/${post.slug}`, style: { textDecoration: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx("h4", { style: { margin: 0, color: "inherit" }, children: post.title }) }),
795
- post.excerpt && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: "4px 0 0", fontSize: 14, color: "var(--sk-text-secondary)" }, children: post.excerpt })
796
- ] }, post.id)
797
- ) })
798
- ] });
799
- }
800
371
  function parseHeadings(content) {
801
372
  const headingRegex = /<h([2-4])[^>]*id="([^"]*)"[^>]*>(.*?)<\/h[2-4]>/gi;
802
373
  const items = [];
@@ -816,9 +387,9 @@ function TableOfContents({
816
387
  className,
817
388
  maxDepth = 3
818
389
  }) {
819
- const [activeId, setActiveId] = react.useState("");
390
+ const [activeId, setActiveId] = React.useState("");
820
391
  const items = parseHeadings(content).filter((item) => item.level <= maxDepth);
821
- react.useEffect(() => {
392
+ React.useEffect(() => {
822
393
  if (typeof window === "undefined") return;
823
394
  const observer = new IntersectionObserver(
824
395
  (entries) => {
@@ -882,47 +453,65 @@ Object.defineProperty(exports, "BlogFAQ", {
882
453
  enumerable: true,
883
454
  get: function () { return chunkGQF6QAQS_js.BlogFAQ; }
884
455
  });
456
+ Object.defineProperty(exports, "BlogLayout", {
457
+ enumerable: true,
458
+ get: function () { return chunkGCZMDY2T_js.BlogLayout; }
459
+ });
885
460
  Object.defineProperty(exports, "BlogList", {
886
461
  enumerable: true,
887
- get: function () { return chunk5EFSD7VM_js.BlogList; }
462
+ get: function () { return chunkGCZMDY2T_js.BlogList; }
463
+ });
464
+ Object.defineProperty(exports, "BlogPage", {
465
+ enumerable: true,
466
+ get: function () { return chunkGCZMDY2T_js.BlogPage; }
888
467
  });
889
468
  Object.defineProperty(exports, "BlogPost", {
890
469
  enumerable: true,
891
- get: function () { return chunk5EFSD7VM_js.BlogPost; }
470
+ get: function () { return chunkGCZMDY2T_js.BlogPost; }
471
+ });
472
+ Object.defineProperty(exports, "BlogPostPage", {
473
+ enumerable: true,
474
+ get: function () { return chunkGCZMDY2T_js.BlogPostPage; }
475
+ });
476
+ Object.defineProperty(exports, "BlogSidebar", {
477
+ enumerable: true,
478
+ get: function () { return chunkGCZMDY2T_js.BlogSidebar; }
479
+ });
480
+ Object.defineProperty(exports, "CategoryPage", {
481
+ enumerable: true,
482
+ get: function () { return chunkGCZMDY2T_js.CategoryPage; }
892
483
  });
893
484
  Object.defineProperty(exports, "ClusterNavigation", {
894
485
  enumerable: true,
895
- get: function () { return chunk5EFSD7VM_js.ClusterNavigation; }
486
+ get: function () { return chunkGCZMDY2T_js.ClusterNavigation; }
487
+ });
488
+ Object.defineProperty(exports, "RelatedPosts", {
489
+ enumerable: true,
490
+ get: function () { return chunkGCZMDY2T_js.RelatedPosts; }
896
491
  });
897
492
  Object.defineProperty(exports, "ServiceCallout", {
898
493
  enumerable: true,
899
- get: function () { return chunk5EFSD7VM_js.ServiceCallout; }
494
+ get: function () { return chunkGCZMDY2T_js.ServiceCallout; }
900
495
  });
901
496
  Object.defineProperty(exports, "ServiceCallouts", {
902
497
  enumerable: true,
903
- get: function () { return chunk5EFSD7VM_js.ServiceCallouts; }
498
+ get: function () { return chunkGCZMDY2T_js.ServiceCallouts; }
904
499
  });
905
500
  Object.defineProperty(exports, "addExternalLinkTargets", {
906
501
  enumerable: true,
907
- get: function () { return chunk5EFSD7VM_js.addExternalLinkTargets; }
502
+ get: function () { return chunkGCZMDY2T_js.addExternalLinkTargets; }
908
503
  });
909
504
  Object.defineProperty(exports, "normalizeSiteHost", {
910
505
  enumerable: true,
911
- get: function () { return chunk5EFSD7VM_js.normalizeSiteHost; }
506
+ get: function () { return chunkGCZMDY2T_js.normalizeSiteHost; }
912
507
  });
913
508
  Object.defineProperty(exports, "resolveBlogSiteUrl", {
914
509
  enumerable: true,
915
- get: function () { return chunk5EFSD7VM_js.resolveBlogSiteUrl; }
510
+ get: function () { return chunkGCZMDY2T_js.resolveBlogSiteUrl; }
916
511
  });
917
512
  exports.AuthorCard = AuthorCard;
918
513
  exports.AuthorPage = AuthorPage;
919
- exports.BlogLayout = BlogLayout;
920
- exports.BlogPage = BlogPage;
921
- exports.BlogPostPage = BlogPostPage;
922
- exports.BlogSidebar = BlogSidebar;
923
- exports.CategoryPage = CategoryPage;
924
514
  exports.NewsletterWidget = NewsletterWidget;
925
- exports.RelatedPosts = RelatedPosts;
926
515
  exports.TableOfContents = TableOfContents;
927
516
  //# sourceMappingURL=index.js.map
928
517
  //# sourceMappingURL=index.js.map