@sonordev/site-kit 4.3.2 → 5.1.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.
- package/agent-manifest.json +8 -5
- package/dist/AnalyticsProvider-2LCSA6G3.mjs +10 -0
- package/dist/{AnalyticsProvider-TWRQHKPZ.mjs.map → AnalyticsProvider-2LCSA6G3.mjs.map} +1 -1
- package/dist/AnalyticsProvider-V2U3TQMH.js +31 -0
- package/dist/{AnalyticsProvider-DNMYYBKX.js.map → AnalyticsProvider-V2U3TQMH.js.map} +1 -1
- package/dist/BlogViewTracker-COTPD7WL.js +51 -0
- package/dist/BlogViewTracker-COTPD7WL.js.map +1 -0
- package/dist/BlogViewTracker-HG25ONRP.mjs +48 -0
- package/dist/BlogViewTracker-HG25ONRP.mjs.map +1 -0
- package/dist/ChatWidget-4QUJYFXU.js +20 -0
- package/dist/{ChatWidget-MDWEXISQ.js.map → ChatWidget-4QUJYFXU.js.map} +1 -1
- package/dist/ChatWidget-RWO7R7EJ.mjs +11 -0
- package/dist/{ChatWidget-UQMEJAHY.mjs.map → ChatWidget-RWO7R7EJ.mjs.map} +1 -1
- package/dist/EngageWidget-LF4AC4QN.mjs +9 -0
- package/dist/{EngageWidget-UIIN43ZU.mjs.map → EngageWidget-LF4AC4QN.mjs.map} +1 -1
- package/dist/EngageWidget-RSOXB3YM.js +18 -0
- package/dist/{EngageWidget-VRC7NUG6.js.map → EngageWidget-RSOXB3YM.js.map} +1 -1
- package/dist/{FileField-W4VXQ3CM.js → FileField-S2GUM3QB.js} +6 -6
- package/dist/{FileField-W4VXQ3CM.js.map → FileField-S2GUM3QB.js.map} +1 -1
- package/dist/{FileField-LVF3SCDC.mjs → FileField-YJ7DZXC3.mjs} +5 -5
- package/dist/{FileField-LVF3SCDC.mjs.map → FileField-YJ7DZXC3.mjs.map} +1 -1
- package/dist/{FormSpotlight-CRLFAPNI.js → FormSpotlight-7WAXLXZA.js} +15 -15
- package/dist/{FormSpotlight-CRLFAPNI.js.map → FormSpotlight-7WAXLXZA.js.map} +1 -1
- package/dist/{FormSpotlight-ZPISKGIX.mjs → FormSpotlight-HLH5LQKI.mjs} +3 -3
- package/dist/{FormSpotlight-ZPISKGIX.mjs.map → FormSpotlight-HLH5LQKI.mjs.map} +1 -1
- package/dist/{FormStage-QMRPAROJ.js → FormStage-LEZYERJB.js} +13 -13
- package/dist/{FormStage-QMRPAROJ.js.map → FormStage-LEZYERJB.js.map} +1 -1
- package/dist/{FormStage-WQOAP7CR.mjs → FormStage-Q5JW75AF.mjs} +3 -3
- package/dist/{FormStage-WQOAP7CR.mjs.map → FormStage-Q5JW75AF.mjs.map} +1 -1
- package/dist/ManagedForm-H4SEFSAF.js +23 -0
- package/dist/{ManagedForm-7L2W5BBZ.js.map → ManagedForm-H4SEFSAF.js.map} +1 -1
- package/dist/ManagedForm-U3NFIVEC.mjs +14 -0
- package/dist/{ManagedForm-D7CFOIXH.mjs.map → ManagedForm-U3NFIVEC.mjs.map} +1 -1
- package/dist/ManagedNewsletterForm-KT2NGUNW.js +64 -0
- package/dist/ManagedNewsletterForm-KT2NGUNW.js.map +1 -0
- package/dist/ManagedNewsletterForm-YKYW7B6P.mjs +62 -0
- package/dist/ManagedNewsletterForm-YKYW7B6P.mjs.map +1 -0
- package/dist/{SignalCore-JQLRWMPJ.mjs → SignalCore-2BH5PUGS.mjs} +5 -5
- package/dist/{SignalCore-JQLRWMPJ.mjs.map → SignalCore-2BH5PUGS.mjs.map} +1 -1
- package/dist/{SignalCore-DNXKQKRO.js → SignalCore-JM4ODFL2.js} +11 -11
- package/dist/{SignalCore-DNXKQKRO.js.map → SignalCore-JM4ODFL2.js.map} +1 -1
- package/dist/SitemapSync-5CXS2JGB.mjs +8 -0
- package/dist/{SitemapSync-RFY6PUG7.mjs.map → SitemapSync-5CXS2JGB.mjs.map} +1 -1
- package/dist/SitemapSync-J4UMJRTO.js +17 -0
- package/dist/{SitemapSync-SR6OJRIA.js.map → SitemapSync-J4UMJRTO.js.map} +1 -1
- package/dist/analytics/index.js +9 -9
- package/dist/analytics/index.mjs +4 -4
- package/dist/blog/AuthorCard.d.ts.map +1 -1
- package/dist/blog/AuthorPage.d.ts.map +1 -1
- package/dist/blog/BlogList.d.ts +7 -1
- package/dist/blog/BlogList.d.ts.map +1 -1
- package/dist/blog/BlogPost.d.ts +1 -1
- package/dist/blog/BlogPost.d.ts.map +1 -1
- package/dist/blog/BlogSidebar.d.ts +0 -7
- package/dist/blog/BlogSidebar.d.ts.map +1 -1
- package/dist/blog/BlogViewTracker.d.ts +10 -0
- package/dist/blog/BlogViewTracker.d.ts.map +1 -0
- package/dist/blog/ClusterLandingPage.d.ts.map +1 -1
- package/dist/blog/ManagedNewsletterForm.d.ts +13 -0
- package/dist/blog/ManagedNewsletterForm.d.ts.map +1 -0
- package/dist/blog/NewsletterShell.d.ts +18 -0
- package/dist/blog/NewsletterShell.d.ts.map +1 -0
- package/dist/blog/NewsletterWidget.d.ts +31 -0
- package/dist/blog/NewsletterWidget.d.ts.map +1 -0
- package/dist/blog/RelatedPosts.d.ts.map +1 -1
- package/dist/blog/author-social.d.ts +15 -0
- package/dist/blog/author-social.d.ts.map +1 -0
- package/dist/blog/author-social.test.d.ts +2 -0
- package/dist/blog/author-social.test.d.ts.map +1 -0
- package/dist/blog/blog-view-tracker.test.d.ts +2 -0
- package/dist/blog/blog-view-tracker.test.d.ts.map +1 -0
- package/dist/blog/category-metadata.test.d.ts +2 -0
- package/dist/blog/category-metadata.test.d.ts.map +1 -0
- package/dist/blog/index.d.ts +13 -7
- package/dist/blog/index.d.ts.map +1 -1
- package/dist/blog/index.js +94 -505
- package/dist/blog/index.js.map +1 -1
- package/dist/blog/index.mjs +59 -491
- package/dist/blog/index.mjs.map +1 -1
- package/dist/blog/newsletter-widget.test.d.ts +2 -0
- package/dist/blog/newsletter-widget.test.d.ts.map +1 -0
- package/dist/blog/reading-time.d.ts +10 -0
- package/dist/blog/reading-time.d.ts.map +1 -0
- package/dist/blog/reading-time.test.d.ts +2 -0
- package/dist/blog/reading-time.test.d.ts.map +1 -0
- package/dist/blog/server-core-contract.test.d.ts +2 -0
- package/dist/blog/server-core-contract.test.d.ts.map +1 -0
- package/dist/blog/server-core.d.ts +16 -4
- package/dist/blog/server-core.d.ts.map +1 -1
- package/dist/blog/server-ui.d.ts +5 -0
- package/dist/blog/server-ui.d.ts.map +1 -1
- package/dist/blog/server-ui.js +35 -10
- package/dist/blog/server-ui.js.map +1 -1
- package/dist/blog/server-ui.mjs +8 -6
- package/dist/blog/server-ui.mjs.map +1 -1
- package/dist/blog/server.d.ts +16 -4
- package/dist/blog/server.d.ts.map +1 -1
- package/dist/blog/server.js +40 -40
- package/dist/blog/server.mjs +1 -1
- package/dist/blog/tag-links.test.d.ts +2 -0
- package/dist/blog/tag-links.test.d.ts.map +1 -0
- package/dist/blog/types-wire-shape.test.d.ts +2 -0
- package/dist/blog/types-wire-shape.test.d.ts.map +1 -0
- package/dist/blog/types.d.ts +25 -19
- package/dist/blog/types.d.ts.map +1 -1
- package/dist/blog/widget-styles.d.ts +9 -0
- package/dist/blog/widget-styles.d.ts.map +1 -0
- package/dist/{chunk-I2IA3JXD.js → chunk-2EJX56YJ.js} +8 -8
- package/dist/{chunk-I2IA3JXD.js.map → chunk-2EJX56YJ.js.map} +1 -1
- package/dist/{chunk-NJ4YX3CI.mjs → chunk-2XHEUWHV.mjs} +4 -4
- package/dist/{chunk-NJ4YX3CI.mjs.map → chunk-2XHEUWHV.mjs.map} +1 -1
- package/dist/{chunk-RUOEUMAW.js → chunk-44ZTBQH4.js} +3 -3
- package/dist/{chunk-RUOEUMAW.js.map → chunk-44ZTBQH4.js.map} +1 -1
- package/dist/chunk-4SQ6PROR.mjs +6 -0
- package/dist/{chunk-NQNSATTA.mjs.map → chunk-4SQ6PROR.mjs.map} +1 -1
- package/dist/{chunk-D4KHH44S.mjs → chunk-4TU246Q4.mjs} +10 -3
- package/dist/chunk-4TU246Q4.mjs.map +1 -0
- package/dist/{chunk-BUF6IZUE.mjs → chunk-5G2ZRQMO.mjs} +3 -3
- package/dist/{chunk-BUF6IZUE.mjs.map → chunk-5G2ZRQMO.mjs.map} +1 -1
- package/dist/{chunk-A7OO6OPW.mjs → chunk-5W56B52Z.mjs} +3 -3
- package/dist/{chunk-A7OO6OPW.mjs.map → chunk-5W56B52Z.mjs.map} +1 -1
- package/dist/{chunk-LVM63JSA.mjs → chunk-6YKNDQYJ.mjs} +3 -3
- package/dist/{chunk-LVM63JSA.mjs.map → chunk-6YKNDQYJ.mjs.map} +1 -1
- package/dist/{chunk-JJS63TDR.mjs → chunk-A3VGZAZQ.mjs} +483 -21
- package/dist/chunk-A3VGZAZQ.mjs.map +1 -0
- package/dist/{chunk-YWBXKEAF.js → chunk-ACLBRIYD.js} +3 -3
- package/dist/{chunk-YWBXKEAF.js.map → chunk-ACLBRIYD.js.map} +1 -1
- package/dist/{chunk-OQTP5M5Y.js → chunk-ACWGG4VW.js} +9 -9
- package/dist/{chunk-OQTP5M5Y.js.map → chunk-ACWGG4VW.js.map} +1 -1
- package/dist/{chunk-NQEUFRMX.mjs → chunk-ADBLBGCQ.mjs} +3 -3
- package/dist/{chunk-NQEUFRMX.mjs.map → chunk-ADBLBGCQ.mjs.map} +1 -1
- package/dist/{chunk-45VPULF2.mjs → chunk-ADOGOLYO.mjs} +4 -4
- package/dist/{chunk-45VPULF2.mjs.map → chunk-ADOGOLYO.mjs.map} +1 -1
- package/dist/chunk-AK6JZ3OE.mjs +65 -0
- package/dist/chunk-AK6JZ3OE.mjs.map +1 -0
- package/dist/{chunk-UR4HKLHW.js → chunk-BGBJSMXT.js} +6 -6
- package/dist/{chunk-UR4HKLHW.js.map → chunk-BGBJSMXT.js.map} +1 -1
- package/dist/{chunk-INR6AQ54.mjs → chunk-BUDV7QHH.mjs} +4 -4
- package/dist/{chunk-INR6AQ54.mjs.map → chunk-BUDV7QHH.mjs.map} +1 -1
- package/dist/{chunk-C22WW7G2.mjs → chunk-BVLGJ2CZ.mjs} +3 -3
- package/dist/{chunk-C22WW7G2.mjs.map → chunk-BVLGJ2CZ.mjs.map} +1 -1
- package/dist/{chunk-6WJDTGM6.js → chunk-CBMHJPR7.js} +5 -5
- package/dist/{chunk-6WJDTGM6.js.map → chunk-CBMHJPR7.js.map} +1 -1
- package/dist/{chunk-H3F4GV2S.js → chunk-CGQO7MFO.js} +14 -14
- package/dist/{chunk-H3F4GV2S.js.map → chunk-CGQO7MFO.js.map} +1 -1
- package/dist/{chunk-ZXRORNAW.js → chunk-CKPFETIO.js} +4 -4
- package/dist/{chunk-ZXRORNAW.js.map → chunk-CKPFETIO.js.map} +1 -1
- package/dist/{chunk-EQZ42LAK.mjs → chunk-CYQB5GLU.mjs} +4 -4
- package/dist/{chunk-EQZ42LAK.mjs.map → chunk-CYQB5GLU.mjs.map} +1 -1
- package/dist/{chunk-6VHVIBLQ.mjs → chunk-DHXQBTXE.mjs} +62 -41
- package/dist/chunk-DHXQBTXE.mjs.map +1 -0
- package/dist/{chunk-5EFSD7VM.js → chunk-DKRXPXOR.js} +490 -20
- package/dist/chunk-DKRXPXOR.js.map +1 -0
- package/dist/chunk-DO6ATNLN.js +67 -0
- package/dist/chunk-DO6ATNLN.js.map +1 -0
- package/dist/{chunk-R6XBPA6C.mjs → chunk-DTNNZJYM.mjs} +4 -4
- package/dist/{chunk-R6XBPA6C.mjs.map → chunk-DTNNZJYM.mjs.map} +1 -1
- package/dist/{chunk-4OSZ2JD3.js → chunk-E3GHVAMK.js} +18 -18
- package/dist/{chunk-4OSZ2JD3.js.map → chunk-E3GHVAMK.js.map} +1 -1
- package/dist/{chunk-I6XKZNFT.mjs → chunk-EKTMXHBI.mjs} +3 -3
- package/dist/{chunk-I6XKZNFT.mjs.map → chunk-EKTMXHBI.mjs.map} +1 -1
- package/dist/{chunk-M52FYLV4.js → chunk-EZLK2OQL.js} +7 -7
- package/dist/{chunk-M52FYLV4.js.map → chunk-EZLK2OQL.js.map} +1 -1
- package/dist/{chunk-VLHHBJSV.js → chunk-FMOOQKZU.js} +8 -8
- package/dist/{chunk-VLHHBJSV.js.map → chunk-FMOOQKZU.js.map} +1 -1
- package/dist/{chunk-LQENHKD3.mjs → chunk-FZISCIJV.mjs} +4 -4
- package/dist/{chunk-LQENHKD3.mjs.map → chunk-FZISCIJV.mjs.map} +1 -1
- package/dist/{chunk-CQWG5ICB.js → chunk-GYAH4KFC.js} +4 -4
- package/dist/{chunk-CQWG5ICB.js.map → chunk-GYAH4KFC.js.map} +1 -1
- package/dist/{chunk-FIA3WNEM.js → chunk-GZVSGQKT.js} +3 -3
- package/dist/{chunk-FIA3WNEM.js.map → chunk-GZVSGQKT.js.map} +1 -1
- package/dist/{chunk-EUAOOOIE.js → chunk-HPIY7AR3.js} +14 -14
- package/dist/{chunk-EUAOOOIE.js.map → chunk-HPIY7AR3.js.map} +1 -1
- package/dist/chunk-HX6ZG3PP.js +19 -0
- package/dist/chunk-HX6ZG3PP.js.map +1 -0
- package/dist/{chunk-H27UCW6K.js → chunk-IQLYFQKZ.js} +15 -15
- package/dist/{chunk-H27UCW6K.js.map → chunk-IQLYFQKZ.js.map} +1 -1
- package/dist/{chunk-FBI6LYTM.js → chunk-JBGRXICL.js} +62 -41
- package/dist/chunk-JBGRXICL.js.map +1 -0
- package/dist/{chunk-E242GZNE.js → chunk-JEI3CSY4.js} +4 -4
- package/dist/{chunk-E242GZNE.js.map → chunk-JEI3CSY4.js.map} +1 -1
- package/dist/{chunk-6ABCPVJL.js → chunk-MCXHQHIX.js} +4 -4
- package/dist/{chunk-6ABCPVJL.js.map → chunk-MCXHQHIX.js.map} +1 -1
- package/dist/{chunk-JNKQKGYH.mjs → chunk-NIJVVW4G.mjs} +3 -3
- package/dist/{chunk-JNKQKGYH.mjs.map → chunk-NIJVVW4G.mjs.map} +1 -1
- package/dist/{chunk-TY3BPHTE.mjs → chunk-NSTY7ZZA.mjs} +7 -7
- package/dist/{chunk-TY3BPHTE.mjs.map → chunk-NSTY7ZZA.mjs.map} +1 -1
- package/dist/{chunk-3BXYZC3V.mjs → chunk-OAJVITNO.mjs} +3 -3
- package/dist/{chunk-3BXYZC3V.mjs.map → chunk-OAJVITNO.mjs.map} +1 -1
- package/dist/{chunk-36E6QKGL.mjs → chunk-OTHKWMDB.mjs} +3 -3
- package/dist/{chunk-36E6QKGL.mjs.map → chunk-OTHKWMDB.mjs.map} +1 -1
- package/dist/{chunk-ZWMAQ52D.mjs → chunk-ROJ25QM3.mjs} +3 -3
- package/dist/{chunk-ZWMAQ52D.mjs.map → chunk-ROJ25QM3.mjs.map} +1 -1
- package/dist/{chunk-NDS6MXIP.mjs → chunk-SXNKLHOX.mjs} +3 -3
- package/dist/{chunk-NDS6MXIP.mjs.map → chunk-SXNKLHOX.mjs.map} +1 -1
- package/dist/{chunk-VYNOQCEK.js → chunk-TAM2D54C.js} +14 -14
- package/dist/{chunk-VYNOQCEK.js.map → chunk-TAM2D54C.js.map} +1 -1
- package/dist/{chunk-VU45CH5R.mjs → chunk-TECD4AP7.mjs} +3 -3
- package/dist/{chunk-VU45CH5R.mjs.map → chunk-TECD4AP7.mjs.map} +1 -1
- package/dist/{chunk-MWKYLWCH.mjs → chunk-UMWVTIIZ.mjs} +8 -8
- package/dist/{chunk-MWKYLWCH.mjs.map → chunk-UMWVTIIZ.mjs.map} +1 -1
- package/dist/{chunk-ULP6BTN2.js → chunk-VCNPTLK2.js} +12 -12
- package/dist/{chunk-ULP6BTN2.js.map → chunk-VCNPTLK2.js.map} +1 -1
- package/dist/{chunk-FPWPRFTP.js → chunk-VIIGOCX4.js} +15 -15
- package/dist/{chunk-FPWPRFTP.js.map → chunk-VIIGOCX4.js.map} +1 -1
- package/dist/{chunk-PSBAUXUH.mjs → chunk-VWVUYL5J.mjs} +4 -4
- package/dist/{chunk-PSBAUXUH.mjs.map → chunk-VWVUYL5J.mjs.map} +1 -1
- package/dist/{chunk-67MTTPJV.js → chunk-WMNRTCYY.js} +11 -11
- package/dist/{chunk-67MTTPJV.js.map → chunk-WMNRTCYY.js.map} +1 -1
- package/dist/{chunk-C3M5E4YI.js → chunk-WZMM57R2.js} +5 -5
- package/dist/{chunk-C3M5E4YI.js.map → chunk-WZMM57R2.js.map} +1 -1
- package/dist/chunk-YFX3Q56O.mjs +16 -0
- package/dist/chunk-YFX3Q56O.mjs.map +1 -0
- package/dist/chunk-YPEX4RDE.js +8 -0
- package/dist/{chunk-UXIUJYFK.js.map → chunk-YPEX4RDE.js.map} +1 -1
- package/dist/{chunk-R7V7HNJJ.js → chunk-Z33JXJTJ.js} +10 -3
- package/dist/chunk-Z33JXJTJ.js.map +1 -0
- package/dist/{chunk-X2PAODFM.mjs → chunk-ZFZMN4LT.mjs} +3 -3
- package/dist/{chunk-X2PAODFM.mjs.map → chunk-ZFZMN4LT.mjs.map} +1 -1
- package/dist/cli/index.js +7 -27
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +5 -25
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/commerce/index.js +56 -56
- package/dist/commerce/index.mjs +5 -5
- package/dist/commerce/server-result.test.d.ts +2 -0
- package/dist/commerce/server-result.test.d.ts.map +1 -0
- package/dist/commerce/server.d.ts +51 -0
- package/dist/commerce/server.d.ts.map +1 -1
- package/dist/commerce/server.js +57 -24
- package/dist/commerce/server.js.map +1 -1
- package/dist/commerce/server.mjs +54 -25
- package/dist/commerce/server.mjs.map +1 -1
- package/dist/engage/index.js +10 -10
- package/dist/engage/index.mjs +7 -7
- package/dist/fleet/index.js +8 -8
- package/dist/fleet/index.mjs +4 -4
- package/dist/forms/index.js +16 -16
- package/dist/forms/index.mjs +9 -9
- package/dist/forms/server.js +10 -10
- package/dist/forms/server.mjs +8 -8
- package/dist/forms/static.js +7 -7
- package/dist/forms/static.mjs +6 -6
- package/dist/images/index.js +11 -11
- package/dist/images/index.mjs +4 -4
- package/dist/index.js +63 -63
- package/dist/index.mjs +9 -9
- package/dist/layout/client.js +8 -8
- package/dist/layout/client.mjs +7 -7
- package/dist/layout/index.js +10 -10
- package/dist/layout/index.mjs +8 -8
- package/dist/llms/generateLLMsTxt.d.ts.map +1 -1
- package/dist/llms/humanize-industry.d.ts +9 -0
- package/dist/llms/humanize-industry.d.ts.map +1 -0
- package/dist/llms/humanize-industry.test.d.ts +2 -0
- package/dist/llms/humanize-industry.test.d.ts.map +1 -0
- package/dist/llms/index.js +12 -12
- package/dist/llms/index.mjs +2 -2
- package/dist/maps/index.js +5 -5
- package/dist/maps/index.mjs +3 -3
- package/dist/search/index.js +4 -4
- package/dist/search/index.mjs +3 -3
- package/dist/seo/client.js +5 -5
- package/dist/seo/client.mjs +4 -4
- package/dist/seo/index.js +5 -5
- package/dist/seo/index.mjs +4 -4
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +11 -11
- package/dist/signal/index.mjs +2 -2
- package/dist/sitemap/index.js +2 -2
- package/dist/sitemap/index.mjs +1 -1
- package/dist/sync/index.js +16 -16
- package/dist/sync/index.mjs +4 -4
- package/package.json +1 -1
- package/dist/AnalyticsProvider-DNMYYBKX.js +0 -31
- package/dist/AnalyticsProvider-TWRQHKPZ.mjs +0 -10
- package/dist/ChatWidget-MDWEXISQ.js +0 -20
- package/dist/ChatWidget-UQMEJAHY.mjs +0 -11
- package/dist/EngageWidget-UIIN43ZU.mjs +0 -9
- package/dist/EngageWidget-VRC7NUG6.js +0 -18
- package/dist/ManagedForm-7L2W5BBZ.js +0 -23
- package/dist/ManagedForm-D7CFOIXH.mjs +0 -14
- package/dist/SitemapSync-RFY6PUG7.mjs +0 -8
- package/dist/SitemapSync-SR6OJRIA.js +0 -17
- package/dist/chunk-5EFSD7VM.js.map +0 -1
- package/dist/chunk-6VHVIBLQ.mjs.map +0 -1
- package/dist/chunk-D4KHH44S.mjs.map +0 -1
- package/dist/chunk-FBI6LYTM.js.map +0 -1
- package/dist/chunk-JJS63TDR.mjs.map +0 -1
- package/dist/chunk-NQNSATTA.mjs +0 -6
- package/dist/chunk-R7V7HNJJ.js.map +0 -1
- package/dist/chunk-UXIUJYFK.js +0 -8
package/dist/blog/index.mjs
CHANGED
|
@@ -1,428 +1,68 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
export { BlogFAQ } from '../chunk-O237KKCX.mjs';
|
|
3
|
-
|
|
3
|
+
import { NewsletterShell } from '../chunk-AK6JZ3OE.mjs';
|
|
4
|
+
import { getAuthorSocialLinks, readingTimeMinutes } from '../chunk-A3VGZAZQ.mjs';
|
|
5
|
+
export { BlogLayout, BlogList, BlogPage, BlogPost, BlogPostPage, BlogSidebar, CategoryPage, ClusterNavigation, RelatedPosts, ServiceCallout, ServiceCallouts, addExternalLinkTargets, normalizeSiteHost, resolveBlogSiteUrl } from '../chunk-A3VGZAZQ.mjs';
|
|
6
|
+
import '../chunk-YFX3Q56O.mjs';
|
|
4
7
|
import { generateAuthorSchema } from '../chunk-CGCYZJYX.mjs';
|
|
5
8
|
import { safeJsonLd } from '../chunk-662YHKWW.mjs';
|
|
6
9
|
import '../chunk-BEXTDHO4.mjs';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
10
|
+
import React, { useState, Suspense, useEffect } from 'react';
|
|
11
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
const response = await fetch(`${apiUrl}/public/blog/recent?limit=${limit}`, {
|
|
13
|
-
headers: { "x-api-key": apiKey },
|
|
14
|
-
next: { revalidate: 300 }
|
|
15
|
-
});
|
|
16
|
-
if (!response.ok) return [];
|
|
17
|
-
const data = await response.json();
|
|
18
|
-
return data.posts || [];
|
|
19
|
-
} catch (error) {
|
|
20
|
-
console.error("[Blog] Error fetching recent posts:", error);
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
async function fetchCategories(apiUrl, apiKey) {
|
|
25
|
-
try {
|
|
26
|
-
const response = await fetch(`${apiUrl}/public/blog/categories`, {
|
|
27
|
-
headers: { "x-api-key": apiKey },
|
|
28
|
-
next: { revalidate: 300 }
|
|
29
|
-
});
|
|
30
|
-
if (!response.ok) return [];
|
|
31
|
-
const data = await response.json();
|
|
32
|
-
return data.categories || [];
|
|
33
|
-
} catch (error) {
|
|
34
|
-
console.error("[Blog] Error fetching categories:", error);
|
|
35
|
-
return [];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
async function fetchTags(apiUrl, apiKey) {
|
|
39
|
-
try {
|
|
40
|
-
const response = await fetch(`${apiUrl}/public/blog/tags`, {
|
|
41
|
-
headers: { "x-api-key": apiKey },
|
|
42
|
-
next: { revalidate: 300 }
|
|
43
|
-
});
|
|
44
|
-
if (!response.ok) return [];
|
|
45
|
-
const data = await response.json();
|
|
46
|
-
return data.tags || [];
|
|
47
|
-
} catch (error) {
|
|
48
|
-
console.error("[Blog] Error fetching tags:", error);
|
|
49
|
-
return [];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
async function BlogSidebar({
|
|
53
|
-
apiUrl = process.env.SONOR_API_URL || "https://api.sonor.io",
|
|
54
|
-
apiKey = process.env.SONOR_API_KEY || "",
|
|
55
|
-
showCategories = true,
|
|
56
|
-
showRecentPosts = true,
|
|
57
|
-
recentPostsCount = 5,
|
|
58
|
-
showTags = true,
|
|
59
|
-
showSearch = true,
|
|
60
|
-
basePath = "/blog",
|
|
61
|
-
className,
|
|
62
|
-
currentCategory,
|
|
63
|
-
children
|
|
64
|
-
}) {
|
|
65
|
-
if (!apiKey) {
|
|
66
|
-
console.warn("[Blog] No API key configured for sidebar");
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
const [categories, recentPosts, tags] = await Promise.all([
|
|
70
|
-
showCategories ? fetchCategories(apiUrl, apiKey) : Promise.resolve([]),
|
|
71
|
-
showRecentPosts ? fetchRecentPosts(apiUrl, apiKey, recentPostsCount) : Promise.resolve([]),
|
|
72
|
-
showTags ? fetchTags(apiUrl, apiKey) : Promise.resolve([])
|
|
73
|
-
]);
|
|
74
|
-
return /* @__PURE__ */ jsxs("aside", { className, style: { display: "flex", flexDirection: "column", gap: 32 }, children: [
|
|
75
|
-
showSearch && /* @__PURE__ */ jsx(SearchWidget, { basePath }),
|
|
76
|
-
showCategories && categories.length > 0 && /* @__PURE__ */ jsx(
|
|
77
|
-
CategoriesWidget,
|
|
78
|
-
{
|
|
79
|
-
categories,
|
|
80
|
-
basePath,
|
|
81
|
-
currentCategory
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
showRecentPosts && recentPosts.length > 0 && /* @__PURE__ */ jsx(RecentPostsWidget, { posts: recentPosts, basePath }),
|
|
85
|
-
showTags && tags.length > 0 && /* @__PURE__ */ jsx(TagsWidget, { tags, basePath }),
|
|
86
|
-
children
|
|
87
|
-
] });
|
|
88
|
-
}
|
|
89
|
-
function SearchWidget({ basePath }) {
|
|
90
|
-
return /* @__PURE__ */ jsxs("div", { style: widgetStyle, children: [
|
|
91
|
-
/* @__PURE__ */ jsx("h4", { style: widgetTitleStyle, children: "Search" }),
|
|
92
|
-
/* @__PURE__ */ jsx("form", { action: basePath, method: "get", children: /* @__PURE__ */ jsx(
|
|
93
|
-
"input",
|
|
94
|
-
{
|
|
95
|
-
type: "search",
|
|
96
|
-
name: "search",
|
|
97
|
-
placeholder: "Search posts...",
|
|
98
|
-
style: {
|
|
99
|
-
width: "100%",
|
|
100
|
-
padding: "10px 12px",
|
|
101
|
-
border: "1px solid var(--sk-border)",
|
|
102
|
-
borderRadius: 8,
|
|
103
|
-
fontSize: 14
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
) })
|
|
107
|
-
] });
|
|
108
|
-
}
|
|
109
|
-
function CategoriesWidget({
|
|
110
|
-
categories,
|
|
111
|
-
basePath,
|
|
112
|
-
currentCategory
|
|
113
|
-
}) {
|
|
114
|
-
return /* @__PURE__ */ jsxs("div", { style: widgetStyle, children: [
|
|
115
|
-
/* @__PURE__ */ jsx("h4", { style: widgetTitleStyle, children: "Categories" }),
|
|
116
|
-
/* @__PURE__ */ jsxs("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: [
|
|
117
|
-
/* @__PURE__ */ jsx("li", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsx(
|
|
118
|
-
"a",
|
|
119
|
-
{
|
|
120
|
-
href: basePath,
|
|
121
|
-
style: {
|
|
122
|
-
...categoryLinkStyle,
|
|
123
|
-
fontWeight: !currentCategory ? 600 : 400,
|
|
124
|
-
color: !currentCategory ? "var(--sk-primary)" : "var(--sk-text-primary)"
|
|
125
|
-
},
|
|
126
|
-
children: "All Posts"
|
|
127
|
-
}
|
|
128
|
-
) }),
|
|
129
|
-
categories.map((cat) => /* @__PURE__ */ jsx("li", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsxs(
|
|
130
|
-
"a",
|
|
131
|
-
{
|
|
132
|
-
href: `${basePath}?category=${cat.slug}`,
|
|
133
|
-
style: {
|
|
134
|
-
...categoryLinkStyle,
|
|
135
|
-
fontWeight: currentCategory === cat.slug ? 600 : 400,
|
|
136
|
-
color: currentCategory === cat.slug ? "var(--sk-primary)" : "var(--sk-text-primary)"
|
|
137
|
-
},
|
|
138
|
-
children: [
|
|
139
|
-
cat.name,
|
|
140
|
-
/* @__PURE__ */ jsxs("span", { style: { color: "var(--sk-text-tertiary)", marginLeft: 8 }, children: [
|
|
141
|
-
"(",
|
|
142
|
-
cat.post_count,
|
|
143
|
-
")"
|
|
144
|
-
] })
|
|
145
|
-
]
|
|
146
|
-
}
|
|
147
|
-
) }, cat.slug))
|
|
148
|
-
] })
|
|
149
|
-
] });
|
|
150
|
-
}
|
|
151
|
-
function RecentPostsWidget({
|
|
152
|
-
posts,
|
|
153
|
-
basePath
|
|
154
|
-
}) {
|
|
155
|
-
return /* @__PURE__ */ jsxs("div", { style: widgetStyle, children: [
|
|
156
|
-
/* @__PURE__ */ jsx("h4", { style: widgetTitleStyle, children: "Recent Posts" }),
|
|
157
|
-
/* @__PURE__ */ jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: posts.map((post) => {
|
|
158
|
-
const date = post.published_at ? new Date(post.published_at).toLocaleDateString("en-US", {
|
|
159
|
-
month: "short",
|
|
160
|
-
day: "numeric"
|
|
161
|
-
}) : null;
|
|
162
|
-
return /* @__PURE__ */ jsx(
|
|
163
|
-
"li",
|
|
164
|
-
{
|
|
165
|
-
style: {
|
|
166
|
-
marginBottom: 16,
|
|
167
|
-
paddingBottom: 16,
|
|
168
|
-
borderBottom: "1px solid var(--sk-border)"
|
|
169
|
-
},
|
|
170
|
-
children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 12 }, children: [
|
|
171
|
-
post.featured_image && /* @__PURE__ */ jsx("a", { href: `${basePath}/${post.slug}`, children: /* @__PURE__ */ jsx(
|
|
172
|
-
"img",
|
|
173
|
-
{
|
|
174
|
-
src: post.featured_image,
|
|
175
|
-
alt: "",
|
|
176
|
-
style: {
|
|
177
|
-
width: 64,
|
|
178
|
-
height: 48,
|
|
179
|
-
objectFit: "cover",
|
|
180
|
-
borderRadius: 6,
|
|
181
|
-
flexShrink: 0
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
) }),
|
|
185
|
-
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
186
|
-
/* @__PURE__ */ jsx(
|
|
187
|
-
"a",
|
|
188
|
-
{
|
|
189
|
-
href: `${basePath}/${post.slug}`,
|
|
190
|
-
style: {
|
|
191
|
-
fontSize: 14,
|
|
192
|
-
fontWeight: 500,
|
|
193
|
-
color: "var(--sk-text-primary)",
|
|
194
|
-
textDecoration: "none",
|
|
195
|
-
display: "-webkit-box",
|
|
196
|
-
WebkitLineClamp: 2,
|
|
197
|
-
WebkitBoxOrient: "vertical",
|
|
198
|
-
overflow: "hidden"
|
|
199
|
-
},
|
|
200
|
-
children: post.title
|
|
201
|
-
}
|
|
202
|
-
),
|
|
203
|
-
date && /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: "var(--sk-text-tertiary)", display: "block", marginTop: 4 }, children: date })
|
|
204
|
-
] })
|
|
205
|
-
] })
|
|
206
|
-
},
|
|
207
|
-
post.id
|
|
208
|
-
);
|
|
209
|
-
}) })
|
|
210
|
-
] });
|
|
211
|
-
}
|
|
212
|
-
function TagsWidget({
|
|
213
|
-
tags,
|
|
214
|
-
basePath
|
|
215
|
-
}) {
|
|
216
|
-
return /* @__PURE__ */ jsxs("div", { style: widgetStyle, children: [
|
|
217
|
-
/* @__PURE__ */ jsx("h4", { style: widgetTitleStyle, children: "Popular Tags" }),
|
|
218
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: tags.slice(0, 15).map((tag) => /* @__PURE__ */ jsx(
|
|
219
|
-
"a",
|
|
220
|
-
{
|
|
221
|
-
href: `${basePath}?tag=${tag.slug}`,
|
|
222
|
-
style: {
|
|
223
|
-
padding: "4px 10px",
|
|
224
|
-
backgroundColor: "var(--sk-bg-elevated)",
|
|
225
|
-
borderRadius: 9999,
|
|
226
|
-
fontSize: 12,
|
|
227
|
-
color: "var(--sk-text-primary)",
|
|
228
|
-
textDecoration: "none",
|
|
229
|
-
transition: "background-color 0.2s"
|
|
230
|
-
},
|
|
231
|
-
children: tag.name
|
|
232
|
-
},
|
|
233
|
-
tag.slug
|
|
234
|
-
)) })
|
|
235
|
-
] });
|
|
236
|
-
}
|
|
13
|
+
var ManagedNewsletterForm = React.lazy(() => import('../ManagedNewsletterForm-YKYW7B6P.mjs'));
|
|
237
14
|
function NewsletterWidget({
|
|
238
15
|
title = "Subscribe to Our Newsletter",
|
|
239
16
|
description = "Get the latest posts delivered straight to your inbox.",
|
|
240
|
-
buttonText = "Subscribe"
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
/* @__PURE__ */ jsx("p", { style: { fontSize: 14, color: "var(--sk-text-secondary)", marginBottom: 16 }, children: description }),
|
|
245
|
-
/* @__PURE__ */ jsxs(
|
|
246
|
-
"form",
|
|
247
|
-
{
|
|
248
|
-
onSubmit: (e) => {
|
|
249
|
-
e.preventDefault();
|
|
250
|
-
},
|
|
251
|
-
style: { display: "flex", gap: 8 },
|
|
252
|
-
children: [
|
|
253
|
-
/* @__PURE__ */ jsx(
|
|
254
|
-
"input",
|
|
255
|
-
{
|
|
256
|
-
type: "email",
|
|
257
|
-
name: "email",
|
|
258
|
-
placeholder: "Enter your email",
|
|
259
|
-
required: true,
|
|
260
|
-
style: {
|
|
261
|
-
flex: 1,
|
|
262
|
-
padding: "10px 12px",
|
|
263
|
-
border: "1px solid var(--sk-border)",
|
|
264
|
-
borderRadius: 8,
|
|
265
|
-
fontSize: 14
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
),
|
|
269
|
-
/* @__PURE__ */ jsx(
|
|
270
|
-
"button",
|
|
271
|
-
{
|
|
272
|
-
type: "submit",
|
|
273
|
-
style: {
|
|
274
|
-
padding: "10px 16px",
|
|
275
|
-
backgroundColor: "var(--sk-primary)",
|
|
276
|
-
color: "var(--sk-bg)",
|
|
277
|
-
border: "none",
|
|
278
|
-
borderRadius: 8,
|
|
279
|
-
fontSize: 14,
|
|
280
|
-
fontWeight: 500,
|
|
281
|
-
cursor: "pointer"
|
|
282
|
-
},
|
|
283
|
-
children: buttonText
|
|
284
|
-
}
|
|
285
|
-
)
|
|
286
|
-
]
|
|
287
|
-
}
|
|
288
|
-
)
|
|
289
|
-
] });
|
|
290
|
-
}
|
|
291
|
-
var widgetStyle = {
|
|
292
|
-
padding: 20,
|
|
293
|
-
backgroundColor: "var(--sk-bg-elevated)",
|
|
294
|
-
borderRadius: 12
|
|
295
|
-
};
|
|
296
|
-
var widgetTitleStyle = {
|
|
297
|
-
margin: "0 0 16px",
|
|
298
|
-
fontSize: 16,
|
|
299
|
-
fontWeight: 600,
|
|
300
|
-
color: "var(--sk-text-primary)"
|
|
301
|
-
};
|
|
302
|
-
var categoryLinkStyle = {
|
|
303
|
-
display: "flex",
|
|
304
|
-
alignItems: "center",
|
|
305
|
-
fontSize: 14,
|
|
306
|
-
textDecoration: "none"
|
|
307
|
-
};
|
|
308
|
-
async function BlogLayout({
|
|
309
|
-
apiUrl = process.env.SONOR_API_URL || "https://api.sonor.io",
|
|
310
|
-
apiKey = process.env.SONOR_API_KEY || "",
|
|
311
|
-
layout = "sidebar-right",
|
|
312
|
-
showSidebar = true,
|
|
313
|
-
sidebarProps = {},
|
|
314
|
-
hero,
|
|
315
|
-
maxWidth = 1280,
|
|
316
|
-
basePath = "/blog",
|
|
317
|
-
className,
|
|
318
|
-
currentCategory,
|
|
319
|
-
children
|
|
17
|
+
buttonText = "Subscribe",
|
|
18
|
+
onSubmit,
|
|
19
|
+
formSlug,
|
|
20
|
+
successMessage = "You're subscribed \u2014 thanks!"
|
|
320
21
|
}) {
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
22
|
+
const [email, setEmail] = useState("");
|
|
23
|
+
const [status, setStatus] = useState("idle");
|
|
24
|
+
const [errorMessage, setErrorMessage] = useState(null);
|
|
25
|
+
if (!onSubmit && formSlug) {
|
|
26
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
27
|
+
ManagedNewsletterForm,
|
|
325
28
|
{
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
"div",
|
|
364
|
-
{
|
|
365
|
-
style: {
|
|
366
|
-
maxWidth,
|
|
367
|
-
margin: "0 auto",
|
|
368
|
-
padding: "40px 20px"
|
|
369
|
-
},
|
|
370
|
-
children: /* @__PURE__ */ jsxs(
|
|
371
|
-
"div",
|
|
372
|
-
{
|
|
373
|
-
style: {
|
|
374
|
-
display: hasSidebar ? "grid" : "block",
|
|
375
|
-
gridTemplateColumns: hasSidebar ? layout === "sidebar-left" ? "300px 1fr" : "1fr 300px" : void 0,
|
|
376
|
-
gap: 48
|
|
377
|
-
},
|
|
378
|
-
children: [
|
|
379
|
-
hasSidebar && layout === "sidebar-left" && /* @__PURE__ */ jsx(
|
|
380
|
-
BlogSidebar,
|
|
381
|
-
{
|
|
382
|
-
apiUrl,
|
|
383
|
-
apiKey,
|
|
384
|
-
basePath,
|
|
385
|
-
currentCategory,
|
|
386
|
-
...sidebarProps
|
|
387
|
-
}
|
|
388
|
-
),
|
|
389
|
-
/* @__PURE__ */ jsx("main", { style: { minWidth: 0 }, children }),
|
|
390
|
-
hasSidebar && layout === "sidebar-right" && /* @__PURE__ */ jsx(
|
|
391
|
-
BlogSidebar,
|
|
392
|
-
{
|
|
393
|
-
apiUrl,
|
|
394
|
-
apiKey,
|
|
395
|
-
basePath,
|
|
396
|
-
currentCategory,
|
|
397
|
-
...sidebarProps
|
|
398
|
-
}
|
|
399
|
-
)
|
|
400
|
-
]
|
|
401
|
-
}
|
|
402
|
-
)
|
|
403
|
-
}
|
|
404
|
-
)
|
|
405
|
-
] });
|
|
406
|
-
}
|
|
407
|
-
async function BlogPage({ listComponent, ...layoutProps }) {
|
|
408
|
-
return /* @__PURE__ */ jsx(BlogLayout, { ...layoutProps, children: listComponent });
|
|
409
|
-
}
|
|
410
|
-
async function BlogPostPage({ postComponent, ...layoutProps }) {
|
|
411
|
-
return /* @__PURE__ */ jsx(BlogLayout, { ...layoutProps, showSidebar: false, layout: "full-width", children: /* @__PURE__ */ jsx("div", { style: { maxWidth: 800, margin: "0 auto" }, children: postComponent }) });
|
|
412
|
-
}
|
|
413
|
-
async function CategoryPage({
|
|
414
|
-
category,
|
|
415
|
-
categoryName,
|
|
416
|
-
listComponent,
|
|
417
|
-
hero,
|
|
418
|
-
...layoutProps
|
|
419
|
-
}) {
|
|
420
|
-
const categoryHero = hero || {
|
|
421
|
-
title: categoryName || category,
|
|
422
|
-
subtitle: `Browse all posts in ${categoryName || category}`,
|
|
423
|
-
backgroundColor: "var(--sk-primary)"
|
|
424
|
-
};
|
|
425
|
-
return /* @__PURE__ */ jsx(BlogLayout, { ...layoutProps, hero: categoryHero, currentCategory: category, children: listComponent });
|
|
29
|
+
formSlug,
|
|
30
|
+
title,
|
|
31
|
+
description,
|
|
32
|
+
buttonText,
|
|
33
|
+
successMessage
|
|
34
|
+
},
|
|
35
|
+
formSlug
|
|
36
|
+
) });
|
|
37
|
+
}
|
|
38
|
+
if (!onSubmit) {
|
|
39
|
+
console.warn(
|
|
40
|
+
"[Blog] NewsletterWidget needs an onSubmit callback or a formSlug \u2014 rendering nothing rather than a form that discards emails."
|
|
41
|
+
);
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
NewsletterShell,
|
|
46
|
+
{
|
|
47
|
+
title,
|
|
48
|
+
description,
|
|
49
|
+
buttonText,
|
|
50
|
+
email,
|
|
51
|
+
onEmailChange: setEmail,
|
|
52
|
+
onFormSubmit: (e) => {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
setStatus("submitting");
|
|
55
|
+
setErrorMessage(null);
|
|
56
|
+
onSubmit(email).then(() => setStatus("success")).catch((err) => {
|
|
57
|
+
setStatus("error");
|
|
58
|
+
setErrorMessage(err instanceof Error ? err.message : null);
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
status,
|
|
62
|
+
successMessage,
|
|
63
|
+
errorMessage
|
|
64
|
+
}
|
|
65
|
+
);
|
|
426
66
|
}
|
|
427
67
|
function TrustBlock({ author }) {
|
|
428
68
|
const hasYears = typeof author.years_experience === "number" && author.years_experience > 0;
|
|
@@ -561,11 +201,7 @@ function AuthorCard({ author, showBio = true, showSocial = true, showTrustBlock
|
|
|
561
201
|
author.company ? ` at ${author.company}` : ""
|
|
562
202
|
] }),
|
|
563
203
|
showBio && author.bio && /* @__PURE__ */ jsx("p", { style: { margin: "4px 0", color: "var(--sk-text-secondary)", fontSize: 14 }, children: author.bio }),
|
|
564
|
-
showSocial && author.
|
|
565
|
-
author.social_links.twitter && /* @__PURE__ */ jsx("a", { href: `https://twitter.com/${author.social_links.twitter}`, target: "_blank", rel: "noopener noreferrer", children: "Twitter" }),
|
|
566
|
-
author.social_links.linkedin && /* @__PURE__ */ jsx("a", { href: author.social_links.linkedin, target: "_blank", rel: "noopener noreferrer", children: "LinkedIn" }),
|
|
567
|
-
author.social_links.github && /* @__PURE__ */ jsx("a", { href: `https://github.com/${author.social_links.github}`, target: "_blank", rel: "noopener noreferrer", children: "GitHub" })
|
|
568
|
-
] })
|
|
204
|
+
showSocial && getAuthorSocialLinks(author).length > 0 && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 12, marginTop: 8 }, children: getAuthorSocialLinks(author).map((link) => /* @__PURE__ */ jsx("a", { href: link.href, target: "_blank", rel: "noopener noreferrer", children: link.label }, link.label)) })
|
|
569
205
|
] })
|
|
570
206
|
] }),
|
|
571
207
|
showTrustBlock && /* @__PURE__ */ jsx(TrustBlock, { author })
|
|
@@ -626,13 +262,7 @@ function AuthorHero({ author }) {
|
|
|
626
262
|
);
|
|
627
263
|
}
|
|
628
264
|
function SocialLinks({ author }) {
|
|
629
|
-
const links =
|
|
630
|
-
if (author.linkedin_url) links.push({ label: "LinkedIn", href: author.linkedin_url });
|
|
631
|
-
else if (author.social_links?.linkedin) links.push({ label: "LinkedIn", href: author.social_links.linkedin });
|
|
632
|
-
if (author.twitter_url) links.push({ label: "Twitter", href: author.twitter_url });
|
|
633
|
-
else if (author.social_links?.twitter) links.push({ label: "Twitter", href: `https://twitter.com/${author.social_links.twitter}` });
|
|
634
|
-
if (author.website_url) links.push({ label: "Website", href: author.website_url });
|
|
635
|
-
else if (author.website) links.push({ label: "Website", href: author.website });
|
|
265
|
+
const links = getAuthorSocialLinks(author);
|
|
636
266
|
if (links.length === 0) return null;
|
|
637
267
|
return /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 16, marginTop: 16 }, children: links.map((link) => /* @__PURE__ */ jsx(
|
|
638
268
|
"a",
|
|
@@ -687,8 +317,8 @@ function PostCard({ post, basePath }) {
|
|
|
687
317
|
date && /* @__PURE__ */ jsx("time", { style: { fontSize: 12, color: "var(--sk-text-tertiary, #6b7280)", marginBottom: 6 }, children: date }),
|
|
688
318
|
/* @__PURE__ */ jsx("a", { href, style: { textDecoration: "none", color: "inherit" }, children: /* @__PURE__ */ jsx("h3", { style: { margin: "0 0 8px", fontSize: 18, fontWeight: 600, lineHeight: 1.3, color: "var(--sk-text-primary, #111827)" }, children: post.title }) }),
|
|
689
319
|
post.excerpt && /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: 14, lineHeight: 1.6, color: "var(--sk-text-secondary, #4b5563)", flex: 1 }, children: post.excerpt }),
|
|
690
|
-
post
|
|
691
|
-
post
|
|
320
|
+
readingTimeMinutes(post) && /* @__PURE__ */ jsxs("span", { style: { fontSize: 12, color: "var(--sk-text-tertiary, #6b7280)", marginTop: 12 }, children: [
|
|
321
|
+
readingTimeMinutes(post),
|
|
692
322
|
" min read"
|
|
693
323
|
] })
|
|
694
324
|
] })
|
|
@@ -733,68 +363,6 @@ function AuthorPage({ author, posts, basePath = "/blog" }) {
|
|
|
733
363
|
] })
|
|
734
364
|
] });
|
|
735
365
|
}
|
|
736
|
-
async function fetchRelatedPosts(apiUrl, apiKey, currentPostId, limit) {
|
|
737
|
-
try {
|
|
738
|
-
const response = await fetch(`${apiUrl}/api/public/blog/related`, {
|
|
739
|
-
method: "POST",
|
|
740
|
-
headers: {
|
|
741
|
-
"Content-Type": "application/json",
|
|
742
|
-
"x-api-key": apiKey
|
|
743
|
-
},
|
|
744
|
-
body: JSON.stringify({
|
|
745
|
-
currentPostId,
|
|
746
|
-
limit
|
|
747
|
-
})
|
|
748
|
-
});
|
|
749
|
-
if (!response.ok) {
|
|
750
|
-
console.error("Failed to fetch related posts:", response.statusText);
|
|
751
|
-
return [];
|
|
752
|
-
}
|
|
753
|
-
const data = await response.json();
|
|
754
|
-
return data.posts || [];
|
|
755
|
-
} catch (error) {
|
|
756
|
-
console.error("Failed to fetch related posts:", error);
|
|
757
|
-
return [];
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
async function RelatedPosts({
|
|
761
|
-
apiUrl = process.env.SONOR_API_URL || "https://api.sonor.io",
|
|
762
|
-
apiKey = process.env.SONOR_API_KEY || "",
|
|
763
|
-
currentPostId,
|
|
764
|
-
limit = 3,
|
|
765
|
-
className,
|
|
766
|
-
renderItem
|
|
767
|
-
}) {
|
|
768
|
-
if (!apiKey) {
|
|
769
|
-
console.warn("[Blog] No API key configured for RelatedPosts");
|
|
770
|
-
return null;
|
|
771
|
-
}
|
|
772
|
-
const posts = await fetchRelatedPosts(apiUrl, apiKey, currentPostId, limit);
|
|
773
|
-
if (posts.length === 0) return null;
|
|
774
|
-
return /* @__PURE__ */ jsxs("section", { className, children: [
|
|
775
|
-
/* @__PURE__ */ jsx("h3", { style: { marginBottom: 16 }, children: "Related Posts" }),
|
|
776
|
-
/* @__PURE__ */ jsx("div", { style: { display: "grid", gap: 16 }, children: posts.map(
|
|
777
|
-
(post) => renderItem ? renderItem(post) : /* @__PURE__ */ jsxs("article", { style: { borderBottom: "1px solid var(--sk-border)", paddingBottom: 16 }, children: [
|
|
778
|
-
post.featured_image && /* @__PURE__ */ jsx(
|
|
779
|
-
"img",
|
|
780
|
-
{
|
|
781
|
-
src: post.featured_image,
|
|
782
|
-
alt: post.title,
|
|
783
|
-
style: {
|
|
784
|
-
width: "100%",
|
|
785
|
-
height: 120,
|
|
786
|
-
objectFit: "cover",
|
|
787
|
-
borderRadius: 8,
|
|
788
|
-
marginBottom: 8
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
),
|
|
792
|
-
/* @__PURE__ */ jsx("a", { href: `/blog/${post.slug}`, style: { textDecoration: "none" }, children: /* @__PURE__ */ jsx("h4", { style: { margin: 0, color: "inherit" }, children: post.title }) }),
|
|
793
|
-
post.excerpt && /* @__PURE__ */ jsx("p", { style: { margin: "4px 0 0", fontSize: 14, color: "var(--sk-text-secondary)" }, children: post.excerpt })
|
|
794
|
-
] }, post.id)
|
|
795
|
-
) })
|
|
796
|
-
] });
|
|
797
|
-
}
|
|
798
366
|
function parseHeadings(content) {
|
|
799
367
|
const headingRegex = /<h([2-4])[^>]*id="([^"]*)"[^>]*>(.*?)<\/h[2-4]>/gi;
|
|
800
368
|
const items = [];
|
|
@@ -876,6 +444,6 @@ function TableOfContents({
|
|
|
876
444
|
] });
|
|
877
445
|
}
|
|
878
446
|
|
|
879
|
-
export { AuthorCard, AuthorPage,
|
|
447
|
+
export { AuthorCard, AuthorPage, NewsletterWidget, TableOfContents };
|
|
880
448
|
//# sourceMappingURL=index.mjs.map
|
|
881
449
|
//# sourceMappingURL=index.mjs.map
|