@sonordev/site-kit 1.2.7
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/README.md +376 -0
- package/dist/SetupWizard-Cki06kB0.d.mts +12 -0
- package/dist/SetupWizard-Cki06kB0.d.ts +12 -0
- package/dist/analytics/index.d.mts +93 -0
- package/dist/analytics/index.d.ts +93 -0
- package/dist/analytics/index.js +89 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics/index.mjs +71 -0
- package/dist/analytics/index.mjs.map +1 -0
- package/dist/api-CWtoFJCO.d.mts +137 -0
- package/dist/api-CWtoFJCO.d.ts +137 -0
- package/dist/blog/index.d.mts +305 -0
- package/dist/blog/index.d.ts +305 -0
- package/dist/blog/index.js +1578 -0
- package/dist/blog/index.js.map +1 -0
- package/dist/blog/index.mjs +1562 -0
- package/dist/blog/index.mjs.map +1 -0
- package/dist/blog/server.d.mts +229 -0
- package/dist/blog/server.d.ts +229 -0
- package/dist/blog/server.js +692 -0
- package/dist/blog/server.js.map +1 -0
- package/dist/blog/server.mjs +666 -0
- package/dist/blog/server.mjs.map +1 -0
- package/dist/chunk-24277A3Q.mjs +968 -0
- package/dist/chunk-24277A3Q.mjs.map +1 -0
- package/dist/chunk-373TK6TZ.js +321 -0
- package/dist/chunk-373TK6TZ.js.map +1 -0
- package/dist/chunk-3MYZS6PD.js +30 -0
- package/dist/chunk-3MYZS6PD.js.map +1 -0
- package/dist/chunk-43GBM4SX.js +283 -0
- package/dist/chunk-43GBM4SX.js.map +1 -0
- package/dist/chunk-4XPGGLVP.mjs +53 -0
- package/dist/chunk-4XPGGLVP.mjs.map +1 -0
- package/dist/chunk-622GAQP5.js +2008 -0
- package/dist/chunk-622GAQP5.js.map +1 -0
- package/dist/chunk-6BIPAKL4.mjs +28 -0
- package/dist/chunk-6BIPAKL4.mjs.map +1 -0
- package/dist/chunk-6ZCISNAB.mjs +343 -0
- package/dist/chunk-6ZCISNAB.mjs.map +1 -0
- package/dist/chunk-72MQFHYJ.js +1429 -0
- package/dist/chunk-72MQFHYJ.js.map +1 -0
- package/dist/chunk-7557OTHW.js +62 -0
- package/dist/chunk-7557OTHW.js.map +1 -0
- package/dist/chunk-7FUV73JZ.js +981 -0
- package/dist/chunk-7FUV73JZ.js.map +1 -0
- package/dist/chunk-7RF6PVHA.mjs +324 -0
- package/dist/chunk-7RF6PVHA.mjs.map +1 -0
- package/dist/chunk-7RYCHO6D.mjs +134 -0
- package/dist/chunk-7RYCHO6D.mjs.map +1 -0
- package/dist/chunk-7UKPRW25.mjs +1999 -0
- package/dist/chunk-7UKPRW25.mjs.map +1 -0
- package/dist/chunk-7URAOG2M.js +14864 -0
- package/dist/chunk-7URAOG2M.js.map +1 -0
- package/dist/chunk-AFAO3TGS.mjs +810 -0
- package/dist/chunk-AFAO3TGS.mjs.map +1 -0
- package/dist/chunk-BYLIU6XG.js +343 -0
- package/dist/chunk-BYLIU6XG.js.map +1 -0
- package/dist/chunk-D63MUKZ6.mjs +4423 -0
- package/dist/chunk-D63MUKZ6.mjs.map +1 -0
- package/dist/chunk-DDKW2FNA.js +390 -0
- package/dist/chunk-DDKW2FNA.js.map +1 -0
- package/dist/chunk-DQYMKR27.mjs +341 -0
- package/dist/chunk-DQYMKR27.mjs.map +1 -0
- package/dist/chunk-DW5UJKHH.js +221 -0
- package/dist/chunk-DW5UJKHH.js.map +1 -0
- package/dist/chunk-EEZCR6E6.js +50 -0
- package/dist/chunk-EEZCR6E6.js.map +1 -0
- package/dist/chunk-GCJXQ4AG.mjs +59 -0
- package/dist/chunk-GCJXQ4AG.mjs.map +1 -0
- package/dist/chunk-JGNQK2G6.mjs +14845 -0
- package/dist/chunk-JGNQK2G6.mjs.map +1 -0
- package/dist/chunk-JTLOJLWQ.mjs +563 -0
- package/dist/chunk-JTLOJLWQ.mjs.map +1 -0
- package/dist/chunk-K23A4G76.mjs +202 -0
- package/dist/chunk-K23A4G76.mjs.map +1 -0
- package/dist/chunk-KKU3K7RG.js +336 -0
- package/dist/chunk-KKU3K7RG.js.map +1 -0
- package/dist/chunk-KUGMH4ZF.js +571 -0
- package/dist/chunk-KUGMH4ZF.js.map +1 -0
- package/dist/chunk-LBVWVP72.js +110 -0
- package/dist/chunk-LBVWVP72.js.map +1 -0
- package/dist/chunk-LIVWLY2P.js +138 -0
- package/dist/chunk-LIVWLY2P.js.map +1 -0
- package/dist/chunk-M2T6R7BA.mjs +1003 -0
- package/dist/chunk-M2T6R7BA.mjs.map +1 -0
- package/dist/chunk-MV3QN7PW.mjs +47 -0
- package/dist/chunk-MV3QN7PW.mjs.map +1 -0
- package/dist/chunk-OB7E654K.js +72 -0
- package/dist/chunk-OB7E654K.js.map +1 -0
- package/dist/chunk-OIIKTGRL.mjs +380 -0
- package/dist/chunk-OIIKTGRL.mjs.map +1 -0
- package/dist/chunk-P3UWIUJS.mjs +1427 -0
- package/dist/chunk-P3UWIUJS.mjs.map +1 -0
- package/dist/chunk-PKN27UMH.mjs +136 -0
- package/dist/chunk-PKN27UMH.mjs.map +1 -0
- package/dist/chunk-QXV4667R.mjs +105 -0
- package/dist/chunk-QXV4667R.mjs.map +1 -0
- package/dist/chunk-S7FRYNSU.mjs +315 -0
- package/dist/chunk-S7FRYNSU.mjs.map +1 -0
- package/dist/chunk-TFLQX7K7.mjs +68 -0
- package/dist/chunk-TFLQX7K7.mjs.map +1 -0
- package/dist/chunk-UWE5PCYJ.mjs +279 -0
- package/dist/chunk-UWE5PCYJ.mjs.map +1 -0
- package/dist/chunk-UYFDNX2F.js +4469 -0
- package/dist/chunk-UYFDNX2F.js.map +1 -0
- package/dist/chunk-W4PALSGM.js +350 -0
- package/dist/chunk-W4PALSGM.js.map +1 -0
- package/dist/chunk-WECQ6KOB.js +1008 -0
- package/dist/chunk-WECQ6KOB.js.map +1 -0
- package/dist/chunk-XQQWI6WB.js +814 -0
- package/dist/chunk-XQQWI6WB.js.map +1 -0
- package/dist/chunk-XZJOZJB6.js +140 -0
- package/dist/chunk-XZJOZJB6.js.map +1 -0
- package/dist/chunk-ZSMWDLMK.js +63 -0
- package/dist/chunk-ZSMWDLMK.js.map +1 -0
- package/dist/cli/index.js +37243 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.mjs +37209 -0
- package/dist/cli/index.mjs.map +1 -0
- package/dist/commerce/index.d.mts +170 -0
- package/dist/commerce/index.d.ts +170 -0
- package/dist/commerce/index.js +174 -0
- package/dist/commerce/index.js.map +1 -0
- package/dist/commerce/index.mjs +5 -0
- package/dist/commerce/index.mjs.map +1 -0
- package/dist/commerce/server.d.mts +107 -0
- package/dist/commerce/server.d.ts +107 -0
- package/dist/commerce/server.js +187 -0
- package/dist/commerce/server.js.map +1 -0
- package/dist/commerce/server.mjs +177 -0
- package/dist/commerce/server.mjs.map +1 -0
- package/dist/config/index.d.mts +43 -0
- package/dist/config/index.d.ts +43 -0
- package/dist/config/index.js +66 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/index.mjs +64 -0
- package/dist/config/index.mjs.map +1 -0
- package/dist/engage/index.d.mts +33 -0
- package/dist/engage/index.d.ts +33 -0
- package/dist/engage/index.js +22 -0
- package/dist/engage/index.js.map +1 -0
- package/dist/engage/index.mjs +5 -0
- package/dist/engage/index.mjs.map +1 -0
- package/dist/forms/index.d.mts +437 -0
- package/dist/forms/index.d.ts +437 -0
- package/dist/forms/index.js +1168 -0
- package/dist/forms/index.js.map +1 -0
- package/dist/forms/index.mjs +1142 -0
- package/dist/forms/index.mjs.map +1 -0
- package/dist/generators-2XKQMPKH.mjs +4 -0
- package/dist/generators-2XKQMPKH.mjs.map +1 -0
- package/dist/generators-DTMO36DV.js +33 -0
- package/dist/generators-DTMO36DV.js.map +1 -0
- package/dist/images/index.d.mts +4 -0
- package/dist/images/index.d.ts +4 -0
- package/dist/images/index.js +46 -0
- package/dist/images/index.js.map +1 -0
- package/dist/images/index.mjs +5 -0
- package/dist/images/index.mjs.map +1 -0
- package/dist/images/server.d.mts +69 -0
- package/dist/images/server.d.ts +69 -0
- package/dist/images/server.js +21 -0
- package/dist/images/server.js.map +1 -0
- package/dist/images/server.mjs +4 -0
- package/dist/images/server.mjs.map +1 -0
- package/dist/index.d.mts +846 -0
- package/dist/index.d.ts +846 -0
- package/dist/index.js +2623 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2416 -0
- package/dist/index.mjs.map +1 -0
- package/dist/layout/index.d.mts +53 -0
- package/dist/layout/index.d.ts +53 -0
- package/dist/layout/index.js +187 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/index.mjs +185 -0
- package/dist/layout/index.mjs.map +1 -0
- package/dist/llms/index.d.mts +448 -0
- package/dist/llms/index.d.ts +448 -0
- package/dist/llms/index.js +581 -0
- package/dist/llms/index.js.map +1 -0
- package/dist/llms/index.mjs +529 -0
- package/dist/llms/index.mjs.map +1 -0
- package/dist/manifest/index.d.mts +62 -0
- package/dist/manifest/index.d.ts +62 -0
- package/dist/manifest/index.js +85 -0
- package/dist/manifest/index.js.map +1 -0
- package/dist/manifest/index.mjs +83 -0
- package/dist/manifest/index.mjs.map +1 -0
- package/dist/middleware/index.d.mts +63 -0
- package/dist/middleware/index.d.ts +63 -0
- package/dist/middleware/index.js +54 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/index.mjs +51 -0
- package/dist/middleware/index.mjs.map +1 -0
- package/dist/migrator-2MQHOFDQ.mjs +4 -0
- package/dist/migrator-2MQHOFDQ.mjs.map +1 -0
- package/dist/migrator-THJCF6MZ.js +37 -0
- package/dist/migrator-THJCF6MZ.js.map +1 -0
- package/dist/redirects/index.d.mts +78 -0
- package/dist/redirects/index.d.ts +78 -0
- package/dist/redirects/index.js +26 -0
- package/dist/redirects/index.js.map +1 -0
- package/dist/redirects/index.mjs +5 -0
- package/dist/redirects/index.mjs.map +1 -0
- package/dist/reputation/index.d.mts +57 -0
- package/dist/reputation/index.d.ts +57 -0
- package/dist/reputation/index.js +21 -0
- package/dist/reputation/index.js.map +1 -0
- package/dist/reputation/index.mjs +4 -0
- package/dist/reputation/index.mjs.map +1 -0
- package/dist/robots/index.d.mts +38 -0
- package/dist/robots/index.d.ts +38 -0
- package/dist/robots/index.js +52 -0
- package/dist/robots/index.js.map +1 -0
- package/dist/robots/index.mjs +50 -0
- package/dist/robots/index.mjs.map +1 -0
- package/dist/routing-B5XS-6_W.d.mts +118 -0
- package/dist/routing-DZYzyDHw.d.ts +118 -0
- package/dist/scanner-GAF5PO5F.js +53 -0
- package/dist/scanner-GAF5PO5F.js.map +1 -0
- package/dist/scanner-LKJKW7IT.mjs +4 -0
- package/dist/scanner-LKJKW7IT.mjs.map +1 -0
- package/dist/securityHeaders-nwZ6nP4g.d.mts +24 -0
- package/dist/securityHeaders-nwZ6nP4g.d.ts +24 -0
- package/dist/seo/index.d.mts +600 -0
- package/dist/seo/index.d.ts +600 -0
- package/dist/seo/index.js +883 -0
- package/dist/seo/index.js.map +1 -0
- package/dist/seo/index.mjs +773 -0
- package/dist/seo/index.mjs.map +1 -0
- package/dist/seo/register-sitemap-cli.js +151 -0
- package/dist/seo/register-sitemap-cli.js.map +1 -0
- package/dist/seo/register-sitemap-cli.mjs +144 -0
- package/dist/seo/register-sitemap-cli.mjs.map +1 -0
- package/dist/seo/server.d.mts +107 -0
- package/dist/seo/server.d.ts +107 -0
- package/dist/seo/server.js +207 -0
- package/dist/seo/server.js.map +1 -0
- package/dist/seo/server.mjs +186 -0
- package/dist/seo/server.mjs.map +1 -0
- package/dist/server-api-EWXKOQZA.mjs +4 -0
- package/dist/server-api-EWXKOQZA.mjs.map +1 -0
- package/dist/server-api-GJPNRYUP.js +81 -0
- package/dist/server-api-GJPNRYUP.js.map +1 -0
- package/dist/setup/client.d.mts +60 -0
- package/dist/setup/client.d.ts +60 -0
- package/dist/setup/client.js +31 -0
- package/dist/setup/client.js.map +1 -0
- package/dist/setup/client.mjs +6 -0
- package/dist/setup/client.mjs.map +1 -0
- package/dist/setup/index.d.mts +5 -0
- package/dist/setup/index.d.ts +5 -0
- package/dist/setup/index.js +35 -0
- package/dist/setup/index.js.map +1 -0
- package/dist/setup/index.mjs +6 -0
- package/dist/setup/index.mjs.map +1 -0
- package/dist/setup/server.d.mts +14 -0
- package/dist/setup/server.d.ts +14 -0
- package/dist/setup/server.js +13 -0
- package/dist/setup/server.js.map +1 -0
- package/dist/setup/server.mjs +4 -0
- package/dist/setup/server.mjs.map +1 -0
- package/dist/site-config/index.d.mts +24 -0
- package/dist/site-config/index.d.ts +24 -0
- package/dist/site-config/index.js +17 -0
- package/dist/site-config/index.js.map +1 -0
- package/dist/site-config/index.mjs +4 -0
- package/dist/site-config/index.mjs.map +1 -0
- package/dist/sitemap/index.d.mts +96 -0
- package/dist/sitemap/index.d.ts +96 -0
- package/dist/sitemap/index.js +288 -0
- package/dist/sitemap/index.js.map +1 -0
- package/dist/sitemap/index.mjs +285 -0
- package/dist/sitemap/index.mjs.map +1 -0
- package/dist/socket-loader-J26QHHOB.js +16 -0
- package/dist/socket-loader-J26QHHOB.js.map +1 -0
- package/dist/socket-loader-R7S2YJ2J.mjs +14 -0
- package/dist/socket-loader-R7S2YJ2J.mjs.map +1 -0
- package/dist/types-0dmq3k20.d.mts +168 -0
- package/dist/types-0dmq3k20.d.ts +168 -0
- package/dist/types-Blb2QNkV.d.mts +263 -0
- package/dist/types-Blb2QNkV.d.ts +263 -0
- package/dist/types-BnCwwUX3.d.mts +250 -0
- package/dist/types-BnCwwUX3.d.ts +250 -0
- package/dist/types-CGlnp43R.d.mts +312 -0
- package/dist/types-CGlnp43R.d.ts +312 -0
- package/dist/types-D08004rU.d.mts +179 -0
- package/dist/types-D08004rU.d.ts +179 -0
- package/dist/types-DNSYU7qI.d.mts +127 -0
- package/dist/types-DNSYU7qI.d.ts +127 -0
- package/dist/types-KZP_VWZp.d.mts +266 -0
- package/dist/types-KZP_VWZp.d.ts +266 -0
- package/dist/useEventModal-BVTx69XE.d.mts +274 -0
- package/dist/useEventModal-Dx1dItTJ.d.ts +274 -0
- package/dist/web-vitals-444RLW3B.js +252 -0
- package/dist/web-vitals-444RLW3B.js.map +1 -0
- package/dist/web-vitals-KPICZIEF.mjs +241 -0
- package/dist/web-vitals-KPICZIEF.mjs.map +1 -0
- package/package.json +192 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useAnalytics } from '../chunk-M2T6R7BA.mjs';
|
|
3
|
+
export { AnalyticsProvider, WebVitals, useAnalytics, useTrackEvent } from '../chunk-M2T6R7BA.mjs';
|
|
4
|
+
import '../chunk-4XPGGLVP.mjs';
|
|
5
|
+
import { useCallback, useEffect } from 'react';
|
|
6
|
+
|
|
7
|
+
function useContactTracking(options = {}) {
|
|
8
|
+
const { autoTrack = true, debug = false } = options;
|
|
9
|
+
const { trackConversion } = useAnalytics();
|
|
10
|
+
const trackPhoneClick = useCallback((phoneNumber, metadata) => {
|
|
11
|
+
if (debug) console.log("[Analytics] Phone click:", phoneNumber);
|
|
12
|
+
trackConversion({
|
|
13
|
+
type: "phone_call",
|
|
14
|
+
metadata: {
|
|
15
|
+
phoneNumber: phoneNumber.replace(/\D/g, ""),
|
|
16
|
+
// Normalize to digits
|
|
17
|
+
rawNumber: phoneNumber,
|
|
18
|
+
...metadata
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}, [trackConversion, debug]);
|
|
22
|
+
const trackEmailClick = useCallback((email, metadata) => {
|
|
23
|
+
if (debug) console.log("[Analytics] Email click:", email);
|
|
24
|
+
trackConversion({
|
|
25
|
+
type: "email_click",
|
|
26
|
+
metadata: {
|
|
27
|
+
email,
|
|
28
|
+
...metadata
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}, [trackConversion, debug]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (!autoTrack || typeof document === "undefined") return;
|
|
34
|
+
const handleClick = (e) => {
|
|
35
|
+
const target = e.target;
|
|
36
|
+
const anchor = target.closest("a");
|
|
37
|
+
if (!anchor) return;
|
|
38
|
+
const href = anchor.getAttribute("href");
|
|
39
|
+
if (!href) return;
|
|
40
|
+
if (href.startsWith("tel:")) {
|
|
41
|
+
const phone = href.replace("tel:", "").trim();
|
|
42
|
+
trackPhoneClick(phone, {
|
|
43
|
+
linkText: anchor.textContent?.trim(),
|
|
44
|
+
source: "auto"
|
|
45
|
+
});
|
|
46
|
+
} else if (href.startsWith("mailto:")) {
|
|
47
|
+
const email = href.replace("mailto:", "").split("?")[0].trim();
|
|
48
|
+
trackEmailClick(email, {
|
|
49
|
+
linkText: anchor.textContent?.trim(),
|
|
50
|
+
source: "auto"
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
document.addEventListener("click", handleClick, { capture: true });
|
|
55
|
+
return () => {
|
|
56
|
+
document.removeEventListener("click", handleClick, { capture: true });
|
|
57
|
+
};
|
|
58
|
+
}, [autoTrack, trackPhoneClick, trackEmailClick]);
|
|
59
|
+
return {
|
|
60
|
+
trackPhoneClick,
|
|
61
|
+
trackEmailClick
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function ContactTracking({ debug = false }) {
|
|
65
|
+
useContactTracking({ autoTrack: true, debug });
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { ContactTracking, useContactTracking };
|
|
70
|
+
//# sourceMappingURL=index.mjs.map
|
|
71
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/analytics/useContactTracking.ts"],"names":[],"mappings":"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","file":"index.mjs","sourcesContent":["/**\n * @sonordev/site-kit/analytics - Contact Tracking Hook\n * \n * Tracks phone calls and email clicks as conversions.\n * Use this hook to automatically track tel: and mailto: links,\n * or manually track contact interactions.\n */\n\n'use client'\n\nimport { useCallback, useEffect } from 'react'\nimport { useAnalytics } from './AnalyticsProvider'\n\nexport interface UseContactTrackingOptions {\n /** Automatically track all tel: and mailto: links (default: true) */\n autoTrack?: boolean\n /** Debug mode - logs events to console */\n debug?: boolean\n}\n\nexport interface ContactTrackingReturn {\n /** Manually track a phone call click */\n trackPhoneClick: (phoneNumber: string, metadata?: Record<string, unknown>) => void\n /** Manually track an email click */\n trackEmailClick: (email: string, metadata?: Record<string, unknown>) => void\n}\n\n/**\n * Hook for tracking phone and email contact interactions as conversions.\n * \n * @example\n * ```tsx\n * // Auto-track all tel: and mailto: links\n * useContactTracking()\n * \n * // Manual tracking\n * const { trackPhoneClick, trackEmailClick } = useContactTracking()\n * trackPhoneClick('513-555-1234')\n * trackEmailClick('hello@example.com')\n * ```\n */\nexport function useContactTracking(options: UseContactTrackingOptions = {}): ContactTrackingReturn {\n const { autoTrack = true, debug = false } = options\n const { trackConversion } = useAnalytics()\n \n const trackPhoneClick = useCallback((phoneNumber: string, metadata?: Record<string, unknown>) => {\n if (debug) console.log('[Analytics] Phone click:', phoneNumber)\n \n trackConversion({\n type: 'phone_call',\n metadata: {\n phoneNumber: phoneNumber.replace(/\\D/g, ''), // Normalize to digits\n rawNumber: phoneNumber,\n ...metadata,\n },\n })\n }, [trackConversion, debug])\n \n const trackEmailClick = useCallback((email: string, metadata?: Record<string, unknown>) => {\n if (debug) console.log('[Analytics] Email click:', email)\n \n trackConversion({\n type: 'email_click',\n metadata: {\n email,\n ...metadata,\n },\n })\n }, [trackConversion, debug])\n \n // Auto-track tel: and mailto: links\n useEffect(() => {\n if (!autoTrack || typeof document === 'undefined') return\n \n const handleClick = (e: MouseEvent) => {\n const target = e.target as HTMLElement\n const anchor = target.closest('a')\n if (!anchor) return\n \n const href = anchor.getAttribute('href')\n if (!href) return\n \n if (href.startsWith('tel:')) {\n const phone = href.replace('tel:', '').trim()\n trackPhoneClick(phone, {\n linkText: anchor.textContent?.trim(),\n source: 'auto',\n })\n } else if (href.startsWith('mailto:')) {\n const email = href.replace('mailto:', '').split('?')[0].trim()\n trackEmailClick(email, {\n linkText: anchor.textContent?.trim(),\n source: 'auto',\n })\n }\n }\n \n document.addEventListener('click', handleClick, { capture: true })\n \n return () => {\n document.removeEventListener('click', handleClick, { capture: true })\n }\n }, [autoTrack, trackPhoneClick, trackEmailClick])\n \n return {\n trackPhoneClick,\n trackEmailClick,\n }\n}\n\n/**\n * Component wrapper for contact tracking\n * Simply include this component to auto-track all tel: and mailto: links\n * \n * @example\n * ```tsx\n * <ContactTracking />\n * ```\n */\nexport function ContactTracking({ debug = false }: { debug?: boolean }) {\n useContactTracking({ autoTrack: true, debug })\n return null\n}\n"]}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
interface ManagedImageData {
|
|
5
|
+
id: string;
|
|
6
|
+
slot_id: string;
|
|
7
|
+
page_path: string | null;
|
|
8
|
+
file_id: string | null;
|
|
9
|
+
external_url: string | null;
|
|
10
|
+
alt_text: string | null;
|
|
11
|
+
title: string | null;
|
|
12
|
+
caption: string | null;
|
|
13
|
+
focal_point_x: number;
|
|
14
|
+
focal_point_y: number;
|
|
15
|
+
aspect_ratio: string | null;
|
|
16
|
+
public_url?: string;
|
|
17
|
+
is_placeholder: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface ImageFile {
|
|
20
|
+
id: string;
|
|
21
|
+
filename: string;
|
|
22
|
+
storage_path: string;
|
|
23
|
+
mime_type: string;
|
|
24
|
+
file_size: number;
|
|
25
|
+
folder_path: string | null;
|
|
26
|
+
public_url?: string;
|
|
27
|
+
}
|
|
28
|
+
interface ManagedImageProps {
|
|
29
|
+
/** API key for Portal API */
|
|
30
|
+
apiKey?: string;
|
|
31
|
+
/** API URL (defaults to https://api.uptrademedia.com) */
|
|
32
|
+
apiUrl?: string;
|
|
33
|
+
/** Unique slot identifier (e.g., 'hero-background', 'about-team-1') */
|
|
34
|
+
slotId: string;
|
|
35
|
+
/** Page path for page-specific slots (defaults to current path) */
|
|
36
|
+
pagePath?: string;
|
|
37
|
+
/** Fallback alt text if not set in Portal */
|
|
38
|
+
alt?: string;
|
|
39
|
+
/** CSS class names */
|
|
40
|
+
className?: string;
|
|
41
|
+
/** Image width */
|
|
42
|
+
width?: number | string;
|
|
43
|
+
/** Image height */
|
|
44
|
+
height?: number | string;
|
|
45
|
+
/** CSS object-fit property */
|
|
46
|
+
objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
47
|
+
/** Fallback image URL when no image assigned */
|
|
48
|
+
fallback?: string;
|
|
49
|
+
/** Custom placeholder component */
|
|
50
|
+
placeholder?: React__default.ReactNode;
|
|
51
|
+
/** Called when image loads */
|
|
52
|
+
onLoad?: () => void;
|
|
53
|
+
/** Called on error */
|
|
54
|
+
onError?: (error: Error) => void;
|
|
55
|
+
/** Priority loading (Next.js Image optimization) */
|
|
56
|
+
priority?: boolean;
|
|
57
|
+
/** Additional styles */
|
|
58
|
+
style?: React__default.CSSProperties;
|
|
59
|
+
/** Enable dev picker even outside dev mode */
|
|
60
|
+
forceDevMode?: boolean;
|
|
61
|
+
}
|
|
62
|
+
declare function ManagedImage({ apiKey, apiUrl, slotId, pagePath, alt, className, width, height, objectFit, fallback, placeholder, onLoad, onError, priority, style, forceDevMode, }: ManagedImageProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Images API functions
|
|
66
|
+
*
|
|
67
|
+
* All functions use Portal API with API key authentication.
|
|
68
|
+
* Never makes direct Supabase calls.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
interface ImageApiConfig {
|
|
72
|
+
apiUrl: string;
|
|
73
|
+
apiKey: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Fetch a managed image for a specific slot
|
|
77
|
+
*/
|
|
78
|
+
declare function fetchManagedImage(config: ImageApiConfig, slotId: string, pagePath?: string): Promise<{
|
|
79
|
+
image: ManagedImageData | null;
|
|
80
|
+
is_placeholder: boolean;
|
|
81
|
+
}>;
|
|
82
|
+
/**
|
|
83
|
+
* Fetch all managed images for the project
|
|
84
|
+
*/
|
|
85
|
+
declare function fetchManagedImages(config: ImageApiConfig, options?: {
|
|
86
|
+
pagePath?: string;
|
|
87
|
+
category?: string;
|
|
88
|
+
includePlaceholders?: boolean;
|
|
89
|
+
}): Promise<{
|
|
90
|
+
images: ManagedImageData[];
|
|
91
|
+
}>;
|
|
92
|
+
/**
|
|
93
|
+
* List available image files in the project
|
|
94
|
+
*/
|
|
95
|
+
declare function listImageFiles(config: ImageApiConfig, options?: {
|
|
96
|
+
folder?: string;
|
|
97
|
+
search?: string;
|
|
98
|
+
}): Promise<{
|
|
99
|
+
files: ImageFile[];
|
|
100
|
+
folders: string[];
|
|
101
|
+
}>;
|
|
102
|
+
/**
|
|
103
|
+
* Upload a new image
|
|
104
|
+
*/
|
|
105
|
+
declare function uploadImage(config: ImageApiConfig, file: File, options?: {
|
|
106
|
+
slotId?: string;
|
|
107
|
+
pagePath?: string;
|
|
108
|
+
folder?: string;
|
|
109
|
+
altText?: string;
|
|
110
|
+
}): Promise<{
|
|
111
|
+
file: ImageFile;
|
|
112
|
+
image?: ManagedImageData;
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* Assign an existing file to an image slot
|
|
116
|
+
*/
|
|
117
|
+
declare function assignImageToSlot(config: ImageApiConfig, slotId: string, options: {
|
|
118
|
+
fileId?: string;
|
|
119
|
+
externalUrl?: string;
|
|
120
|
+
pagePath?: string;
|
|
121
|
+
altText?: string;
|
|
122
|
+
title?: string;
|
|
123
|
+
caption?: string;
|
|
124
|
+
focalPointX?: number;
|
|
125
|
+
focalPointY?: number;
|
|
126
|
+
aspectRatio?: string;
|
|
127
|
+
}): Promise<{
|
|
128
|
+
image: ManagedImageData;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* Clear an image from a slot (keeps the file)
|
|
132
|
+
*/
|
|
133
|
+
declare function clearImageSlot(config: ImageApiConfig, slotId: string, pagePath?: string): Promise<{
|
|
134
|
+
success: boolean;
|
|
135
|
+
}>;
|
|
136
|
+
|
|
137
|
+
export { type ImageFile as I, ManagedImage as M, type ManagedImageProps as a, type ManagedImageData as b, fetchManagedImages as c, assignImageToSlot as d, clearImageSlot as e, fetchManagedImage as f, type ImageApiConfig as g, listImageFiles as l, uploadImage as u };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
interface ManagedImageData {
|
|
5
|
+
id: string;
|
|
6
|
+
slot_id: string;
|
|
7
|
+
page_path: string | null;
|
|
8
|
+
file_id: string | null;
|
|
9
|
+
external_url: string | null;
|
|
10
|
+
alt_text: string | null;
|
|
11
|
+
title: string | null;
|
|
12
|
+
caption: string | null;
|
|
13
|
+
focal_point_x: number;
|
|
14
|
+
focal_point_y: number;
|
|
15
|
+
aspect_ratio: string | null;
|
|
16
|
+
public_url?: string;
|
|
17
|
+
is_placeholder: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface ImageFile {
|
|
20
|
+
id: string;
|
|
21
|
+
filename: string;
|
|
22
|
+
storage_path: string;
|
|
23
|
+
mime_type: string;
|
|
24
|
+
file_size: number;
|
|
25
|
+
folder_path: string | null;
|
|
26
|
+
public_url?: string;
|
|
27
|
+
}
|
|
28
|
+
interface ManagedImageProps {
|
|
29
|
+
/** API key for Portal API */
|
|
30
|
+
apiKey?: string;
|
|
31
|
+
/** API URL (defaults to https://api.uptrademedia.com) */
|
|
32
|
+
apiUrl?: string;
|
|
33
|
+
/** Unique slot identifier (e.g., 'hero-background', 'about-team-1') */
|
|
34
|
+
slotId: string;
|
|
35
|
+
/** Page path for page-specific slots (defaults to current path) */
|
|
36
|
+
pagePath?: string;
|
|
37
|
+
/** Fallback alt text if not set in Portal */
|
|
38
|
+
alt?: string;
|
|
39
|
+
/** CSS class names */
|
|
40
|
+
className?: string;
|
|
41
|
+
/** Image width */
|
|
42
|
+
width?: number | string;
|
|
43
|
+
/** Image height */
|
|
44
|
+
height?: number | string;
|
|
45
|
+
/** CSS object-fit property */
|
|
46
|
+
objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
47
|
+
/** Fallback image URL when no image assigned */
|
|
48
|
+
fallback?: string;
|
|
49
|
+
/** Custom placeholder component */
|
|
50
|
+
placeholder?: React__default.ReactNode;
|
|
51
|
+
/** Called when image loads */
|
|
52
|
+
onLoad?: () => void;
|
|
53
|
+
/** Called on error */
|
|
54
|
+
onError?: (error: Error) => void;
|
|
55
|
+
/** Priority loading (Next.js Image optimization) */
|
|
56
|
+
priority?: boolean;
|
|
57
|
+
/** Additional styles */
|
|
58
|
+
style?: React__default.CSSProperties;
|
|
59
|
+
/** Enable dev picker even outside dev mode */
|
|
60
|
+
forceDevMode?: boolean;
|
|
61
|
+
}
|
|
62
|
+
declare function ManagedImage({ apiKey, apiUrl, slotId, pagePath, alt, className, width, height, objectFit, fallback, placeholder, onLoad, onError, priority, style, forceDevMode, }: ManagedImageProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Images API functions
|
|
66
|
+
*
|
|
67
|
+
* All functions use Portal API with API key authentication.
|
|
68
|
+
* Never makes direct Supabase calls.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
interface ImageApiConfig {
|
|
72
|
+
apiUrl: string;
|
|
73
|
+
apiKey: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Fetch a managed image for a specific slot
|
|
77
|
+
*/
|
|
78
|
+
declare function fetchManagedImage(config: ImageApiConfig, slotId: string, pagePath?: string): Promise<{
|
|
79
|
+
image: ManagedImageData | null;
|
|
80
|
+
is_placeholder: boolean;
|
|
81
|
+
}>;
|
|
82
|
+
/**
|
|
83
|
+
* Fetch all managed images for the project
|
|
84
|
+
*/
|
|
85
|
+
declare function fetchManagedImages(config: ImageApiConfig, options?: {
|
|
86
|
+
pagePath?: string;
|
|
87
|
+
category?: string;
|
|
88
|
+
includePlaceholders?: boolean;
|
|
89
|
+
}): Promise<{
|
|
90
|
+
images: ManagedImageData[];
|
|
91
|
+
}>;
|
|
92
|
+
/**
|
|
93
|
+
* List available image files in the project
|
|
94
|
+
*/
|
|
95
|
+
declare function listImageFiles(config: ImageApiConfig, options?: {
|
|
96
|
+
folder?: string;
|
|
97
|
+
search?: string;
|
|
98
|
+
}): Promise<{
|
|
99
|
+
files: ImageFile[];
|
|
100
|
+
folders: string[];
|
|
101
|
+
}>;
|
|
102
|
+
/**
|
|
103
|
+
* Upload a new image
|
|
104
|
+
*/
|
|
105
|
+
declare function uploadImage(config: ImageApiConfig, file: File, options?: {
|
|
106
|
+
slotId?: string;
|
|
107
|
+
pagePath?: string;
|
|
108
|
+
folder?: string;
|
|
109
|
+
altText?: string;
|
|
110
|
+
}): Promise<{
|
|
111
|
+
file: ImageFile;
|
|
112
|
+
image?: ManagedImageData;
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* Assign an existing file to an image slot
|
|
116
|
+
*/
|
|
117
|
+
declare function assignImageToSlot(config: ImageApiConfig, slotId: string, options: {
|
|
118
|
+
fileId?: string;
|
|
119
|
+
externalUrl?: string;
|
|
120
|
+
pagePath?: string;
|
|
121
|
+
altText?: string;
|
|
122
|
+
title?: string;
|
|
123
|
+
caption?: string;
|
|
124
|
+
focalPointX?: number;
|
|
125
|
+
focalPointY?: number;
|
|
126
|
+
aspectRatio?: string;
|
|
127
|
+
}): Promise<{
|
|
128
|
+
image: ManagedImageData;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* Clear an image from a slot (keeps the file)
|
|
132
|
+
*/
|
|
133
|
+
declare function clearImageSlot(config: ImageApiConfig, slotId: string, pagePath?: string): Promise<{
|
|
134
|
+
success: boolean;
|
|
135
|
+
}>;
|
|
136
|
+
|
|
137
|
+
export { type ImageFile as I, ManagedImage as M, type ManagedImageProps as a, type ManagedImageData as b, fetchManagedImages as c, assignImageToSlot as d, clearImageSlot as e, fetchManagedImage as f, type ImageApiConfig as g, listImageFiles as l, uploadImage as u };
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { B as BlogPost$1, T as TocItem, a as BlogListResult, b as BlogCategory, A as AuthorCardProps, c as TableOfContentsProps } from '../types-D08004rU.mjs';
|
|
4
|
+
export { k as BlogAnalytics, d as BlogAuthor, f as BlogListOptions, i as BlogListProps, j as BlogListRenderProps, g as BlogPostProps, h as BlogPostRenderProps, e as BlogTag, R as RelatedPostsProps } from '../types-D08004rU.mjs';
|
|
5
|
+
|
|
6
|
+
interface BlogPostStyles {
|
|
7
|
+
/** Article wrapper */
|
|
8
|
+
article?: string;
|
|
9
|
+
/** Header section */
|
|
10
|
+
header?: string;
|
|
11
|
+
/** Breadcrumb navigation */
|
|
12
|
+
breadcrumb?: string;
|
|
13
|
+
/** Breadcrumb link */
|
|
14
|
+
breadcrumbLink?: string;
|
|
15
|
+
/** Post title (h1) */
|
|
16
|
+
title?: string;
|
|
17
|
+
/** Post subtitle */
|
|
18
|
+
subtitle?: string;
|
|
19
|
+
/** Meta info row */
|
|
20
|
+
meta?: string;
|
|
21
|
+
/** Meta item */
|
|
22
|
+
metaItem?: string;
|
|
23
|
+
/** Featured image wrapper */
|
|
24
|
+
featuredImageWrapper?: string;
|
|
25
|
+
/** Featured image */
|
|
26
|
+
featuredImage?: string;
|
|
27
|
+
/** Content layout (grid with TOC) */
|
|
28
|
+
contentLayout?: string;
|
|
29
|
+
/** Main content wrapper */
|
|
30
|
+
content?: string;
|
|
31
|
+
/** Table of contents sidebar */
|
|
32
|
+
tocSidebar?: string;
|
|
33
|
+
/** TOC title */
|
|
34
|
+
tocTitle?: string;
|
|
35
|
+
/** TOC list */
|
|
36
|
+
tocList?: string;
|
|
37
|
+
/** TOC list item */
|
|
38
|
+
tocItem?: string;
|
|
39
|
+
/** TOC link */
|
|
40
|
+
tocLink?: string;
|
|
41
|
+
/** Tags container */
|
|
42
|
+
tags?: string;
|
|
43
|
+
/** Individual tag */
|
|
44
|
+
tag?: string;
|
|
45
|
+
/** FAQ section */
|
|
46
|
+
faqSection?: string;
|
|
47
|
+
/** FAQ title */
|
|
48
|
+
faqTitle?: string;
|
|
49
|
+
/** FAQ item container */
|
|
50
|
+
faqItem?: string;
|
|
51
|
+
/** FAQ question (summary) */
|
|
52
|
+
faqQuestion?: string;
|
|
53
|
+
/** FAQ answer */
|
|
54
|
+
faqAnswer?: string;
|
|
55
|
+
/** Author card section */
|
|
56
|
+
authorCard?: string;
|
|
57
|
+
/** Related posts section */
|
|
58
|
+
relatedSection?: string;
|
|
59
|
+
/** Related posts title */
|
|
60
|
+
relatedTitle?: string;
|
|
61
|
+
/** Related posts grid */
|
|
62
|
+
relatedGrid?: string;
|
|
63
|
+
/** Related post card */
|
|
64
|
+
relatedCard?: string;
|
|
65
|
+
/** Not found state */
|
|
66
|
+
notFound?: string;
|
|
67
|
+
}
|
|
68
|
+
interface BlogPostServerProps {
|
|
69
|
+
/** Portal API URL */
|
|
70
|
+
apiUrl?: string;
|
|
71
|
+
/** Project API key */
|
|
72
|
+
apiKey?: string;
|
|
73
|
+
/** Blog post slug */
|
|
74
|
+
slug: string;
|
|
75
|
+
/** Show table of contents sidebar */
|
|
76
|
+
showToc?: boolean;
|
|
77
|
+
/** Show related posts */
|
|
78
|
+
showRelated?: boolean;
|
|
79
|
+
/** Number of related posts */
|
|
80
|
+
relatedCount?: number;
|
|
81
|
+
/** Show author card */
|
|
82
|
+
showAuthor?: boolean;
|
|
83
|
+
/** Base URL for blog links */
|
|
84
|
+
basePath?: string;
|
|
85
|
+
/** Custom class name (applied to article) */
|
|
86
|
+
className?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Custom Tailwind/CSS classes for each element.
|
|
89
|
+
* When provided, inline styles are disabled for that element.
|
|
90
|
+
*/
|
|
91
|
+
styles?: BlogPostStyles;
|
|
92
|
+
/** Use CSS classes only (no inline styles) - set to true for Tailwind sites */
|
|
93
|
+
unstyled?: boolean;
|
|
94
|
+
/** Custom render function */
|
|
95
|
+
children?: (props: {
|
|
96
|
+
post: BlogPost$1;
|
|
97
|
+
tableOfContents: TocItem[];
|
|
98
|
+
relatedPosts: BlogPost$1[];
|
|
99
|
+
}) => React__default.ReactNode;
|
|
100
|
+
}
|
|
101
|
+
declare function BlogPost({ apiUrl, apiKey, slug, showToc, showRelated, relatedCount, showAuthor, basePath, className, styles, unstyled, children, }: BlogPostServerProps): Promise<string | number | bigint | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined>;
|
|
102
|
+
|
|
103
|
+
interface BlogListStyles {
|
|
104
|
+
/** Container wrapper */
|
|
105
|
+
container?: string;
|
|
106
|
+
/** Category navigation wrapper */
|
|
107
|
+
categoryNav?: string;
|
|
108
|
+
/** Individual category link */
|
|
109
|
+
categoryLink?: string;
|
|
110
|
+
/** Active category link (combined with categoryLink) */
|
|
111
|
+
categoryLinkActive?: string;
|
|
112
|
+
/** Inactive category link (combined with categoryLink) */
|
|
113
|
+
categoryLinkInactive?: string;
|
|
114
|
+
/** Posts grid container */
|
|
115
|
+
grid?: string;
|
|
116
|
+
/** Individual post card */
|
|
117
|
+
card?: string;
|
|
118
|
+
/** Card image wrapper */
|
|
119
|
+
cardImageWrapper?: string;
|
|
120
|
+
/** Card image */
|
|
121
|
+
cardImage?: string;
|
|
122
|
+
/** Card body/content area */
|
|
123
|
+
cardBody?: string;
|
|
124
|
+
/** Card meta row (date, category) */
|
|
125
|
+
cardMeta?: string;
|
|
126
|
+
/** Card category badge */
|
|
127
|
+
cardCategory?: string;
|
|
128
|
+
/** Card date */
|
|
129
|
+
cardDate?: string;
|
|
130
|
+
/** Card title */
|
|
131
|
+
cardTitle?: string;
|
|
132
|
+
/** Card title link */
|
|
133
|
+
cardTitleLink?: string;
|
|
134
|
+
/** Card excerpt */
|
|
135
|
+
cardExcerpt?: string;
|
|
136
|
+
/** Card footer */
|
|
137
|
+
cardFooter?: string;
|
|
138
|
+
/** Card author */
|
|
139
|
+
cardAuthor?: string;
|
|
140
|
+
/** Card reading time */
|
|
141
|
+
cardReadingTime?: string;
|
|
142
|
+
/** Card read more link */
|
|
143
|
+
cardReadMore?: string;
|
|
144
|
+
/** Pagination container */
|
|
145
|
+
pagination?: string;
|
|
146
|
+
/** Pagination link */
|
|
147
|
+
paginationLink?: string;
|
|
148
|
+
/** Pagination info text */
|
|
149
|
+
paginationInfo?: string;
|
|
150
|
+
/** Empty state */
|
|
151
|
+
emptyState?: string;
|
|
152
|
+
}
|
|
153
|
+
interface BlogListServerProps {
|
|
154
|
+
/** Portal API URL */
|
|
155
|
+
apiUrl?: string;
|
|
156
|
+
/** Project API key */
|
|
157
|
+
apiKey?: string;
|
|
158
|
+
/** Filter by category slug */
|
|
159
|
+
category?: string;
|
|
160
|
+
/** Filter by tag */
|
|
161
|
+
tag?: string;
|
|
162
|
+
/** Filter by author */
|
|
163
|
+
author?: string;
|
|
164
|
+
/** Only featured posts */
|
|
165
|
+
featured?: boolean;
|
|
166
|
+
/** Search query */
|
|
167
|
+
search?: string;
|
|
168
|
+
/** Page number (1-indexed) */
|
|
169
|
+
page?: number;
|
|
170
|
+
/** Items per page */
|
|
171
|
+
perPage?: number;
|
|
172
|
+
/** Sort field */
|
|
173
|
+
orderBy?: 'published_at' | 'title' | 'view_count';
|
|
174
|
+
/** Sort direction */
|
|
175
|
+
order?: 'asc' | 'desc';
|
|
176
|
+
/** Show category filter UI */
|
|
177
|
+
showCategoryFilter?: boolean;
|
|
178
|
+
/** Show pagination */
|
|
179
|
+
showPagination?: boolean;
|
|
180
|
+
/** Custom class name (applied to container) */
|
|
181
|
+
className?: string;
|
|
182
|
+
/** Base URL for post links */
|
|
183
|
+
basePath?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Custom Tailwind/CSS classes for each element.
|
|
186
|
+
* When provided, inline styles are disabled for that element.
|
|
187
|
+
*/
|
|
188
|
+
styles?: BlogListStyles;
|
|
189
|
+
/** Use CSS classes only (no inline styles) - set to true for Tailwind sites */
|
|
190
|
+
unstyled?: boolean;
|
|
191
|
+
/** Custom render function for post card */
|
|
192
|
+
renderPost?: (post: BlogPost$1) => React__default.ReactNode;
|
|
193
|
+
/** Custom render function for entire grid */
|
|
194
|
+
children?: (props: {
|
|
195
|
+
posts: BlogPost$1[];
|
|
196
|
+
pagination: BlogListResult['pagination'];
|
|
197
|
+
categories: BlogCategory[];
|
|
198
|
+
}) => React__default.ReactNode;
|
|
199
|
+
}
|
|
200
|
+
declare function BlogList({ apiUrl, apiKey, category, tag, author, featured, search, page, perPage, orderBy, order, showCategoryFilter, showPagination, className, basePath, styles, unstyled, renderPost, children, }: BlogListServerProps): Promise<string | number | bigint | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined>;
|
|
201
|
+
|
|
202
|
+
interface BlogSidebarProps {
|
|
203
|
+
/** Portal API URL */
|
|
204
|
+
apiUrl?: string;
|
|
205
|
+
/** Project API key */
|
|
206
|
+
apiKey?: string;
|
|
207
|
+
/** Show categories widget */
|
|
208
|
+
showCategories?: boolean;
|
|
209
|
+
/** Show recent posts widget */
|
|
210
|
+
showRecentPosts?: boolean;
|
|
211
|
+
/** Number of recent posts to show */
|
|
212
|
+
recentPostsCount?: number;
|
|
213
|
+
/** Show tags widget */
|
|
214
|
+
showTags?: boolean;
|
|
215
|
+
/** Show search widget */
|
|
216
|
+
showSearch?: boolean;
|
|
217
|
+
/** Base URL for blog links */
|
|
218
|
+
basePath?: string;
|
|
219
|
+
/** Custom class name */
|
|
220
|
+
className?: string;
|
|
221
|
+
/** Current category filter (for highlighting) */
|
|
222
|
+
currentCategory?: string;
|
|
223
|
+
/** Additional widgets to render */
|
|
224
|
+
children?: React__default.ReactNode;
|
|
225
|
+
}
|
|
226
|
+
declare function BlogSidebar({ apiUrl, apiKey, showCategories, showRecentPosts, recentPostsCount, showTags, showSearch, basePath, className, currentCategory, children, }: BlogSidebarProps): Promise<react_jsx_runtime.JSX.Element | null>;
|
|
227
|
+
interface NewsletterWidgetProps {
|
|
228
|
+
title?: string;
|
|
229
|
+
description?: string;
|
|
230
|
+
buttonText?: string;
|
|
231
|
+
onSubmit?: (email: string) => Promise<void>;
|
|
232
|
+
}
|
|
233
|
+
declare function NewsletterWidget({ title, description, buttonText, }: NewsletterWidgetProps): react_jsx_runtime.JSX.Element;
|
|
234
|
+
|
|
235
|
+
interface BlogLayoutProps {
|
|
236
|
+
/** Portal API URL */
|
|
237
|
+
apiUrl?: string;
|
|
238
|
+
/** Project API key */
|
|
239
|
+
apiKey?: string;
|
|
240
|
+
/** Layout style: 'sidebar-right', 'sidebar-left', 'full-width' */
|
|
241
|
+
layout?: 'sidebar-right' | 'sidebar-left' | 'full-width';
|
|
242
|
+
/** Show sidebar */
|
|
243
|
+
showSidebar?: boolean;
|
|
244
|
+
/** Sidebar props */
|
|
245
|
+
sidebarProps?: Partial<BlogSidebarProps>;
|
|
246
|
+
/** Hero section config */
|
|
247
|
+
hero?: {
|
|
248
|
+
title?: string;
|
|
249
|
+
subtitle?: string;
|
|
250
|
+
backgroundImage?: string;
|
|
251
|
+
backgroundColor?: string;
|
|
252
|
+
};
|
|
253
|
+
/** Max width for content */
|
|
254
|
+
maxWidth?: number;
|
|
255
|
+
/** Base URL for blog links */
|
|
256
|
+
basePath?: string;
|
|
257
|
+
/** Custom class name */
|
|
258
|
+
className?: string;
|
|
259
|
+
/** Current category (for sidebar highlighting) */
|
|
260
|
+
currentCategory?: string;
|
|
261
|
+
/** Main content */
|
|
262
|
+
children: React__default.ReactNode;
|
|
263
|
+
}
|
|
264
|
+
declare function BlogLayout({ apiUrl, apiKey, layout, showSidebar, sidebarProps, hero, maxWidth, basePath, className, currentCategory, children, }: BlogLayoutProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
265
|
+
/**
|
|
266
|
+
* Convenience wrapper for a complete blog index page
|
|
267
|
+
*/
|
|
268
|
+
interface BlogPageProps extends Omit<BlogLayoutProps, 'children'> {
|
|
269
|
+
/** List component to render */
|
|
270
|
+
listComponent: React__default.ReactNode;
|
|
271
|
+
}
|
|
272
|
+
declare function BlogPage({ listComponent, ...layoutProps }: BlogPageProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
273
|
+
/**
|
|
274
|
+
* Convenience wrapper for a single blog post page
|
|
275
|
+
*/
|
|
276
|
+
interface BlogPostPageProps extends Omit<BlogLayoutProps, 'children'> {
|
|
277
|
+
/** Post component to render */
|
|
278
|
+
postComponent: React__default.ReactNode;
|
|
279
|
+
}
|
|
280
|
+
declare function BlogPostPage({ postComponent, ...layoutProps }: BlogPostPageProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
281
|
+
interface CategoryPageProps extends BlogLayoutProps {
|
|
282
|
+
/** Category slug being viewed */
|
|
283
|
+
category: string;
|
|
284
|
+
/** Category display name */
|
|
285
|
+
categoryName?: string;
|
|
286
|
+
/** List component */
|
|
287
|
+
listComponent: React__default.ReactNode;
|
|
288
|
+
}
|
|
289
|
+
declare function CategoryPage({ category, categoryName, listComponent, hero, ...layoutProps }: CategoryPageProps): Promise<react_jsx_runtime.JSX.Element>;
|
|
290
|
+
|
|
291
|
+
declare function AuthorCard({ author, showBio, showSocial, className }: AuthorCardProps): react_jsx_runtime.JSX.Element;
|
|
292
|
+
|
|
293
|
+
interface RelatedPostsServerProps {
|
|
294
|
+
apiUrl?: string;
|
|
295
|
+
apiKey?: string;
|
|
296
|
+
currentPostId: string;
|
|
297
|
+
limit?: number;
|
|
298
|
+
className?: string;
|
|
299
|
+
renderItem?: (post: BlogPost$1) => React__default.ReactNode;
|
|
300
|
+
}
|
|
301
|
+
declare function RelatedPosts({ apiUrl, apiKey, currentPostId, limit, className, renderItem, }: RelatedPostsServerProps): Promise<react_jsx_runtime.JSX.Element | null>;
|
|
302
|
+
|
|
303
|
+
declare function TableOfContents({ content, className, maxDepth, }: TableOfContentsProps): react_jsx_runtime.JSX.Element | null;
|
|
304
|
+
|
|
305
|
+
export { AuthorCard, AuthorCardProps, BlogCategory, BlogLayout, type BlogLayoutProps, BlogList, BlogListResult, type BlogListServerProps, type BlogListStyles, BlogPage, type BlogPageProps, BlogPost, BlogPostPage, type BlogPostPageProps, type BlogPostServerProps, type BlogPostStyles, BlogSidebar, type BlogSidebarProps, CategoryPage, type CategoryPageProps, NewsletterWidget, type NewsletterWidgetProps, RelatedPosts, TableOfContents, TableOfContentsProps, TocItem };
|