@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkHX6ZG3PP_js = require('./chunk-HX6ZG3PP.js');
|
|
3
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var marked = require('marked');
|
|
5
6
|
var React = require('react');
|
|
@@ -8,7 +9,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
8
9
|
|
|
9
10
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
10
11
|
|
|
11
|
-
// src/blog/ServiceCallout.tsx
|
|
12
12
|
var defaults = {
|
|
13
13
|
featured: {
|
|
14
14
|
wrapper: {
|
|
@@ -372,6 +372,27 @@ function addExternalLinkTargets(html, siteUrl) {
|
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
// src/blog/reading-time.ts
|
|
376
|
+
function readingTimeMinutes(post) {
|
|
377
|
+
const value = post.reading_time_minutes ?? post.reading_time;
|
|
378
|
+
return typeof value === "number" && value > 0 ? value : null;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// src/blog/author-social.ts
|
|
382
|
+
var withPrefix = (value, base) => value.startsWith("http") ? value : `${base}${value}`;
|
|
383
|
+
function getAuthorSocialLinks(author) {
|
|
384
|
+
const links = [];
|
|
385
|
+
const linkedin = author.linkedin_url || author.social_links?.linkedin;
|
|
386
|
+
if (linkedin) links.push({ label: "LinkedIn", href: withPrefix(linkedin, "https://linkedin.com/in/") });
|
|
387
|
+
const twitter = author.twitter_url ? author.twitter_url : author.social_links?.twitter ? withPrefix(author.social_links.twitter, "https://twitter.com/") : null;
|
|
388
|
+
if (twitter) links.push({ label: "Twitter", href: twitter });
|
|
389
|
+
const website = author.website_url || author.website;
|
|
390
|
+
if (website) links.push({ label: "Website", href: website });
|
|
391
|
+
const github = author.social_links?.github;
|
|
392
|
+
if (github) links.push({ label: "GitHub", href: withPrefix(github, "https://github.com/") });
|
|
393
|
+
return links;
|
|
394
|
+
}
|
|
395
|
+
|
|
375
396
|
// src/blog/blog-styles.ts
|
|
376
397
|
var blogPostCss = (
|
|
377
398
|
/* css */
|
|
@@ -961,7 +982,11 @@ function getClusterNav(post) {
|
|
|
961
982
|
return {
|
|
962
983
|
cluster_name: post.cluster_name || "",
|
|
963
984
|
cluster_slug: post.cluster_slug || "",
|
|
964
|
-
pillar: isPillar ? null : post.parent_pillar_slug ? {
|
|
985
|
+
pillar: isPillar ? null : post.parent_pillar_slug ? {
|
|
986
|
+
slug: post.parent_pillar_slug,
|
|
987
|
+
title: post.parent_pillar_title || "",
|
|
988
|
+
category: post.parent_pillar_category || void 0
|
|
989
|
+
} : null,
|
|
965
990
|
siblings: post.sibling_articles || [],
|
|
966
991
|
is_pillar: isPillar
|
|
967
992
|
};
|
|
@@ -1086,14 +1111,19 @@ async function BlogPost({
|
|
|
1086
1111
|
...item,
|
|
1087
1112
|
answer: addExternalLinkTargets(item.answer || "", siteUrlResolved)
|
|
1088
1113
|
})) ?? faqRaw;
|
|
1114
|
+
const { BlogViewTracker } = await import('./BlogViewTracker-COTPD7WL.js');
|
|
1089
1115
|
if (children) {
|
|
1090
|
-
return
|
|
1116
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1117
|
+
/* @__PURE__ */ jsxRuntime.jsx(BlogViewTracker, { slug: post.slug }),
|
|
1118
|
+
children({ post, tableOfContents, relatedPosts })
|
|
1119
|
+
] });
|
|
1091
1120
|
}
|
|
1092
1121
|
const { BlogPostFaqSection } = await import('./BlogPostFaqSection-YG5J4B4U.js');
|
|
1093
1122
|
const date = post.published_at ? new Date(post.published_at).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" }) : null;
|
|
1094
1123
|
const hasToc = showToc && tableOfContents.length > 0;
|
|
1095
1124
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1096
1125
|
!unstyled && /* @__PURE__ */ jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: blogPostCss } }),
|
|
1126
|
+
/* @__PURE__ */ jsxRuntime.jsx(BlogViewTracker, { slug: post.slug }),
|
|
1097
1127
|
/* @__PURE__ */ jsxRuntime.jsxs("article", { className: cls(unstyled, styles, "article", "sk-blog-article", className), children: [
|
|
1098
1128
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: cls(unstyled, styles, "header", "sk-blog-header"), children: [
|
|
1099
1129
|
/* @__PURE__ */ jsxRuntime.jsxs("nav", { className: cls(unstyled, styles, "breadcrumb", "sk-blog-breadcrumb"), children: [
|
|
@@ -1119,9 +1149,9 @@ async function BlogPost({
|
|
|
1119
1149
|
] }),
|
|
1120
1150
|
post.author && date && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sk-blog-meta-dot" }),
|
|
1121
1151
|
date && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cls(unstyled, styles, "metaItem", "sk-blog-meta-item"), children: date }),
|
|
1122
|
-
date && post
|
|
1123
|
-
post
|
|
1124
|
-
post
|
|
1152
|
+
date && readingTimeMinutes(post) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sk-blog-meta-dot" }),
|
|
1153
|
+
readingTimeMinutes(post) && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cls(unstyled, styles, "metaItem", "sk-blog-meta-item"), children: [
|
|
1154
|
+
readingTimeMinutes(post),
|
|
1125
1155
|
" min read"
|
|
1126
1156
|
] })
|
|
1127
1157
|
] })
|
|
@@ -1156,7 +1186,7 @@ async function BlogPost({
|
|
|
1156
1186
|
] }),
|
|
1157
1187
|
post.tags && post.tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cls(unstyled, styles, "tags", "sk-blog-tags"), children: post.tags.map((tag, index) => {
|
|
1158
1188
|
const tagName = typeof tag === "string" ? tag : tag?.name || "";
|
|
1159
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("a", { href: `${basePath}?tag=${tagName}`, className: cls(unstyled, styles, "tag", "sk-blog-tag"), children: [
|
|
1189
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("a", { href: `${basePath}?tag=${encodeURIComponent(tagName)}`, className: cls(unstyled, styles, "tag", "sk-blog-tag"), children: [
|
|
1160
1190
|
"#",
|
|
1161
1191
|
tagName
|
|
1162
1192
|
] }, `${tagName}-${index}`);
|
|
@@ -1220,27 +1250,39 @@ function normalizeAuthorForDisplay(author) {
|
|
|
1220
1250
|
slug: a.slug ?? "author",
|
|
1221
1251
|
bio: a.bio ?? void 0,
|
|
1222
1252
|
avatar_url: a.avatar_url ?? a.image ?? a.image_url ?? void 0,
|
|
1223
|
-
email: a.email ?? void 0,
|
|
1224
1253
|
website: a.website ?? a.url ?? void 0,
|
|
1225
1254
|
social_links: a.social_links,
|
|
1255
|
+
// Real API columns (blog_authors) — previously dropped here, so
|
|
1256
|
+
// AuthorSection could never render socials from a live author row.
|
|
1257
|
+
linkedin_url: a.linkedin_url ?? void 0,
|
|
1258
|
+
twitter_url: a.twitter_url ?? void 0,
|
|
1259
|
+
website_url: a.website_url ?? void 0,
|
|
1260
|
+
same_as: a.same_as ?? void 0,
|
|
1226
1261
|
is_active: a.is_active ?? true,
|
|
1227
|
-
...a.socialProfiles
|
|
1262
|
+
...normalizeSocialProfiles(a.socialProfiles).length ? { sameAs: normalizeSocialProfiles(a.socialProfiles) } : {},
|
|
1228
1263
|
...a.title ? { title: a.title } : {}
|
|
1229
1264
|
};
|
|
1230
1265
|
}
|
|
1266
|
+
function normalizeSocialProfiles(value) {
|
|
1267
|
+
if (Array.isArray(value)) return value.filter((v) => typeof v === "string" && !!v);
|
|
1268
|
+
if (value && typeof value === "object") {
|
|
1269
|
+
return Object.values(value).filter(
|
|
1270
|
+
(v) => typeof v === "string" && !!v
|
|
1271
|
+
);
|
|
1272
|
+
}
|
|
1273
|
+
return [];
|
|
1274
|
+
}
|
|
1231
1275
|
function AuthorSection({ author, className, unstyled = false }) {
|
|
1232
1276
|
const base = unstyled ? className : className || "sk-blog-author";
|
|
1277
|
+
const socialLinks = getAuthorSocialLinks(author);
|
|
1233
1278
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: base || void 0, children: [
|
|
1234
1279
|
author.avatar_url && /* @__PURE__ */ jsxRuntime.jsx("img", { src: author.avatar_url, alt: author.name, className: unstyled ? void 0 : "sk-blog-author-avatar" }),
|
|
1235
1280
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1236
1281
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: unstyled ? void 0 : "sk-blog-author-name", children: author.name }),
|
|
1237
1282
|
"title" in author && author.title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: unstyled ? void 0 : "sk-blog-author-title", children: author.title }),
|
|
1238
1283
|
author.bio && /* @__PURE__ */ jsxRuntime.jsx("p", { className: unstyled ? void 0 : "sk-blog-author-bio", children: author.bio }),
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
author.social_links.linkedin && /* @__PURE__ */ jsxRuntime.jsx("a", { href: author.social_links.linkedin, target: "_blank", rel: "noopener noreferrer", children: "LinkedIn" })
|
|
1242
|
-
] }),
|
|
1243
|
-
"sameAs" in author && author.sameAs && author.sameAs.length > 0 && !author.social_links && /* @__PURE__ */ jsxRuntime.jsx("div", { className: unstyled ? void 0 : "sk-blog-author-links", children: author.sameAs.map((url, i) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: url, target: "_blank", rel: "noopener noreferrer", children: "Profile" }, i)) })
|
|
1284
|
+
socialLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: unstyled ? void 0 : "sk-blog-author-links", children: socialLinks.map((link) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: link.href, target: "_blank", rel: "noopener noreferrer", children: link.label }, link.label)) }),
|
|
1285
|
+
"sameAs" in author && author.sameAs && author.sameAs.length > 0 && socialLinks.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: unstyled ? void 0 : "sk-blog-author-links", children: author.sameAs.map((url, i) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: url, target: "_blank", rel: "noopener noreferrer", children: "Profile" }, i)) })
|
|
1244
1286
|
] })
|
|
1245
1287
|
] });
|
|
1246
1288
|
}
|
|
@@ -1253,6 +1295,7 @@ async function fetchBlogList(params) {
|
|
|
1253
1295
|
author,
|
|
1254
1296
|
featured,
|
|
1255
1297
|
search,
|
|
1298
|
+
cluster,
|
|
1256
1299
|
page = 1,
|
|
1257
1300
|
perPage = 12,
|
|
1258
1301
|
orderBy = "published_at",
|
|
@@ -1264,7 +1307,7 @@ async function fetchBlogList(params) {
|
|
|
1264
1307
|
if (author) queryParams.set("author", author);
|
|
1265
1308
|
if (featured) queryParams.set("featured", "true");
|
|
1266
1309
|
if (search) queryParams.set("search", search);
|
|
1267
|
-
if (
|
|
1310
|
+
if (cluster) queryParams.set("cluster", cluster);
|
|
1268
1311
|
queryParams.set("page", String(page));
|
|
1269
1312
|
queryParams.set("per_page", String(perPage));
|
|
1270
1313
|
queryParams.set("order_by", orderBy);
|
|
@@ -1325,6 +1368,7 @@ async function BlogList({
|
|
|
1325
1368
|
author,
|
|
1326
1369
|
featured,
|
|
1327
1370
|
search,
|
|
1371
|
+
cluster,
|
|
1328
1372
|
page = 1,
|
|
1329
1373
|
perPage = 12,
|
|
1330
1374
|
orderBy = "published_at",
|
|
@@ -1343,7 +1387,7 @@ async function BlogList({
|
|
|
1343
1387
|
return null;
|
|
1344
1388
|
}
|
|
1345
1389
|
const [blogData, categories] = await Promise.all([
|
|
1346
|
-
fetchBlogList({ apiUrl, apiKey, category, tag, author, featured, search, page, perPage, orderBy, order }),
|
|
1390
|
+
fetchBlogList({ apiUrl, apiKey, category, tag, author, featured, search, cluster, page, perPage, orderBy, order }),
|
|
1347
1391
|
showCategoryFilter ? fetchCategories(apiUrl, apiKey) : Promise.resolve([])
|
|
1348
1392
|
]);
|
|
1349
1393
|
if (children) {
|
|
@@ -1434,8 +1478,8 @@ function BlogPostCard({ post, basePath, styles = {}, unstyled = false }) {
|
|
|
1434
1478
|
"By ",
|
|
1435
1479
|
typeof post.author === "string" ? post.author : post.author.name
|
|
1436
1480
|
] }),
|
|
1437
|
-
post
|
|
1438
|
-
post
|
|
1481
|
+
readingTimeMinutes(post) && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cls2(unstyled, styles, "cardReadingTime", ""), children: [
|
|
1482
|
+
readingTimeMinutes(post),
|
|
1439
1483
|
" min read"
|
|
1440
1484
|
] })
|
|
1441
1485
|
] })
|
|
@@ -1448,14 +1492,440 @@ function buildPaginationUrl(basePath, page, category) {
|
|
|
1448
1492
|
if (category) params.set("category", category);
|
|
1449
1493
|
return `${basePath}?${params}`;
|
|
1450
1494
|
}
|
|
1495
|
+
async function fetchRecentPosts(apiUrl, apiKey, limit = 5) {
|
|
1496
|
+
try {
|
|
1497
|
+
const response = await fetch(`${apiUrl}/public/blog/recent?limit=${limit}`, {
|
|
1498
|
+
headers: { "x-api-key": apiKey },
|
|
1499
|
+
next: { revalidate: 300 }
|
|
1500
|
+
});
|
|
1501
|
+
if (!response.ok) return [];
|
|
1502
|
+
const data = await response.json();
|
|
1503
|
+
return data.posts || [];
|
|
1504
|
+
} catch (error) {
|
|
1505
|
+
console.error("[Blog] Error fetching recent posts:", error);
|
|
1506
|
+
return [];
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
async function fetchCategories2(apiUrl, apiKey) {
|
|
1510
|
+
try {
|
|
1511
|
+
const response = await fetch(`${apiUrl}/public/blog/categories`, {
|
|
1512
|
+
headers: { "x-api-key": apiKey },
|
|
1513
|
+
next: { revalidate: 300 }
|
|
1514
|
+
});
|
|
1515
|
+
if (!response.ok) return [];
|
|
1516
|
+
const data = await response.json();
|
|
1517
|
+
return data.categories || [];
|
|
1518
|
+
} catch (error) {
|
|
1519
|
+
console.error("[Blog] Error fetching categories:", error);
|
|
1520
|
+
return [];
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
async function fetchTags(apiUrl, apiKey) {
|
|
1524
|
+
try {
|
|
1525
|
+
const response = await fetch(`${apiUrl}/public/blog/tags`, {
|
|
1526
|
+
headers: { "x-api-key": apiKey },
|
|
1527
|
+
next: { revalidate: 300 }
|
|
1528
|
+
});
|
|
1529
|
+
if (!response.ok) return [];
|
|
1530
|
+
const data = await response.json();
|
|
1531
|
+
return data.tags || [];
|
|
1532
|
+
} catch (error) {
|
|
1533
|
+
console.error("[Blog] Error fetching tags:", error);
|
|
1534
|
+
return [];
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
async function BlogSidebar({
|
|
1538
|
+
apiUrl = process.env.SONOR_API_URL || "https://api.sonor.io",
|
|
1539
|
+
apiKey = process.env.SONOR_API_KEY || "",
|
|
1540
|
+
showCategories = true,
|
|
1541
|
+
showRecentPosts = true,
|
|
1542
|
+
recentPostsCount = 5,
|
|
1543
|
+
showTags = true,
|
|
1544
|
+
showSearch = true,
|
|
1545
|
+
basePath = "/blog",
|
|
1546
|
+
className,
|
|
1547
|
+
currentCategory,
|
|
1548
|
+
children
|
|
1549
|
+
}) {
|
|
1550
|
+
if (!apiKey) {
|
|
1551
|
+
console.warn("[Blog] No API key configured for sidebar");
|
|
1552
|
+
return null;
|
|
1553
|
+
}
|
|
1554
|
+
const [categories, recentPosts, tags] = await Promise.all([
|
|
1555
|
+
showCategories ? fetchCategories2(apiUrl, apiKey) : Promise.resolve([]),
|
|
1556
|
+
showRecentPosts ? fetchRecentPosts(apiUrl, apiKey, recentPostsCount) : Promise.resolve([]),
|
|
1557
|
+
showTags ? fetchTags(apiUrl, apiKey) : Promise.resolve([])
|
|
1558
|
+
]);
|
|
1559
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("aside", { className, style: { display: "flex", flexDirection: "column", gap: 32 }, children: [
|
|
1560
|
+
showSearch && /* @__PURE__ */ jsxRuntime.jsx(SearchWidget, { basePath }),
|
|
1561
|
+
showCategories && categories.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1562
|
+
CategoriesWidget,
|
|
1563
|
+
{
|
|
1564
|
+
categories,
|
|
1565
|
+
basePath,
|
|
1566
|
+
currentCategory
|
|
1567
|
+
}
|
|
1568
|
+
),
|
|
1569
|
+
showRecentPosts && recentPosts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(RecentPostsWidget, { posts: recentPosts, basePath }),
|
|
1570
|
+
showTags && tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(TagsWidget, { tags, basePath }),
|
|
1571
|
+
children
|
|
1572
|
+
] });
|
|
1573
|
+
}
|
|
1574
|
+
function SearchWidget({ basePath }) {
|
|
1575
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: chunkHX6ZG3PP_js.widgetStyle, children: [
|
|
1576
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { style: chunkHX6ZG3PP_js.widgetTitleStyle, children: "Search" }),
|
|
1577
|
+
/* @__PURE__ */ jsxRuntime.jsx("form", { action: basePath, method: "get", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1578
|
+
"input",
|
|
1579
|
+
{
|
|
1580
|
+
type: "search",
|
|
1581
|
+
name: "search",
|
|
1582
|
+
placeholder: "Search posts...",
|
|
1583
|
+
style: {
|
|
1584
|
+
width: "100%",
|
|
1585
|
+
padding: "10px 12px",
|
|
1586
|
+
border: "1px solid var(--sk-border)",
|
|
1587
|
+
borderRadius: 8,
|
|
1588
|
+
fontSize: 14
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
) })
|
|
1592
|
+
] });
|
|
1593
|
+
}
|
|
1594
|
+
function CategoriesWidget({
|
|
1595
|
+
categories,
|
|
1596
|
+
basePath,
|
|
1597
|
+
currentCategory
|
|
1598
|
+
}) {
|
|
1599
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: chunkHX6ZG3PP_js.widgetStyle, children: [
|
|
1600
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { style: chunkHX6ZG3PP_js.widgetTitleStyle, children: "Categories" }),
|
|
1601
|
+
/* @__PURE__ */ jsxRuntime.jsxs("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: [
|
|
1602
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1603
|
+
"a",
|
|
1604
|
+
{
|
|
1605
|
+
href: basePath,
|
|
1606
|
+
style: {
|
|
1607
|
+
...categoryLinkStyle,
|
|
1608
|
+
fontWeight: !currentCategory ? 600 : 400,
|
|
1609
|
+
color: !currentCategory ? "var(--sk-primary)" : "var(--sk-text-primary)"
|
|
1610
|
+
},
|
|
1611
|
+
children: "All Posts"
|
|
1612
|
+
}
|
|
1613
|
+
) }),
|
|
1614
|
+
categories.map((cat) => /* @__PURE__ */ jsxRuntime.jsx("li", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1615
|
+
"a",
|
|
1616
|
+
{
|
|
1617
|
+
href: `${basePath}?category=${cat.slug}`,
|
|
1618
|
+
style: {
|
|
1619
|
+
...categoryLinkStyle,
|
|
1620
|
+
fontWeight: currentCategory === cat.slug ? 600 : 400,
|
|
1621
|
+
color: currentCategory === cat.slug ? "var(--sk-primary)" : "var(--sk-text-primary)"
|
|
1622
|
+
},
|
|
1623
|
+
children: [
|
|
1624
|
+
cat.name,
|
|
1625
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: "var(--sk-text-tertiary)", marginLeft: 8 }, children: [
|
|
1626
|
+
"(",
|
|
1627
|
+
cat.post_count,
|
|
1628
|
+
")"
|
|
1629
|
+
] })
|
|
1630
|
+
]
|
|
1631
|
+
}
|
|
1632
|
+
) }, cat.slug))
|
|
1633
|
+
] })
|
|
1634
|
+
] });
|
|
1635
|
+
}
|
|
1636
|
+
function RecentPostsWidget({
|
|
1637
|
+
posts,
|
|
1638
|
+
basePath
|
|
1639
|
+
}) {
|
|
1640
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: chunkHX6ZG3PP_js.widgetStyle, children: [
|
|
1641
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { style: chunkHX6ZG3PP_js.widgetTitleStyle, children: "Recent Posts" }),
|
|
1642
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: posts.map((post) => {
|
|
1643
|
+
const date = post.published_at ? new Date(post.published_at).toLocaleDateString("en-US", {
|
|
1644
|
+
month: "short",
|
|
1645
|
+
day: "numeric"
|
|
1646
|
+
}) : null;
|
|
1647
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1648
|
+
"li",
|
|
1649
|
+
{
|
|
1650
|
+
style: {
|
|
1651
|
+
marginBottom: 16,
|
|
1652
|
+
paddingBottom: 16,
|
|
1653
|
+
borderBottom: "1px solid var(--sk-border)"
|
|
1654
|
+
},
|
|
1655
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 12 }, children: [
|
|
1656
|
+
post.featured_image && /* @__PURE__ */ jsxRuntime.jsx("a", { href: `${basePath}/${post.slug}`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1657
|
+
"img",
|
|
1658
|
+
{
|
|
1659
|
+
src: post.featured_image,
|
|
1660
|
+
alt: "",
|
|
1661
|
+
style: {
|
|
1662
|
+
width: 64,
|
|
1663
|
+
height: 48,
|
|
1664
|
+
objectFit: "cover",
|
|
1665
|
+
borderRadius: 6,
|
|
1666
|
+
flexShrink: 0
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
) }),
|
|
1670
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1671
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1672
|
+
"a",
|
|
1673
|
+
{
|
|
1674
|
+
href: `${basePath}/${post.slug}`,
|
|
1675
|
+
style: {
|
|
1676
|
+
fontSize: 14,
|
|
1677
|
+
fontWeight: 500,
|
|
1678
|
+
color: "var(--sk-text-primary)",
|
|
1679
|
+
textDecoration: "none",
|
|
1680
|
+
display: "-webkit-box",
|
|
1681
|
+
WebkitLineClamp: 2,
|
|
1682
|
+
WebkitBoxOrient: "vertical",
|
|
1683
|
+
overflow: "hidden"
|
|
1684
|
+
},
|
|
1685
|
+
children: post.title
|
|
1686
|
+
}
|
|
1687
|
+
),
|
|
1688
|
+
date && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--sk-text-tertiary)", display: "block", marginTop: 4 }, children: date })
|
|
1689
|
+
] })
|
|
1690
|
+
] })
|
|
1691
|
+
},
|
|
1692
|
+
post.id
|
|
1693
|
+
);
|
|
1694
|
+
}) })
|
|
1695
|
+
] });
|
|
1696
|
+
}
|
|
1697
|
+
function TagsWidget({
|
|
1698
|
+
tags,
|
|
1699
|
+
basePath
|
|
1700
|
+
}) {
|
|
1701
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: chunkHX6ZG3PP_js.widgetStyle, children: [
|
|
1702
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { style: chunkHX6ZG3PP_js.widgetTitleStyle, children: "Popular Tags" }),
|
|
1703
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: tags.slice(0, 15).map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1704
|
+
"a",
|
|
1705
|
+
{
|
|
1706
|
+
href: `${basePath}?tag=${encodeURIComponent(tag.name)}`,
|
|
1707
|
+
style: {
|
|
1708
|
+
padding: "4px 10px",
|
|
1709
|
+
backgroundColor: "var(--sk-bg-elevated)",
|
|
1710
|
+
borderRadius: 9999,
|
|
1711
|
+
fontSize: 12,
|
|
1712
|
+
color: "var(--sk-text-primary)",
|
|
1713
|
+
textDecoration: "none",
|
|
1714
|
+
transition: "background-color 0.2s"
|
|
1715
|
+
},
|
|
1716
|
+
children: tag.name
|
|
1717
|
+
},
|
|
1718
|
+
tag.slug
|
|
1719
|
+
)) })
|
|
1720
|
+
] });
|
|
1721
|
+
}
|
|
1722
|
+
var categoryLinkStyle = {
|
|
1723
|
+
display: "flex",
|
|
1724
|
+
alignItems: "center",
|
|
1725
|
+
fontSize: 14,
|
|
1726
|
+
textDecoration: "none"
|
|
1727
|
+
};
|
|
1728
|
+
async function BlogLayout({
|
|
1729
|
+
apiUrl = process.env.SONOR_API_URL || "https://api.sonor.io",
|
|
1730
|
+
apiKey = process.env.SONOR_API_KEY || "",
|
|
1731
|
+
layout = "sidebar-right",
|
|
1732
|
+
showSidebar = true,
|
|
1733
|
+
sidebarProps = {},
|
|
1734
|
+
hero,
|
|
1735
|
+
maxWidth = 1280,
|
|
1736
|
+
basePath = "/blog",
|
|
1737
|
+
className,
|
|
1738
|
+
currentCategory,
|
|
1739
|
+
children
|
|
1740
|
+
}) {
|
|
1741
|
+
const hasSidebar = showSidebar && layout !== "full-width";
|
|
1742
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
1743
|
+
hero && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1744
|
+
"section",
|
|
1745
|
+
{
|
|
1746
|
+
style: {
|
|
1747
|
+
padding: "60px 20px",
|
|
1748
|
+
backgroundColor: hero.backgroundColor || "var(--sk-primary)",
|
|
1749
|
+
backgroundImage: hero.backgroundImage ? `url(${hero.backgroundImage})` : void 0,
|
|
1750
|
+
backgroundSize: "cover",
|
|
1751
|
+
backgroundPosition: "center",
|
|
1752
|
+
color: "var(--sk-bg)",
|
|
1753
|
+
textAlign: "center"
|
|
1754
|
+
},
|
|
1755
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { maxWidth, margin: "0 auto" }, children: [
|
|
1756
|
+
hero.title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1757
|
+
"h1",
|
|
1758
|
+
{
|
|
1759
|
+
style: {
|
|
1760
|
+
fontSize: "clamp(32px, 5vw, 48px)",
|
|
1761
|
+
fontWeight: 700,
|
|
1762
|
+
marginBottom: 16
|
|
1763
|
+
},
|
|
1764
|
+
children: hero.title
|
|
1765
|
+
}
|
|
1766
|
+
),
|
|
1767
|
+
hero.subtitle && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1768
|
+
"p",
|
|
1769
|
+
{
|
|
1770
|
+
style: {
|
|
1771
|
+
fontSize: "clamp(16px, 2vw, 20px)",
|
|
1772
|
+
opacity: 0.9,
|
|
1773
|
+
maxWidth: 600,
|
|
1774
|
+
margin: "0 auto"
|
|
1775
|
+
},
|
|
1776
|
+
children: hero.subtitle
|
|
1777
|
+
}
|
|
1778
|
+
)
|
|
1779
|
+
] })
|
|
1780
|
+
}
|
|
1781
|
+
),
|
|
1782
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1783
|
+
"div",
|
|
1784
|
+
{
|
|
1785
|
+
style: {
|
|
1786
|
+
maxWidth,
|
|
1787
|
+
margin: "0 auto",
|
|
1788
|
+
padding: "40px 20px"
|
|
1789
|
+
},
|
|
1790
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1791
|
+
"div",
|
|
1792
|
+
{
|
|
1793
|
+
style: {
|
|
1794
|
+
display: hasSidebar ? "grid" : "block",
|
|
1795
|
+
gridTemplateColumns: hasSidebar ? layout === "sidebar-left" ? "300px 1fr" : "1fr 300px" : void 0,
|
|
1796
|
+
gap: 48
|
|
1797
|
+
},
|
|
1798
|
+
children: [
|
|
1799
|
+
hasSidebar && layout === "sidebar-left" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1800
|
+
BlogSidebar,
|
|
1801
|
+
{
|
|
1802
|
+
apiUrl,
|
|
1803
|
+
apiKey,
|
|
1804
|
+
basePath,
|
|
1805
|
+
currentCategory,
|
|
1806
|
+
...sidebarProps
|
|
1807
|
+
}
|
|
1808
|
+
),
|
|
1809
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { style: { minWidth: 0 }, children }),
|
|
1810
|
+
hasSidebar && layout === "sidebar-right" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1811
|
+
BlogSidebar,
|
|
1812
|
+
{
|
|
1813
|
+
apiUrl,
|
|
1814
|
+
apiKey,
|
|
1815
|
+
basePath,
|
|
1816
|
+
currentCategory,
|
|
1817
|
+
...sidebarProps
|
|
1818
|
+
}
|
|
1819
|
+
)
|
|
1820
|
+
]
|
|
1821
|
+
}
|
|
1822
|
+
)
|
|
1823
|
+
}
|
|
1824
|
+
)
|
|
1825
|
+
] });
|
|
1826
|
+
}
|
|
1827
|
+
async function BlogPage({ listComponent, ...layoutProps }) {
|
|
1828
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BlogLayout, { ...layoutProps, children: listComponent });
|
|
1829
|
+
}
|
|
1830
|
+
async function BlogPostPage({ postComponent, ...layoutProps }) {
|
|
1831
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BlogLayout, { ...layoutProps, showSidebar: false, layout: "full-width", children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { maxWidth: 800, margin: "0 auto" }, children: postComponent }) });
|
|
1832
|
+
}
|
|
1833
|
+
async function CategoryPage({
|
|
1834
|
+
category,
|
|
1835
|
+
categoryName,
|
|
1836
|
+
listComponent,
|
|
1837
|
+
hero,
|
|
1838
|
+
...layoutProps
|
|
1839
|
+
}) {
|
|
1840
|
+
const categoryHero = hero || {
|
|
1841
|
+
title: categoryName || category,
|
|
1842
|
+
subtitle: `Browse all posts in ${categoryName || category}`,
|
|
1843
|
+
backgroundColor: "var(--sk-primary)"
|
|
1844
|
+
};
|
|
1845
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BlogLayout, { ...layoutProps, hero: categoryHero, currentCategory: category, children: listComponent });
|
|
1846
|
+
}
|
|
1847
|
+
async function fetchRelatedPosts2(apiUrl, apiKey, currentPostId, limit) {
|
|
1848
|
+
try {
|
|
1849
|
+
const response = await fetch(`${apiUrl}/public/blog/related`, {
|
|
1850
|
+
method: "POST",
|
|
1851
|
+
headers: {
|
|
1852
|
+
"Content-Type": "application/json",
|
|
1853
|
+
"x-api-key": apiKey
|
|
1854
|
+
},
|
|
1855
|
+
// The controller reads snake_case `current_post_id` and looks the post
|
|
1856
|
+
// up by id. camelCase here meant the id arrived as undefined, the
|
|
1857
|
+
// lookup matched nothing, and this rendered "no related posts" as a
|
|
1858
|
+
// clean 200 — the silent sibling of the 404 path bug fixed above.
|
|
1859
|
+
body: JSON.stringify({
|
|
1860
|
+
current_post_id: currentPostId,
|
|
1861
|
+
limit
|
|
1862
|
+
})
|
|
1863
|
+
});
|
|
1864
|
+
if (!response.ok) {
|
|
1865
|
+
console.error("Failed to fetch related posts:", response.statusText);
|
|
1866
|
+
return [];
|
|
1867
|
+
}
|
|
1868
|
+
const data = await response.json();
|
|
1869
|
+
return data.posts || [];
|
|
1870
|
+
} catch (error) {
|
|
1871
|
+
console.error("Failed to fetch related posts:", error);
|
|
1872
|
+
return [];
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
async function RelatedPosts({
|
|
1876
|
+
apiUrl = process.env.SONOR_API_URL || "https://api.sonor.io",
|
|
1877
|
+
apiKey = process.env.SONOR_API_KEY || "",
|
|
1878
|
+
currentPostId,
|
|
1879
|
+
limit = 3,
|
|
1880
|
+
className,
|
|
1881
|
+
renderItem
|
|
1882
|
+
}) {
|
|
1883
|
+
if (!apiKey) {
|
|
1884
|
+
console.warn("[Blog] No API key configured for RelatedPosts");
|
|
1885
|
+
return null;
|
|
1886
|
+
}
|
|
1887
|
+
const posts = await fetchRelatedPosts2(apiUrl, apiKey, currentPostId, limit);
|
|
1888
|
+
if (posts.length === 0) return null;
|
|
1889
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className, children: [
|
|
1890
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { style: { marginBottom: 16 }, children: "Related Posts" }),
|
|
1891
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gap: 16 }, children: posts.map(
|
|
1892
|
+
(post) => renderItem ? renderItem(post) : /* @__PURE__ */ jsxRuntime.jsxs("article", { style: { borderBottom: "1px solid var(--sk-border)", paddingBottom: 16 }, children: [
|
|
1893
|
+
post.featured_image && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1894
|
+
"img",
|
|
1895
|
+
{
|
|
1896
|
+
src: post.featured_image,
|
|
1897
|
+
alt: post.title,
|
|
1898
|
+
style: {
|
|
1899
|
+
width: "100%",
|
|
1900
|
+
height: 120,
|
|
1901
|
+
objectFit: "cover",
|
|
1902
|
+
borderRadius: 8,
|
|
1903
|
+
marginBottom: 8
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
),
|
|
1907
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { href: `/blog/${post.slug}`, style: { textDecoration: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx("h4", { style: { margin: 0, color: "inherit" }, children: post.title }) }),
|
|
1908
|
+
post.excerpt && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: "4px 0 0", fontSize: 14, color: "var(--sk-text-secondary)" }, children: post.excerpt })
|
|
1909
|
+
] }, post.id)
|
|
1910
|
+
) })
|
|
1911
|
+
] });
|
|
1912
|
+
}
|
|
1451
1913
|
|
|
1914
|
+
exports.BlogLayout = BlogLayout;
|
|
1452
1915
|
exports.BlogList = BlogList;
|
|
1916
|
+
exports.BlogPage = BlogPage;
|
|
1453
1917
|
exports.BlogPost = BlogPost;
|
|
1918
|
+
exports.BlogPostPage = BlogPostPage;
|
|
1919
|
+
exports.BlogSidebar = BlogSidebar;
|
|
1920
|
+
exports.CategoryPage = CategoryPage;
|
|
1454
1921
|
exports.ClusterNavigation = ClusterNavigation;
|
|
1922
|
+
exports.RelatedPosts = RelatedPosts;
|
|
1455
1923
|
exports.ServiceCallout = ServiceCallout;
|
|
1456
1924
|
exports.ServiceCallouts = ServiceCallouts;
|
|
1457
1925
|
exports.addExternalLinkTargets = addExternalLinkTargets;
|
|
1926
|
+
exports.getAuthorSocialLinks = getAuthorSocialLinks;
|
|
1458
1927
|
exports.normalizeSiteHost = normalizeSiteHost;
|
|
1928
|
+
exports.readingTimeMinutes = readingTimeMinutes;
|
|
1459
1929
|
exports.resolveBlogSiteUrl = resolveBlogSiteUrl;
|
|
1460
|
-
//# sourceMappingURL=chunk-
|
|
1461
|
-
//# sourceMappingURL=chunk-
|
|
1930
|
+
//# sourceMappingURL=chunk-DKRXPXOR.js.map
|
|
1931
|
+
//# sourceMappingURL=chunk-DKRXPXOR.js.map
|