@uptrademedia/site-kit 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +96 -25
  2. package/dist/SetupWizard-Cki06kB0.d.mts +12 -0
  3. package/dist/SetupWizard-Cki06kB0.d.ts +12 -0
  4. package/dist/analytics/index.d.mts +87 -0
  5. package/dist/analytics/index.d.ts +87 -0
  6. package/dist/blog/index.d.mts +179 -0
  7. package/dist/blog/index.d.ts +179 -0
  8. package/dist/blog/index.js +1131 -17
  9. package/dist/blog/index.js.map +1 -1
  10. package/dist/blog/index.mjs +1121 -17
  11. package/dist/blog/index.mjs.map +1 -1
  12. package/dist/blog/server.d.mts +228 -0
  13. package/dist/blog/server.d.ts +228 -0
  14. package/dist/blog/server.js +685 -0
  15. package/dist/blog/server.js.map +1 -0
  16. package/dist/blog/server.mjs +659 -0
  17. package/dist/blog/server.mjs.map +1 -0
  18. package/dist/{chunk-6EXHT7PS.mjs → chunk-2IHTEKHU.mjs} +5 -3
  19. package/dist/chunk-2IHTEKHU.mjs.map +1 -0
  20. package/dist/{chunk-63JNO4QN.mjs → chunk-DOHML47I.mjs} +2 -2
  21. package/dist/chunk-DOHML47I.mjs.map +1 -0
  22. package/dist/{chunk-YKMCG3DS.js → chunk-GAJLEDRD.js} +5 -3
  23. package/dist/chunk-GAJLEDRD.js.map +1 -0
  24. package/dist/{chunk-PYYEPAHL.js → chunk-K2HWVOEO.js} +2 -2
  25. package/dist/chunk-K2HWVOEO.js.map +1 -0
  26. package/dist/{chunk-JG2K4S2I.js → chunk-O2OHHBUD.js} +9 -9
  27. package/dist/chunk-O2OHHBUD.js.map +1 -0
  28. package/dist/chunk-QD66FTXZ.mjs +278 -0
  29. package/dist/chunk-QD66FTXZ.mjs.map +1 -0
  30. package/dist/chunk-UJQ73OS6.js +282 -0
  31. package/dist/chunk-UJQ73OS6.js.map +1 -0
  32. package/dist/{chunk-P7LGOKGI.mjs → chunk-XQJX252G.mjs} +9 -9
  33. package/dist/chunk-XQJX252G.mjs.map +1 -0
  34. package/dist/commerce/index.d.mts +168 -0
  35. package/dist/commerce/index.d.ts +168 -0
  36. package/dist/commerce/index.js +38 -38
  37. package/dist/commerce/index.mjs +1 -1
  38. package/dist/commerce/server.d.mts +98 -0
  39. package/dist/commerce/server.d.ts +98 -0
  40. package/dist/engage/index.d.mts +27 -0
  41. package/dist/engage/index.d.ts +27 -0
  42. package/dist/forms/index.d.mts +437 -0
  43. package/dist/forms/index.d.ts +437 -0
  44. package/dist/images/index.d.mts +133 -0
  45. package/dist/images/index.d.ts +133 -0
  46. package/dist/images/index.js +8 -8
  47. package/dist/images/index.mjs +1 -1
  48. package/dist/index.d.mts +650 -0
  49. package/dist/index.d.ts +650 -0
  50. package/dist/index.js +108 -95
  51. package/dist/index.js.map +1 -1
  52. package/dist/index.mjs +4 -3
  53. package/dist/index.mjs.map +1 -1
  54. package/dist/redirects/index.d.mts +72 -0
  55. package/dist/redirects/index.d.ts +72 -0
  56. package/dist/reputation/index.d.mts +57 -0
  57. package/dist/reputation/index.d.ts +57 -0
  58. package/dist/reputation/index.js +21 -0
  59. package/dist/reputation/index.js.map +1 -0
  60. package/dist/reputation/index.mjs +4 -0
  61. package/dist/reputation/index.mjs.map +1 -0
  62. package/dist/routing-BWjUF7lp.d.ts +105 -0
  63. package/dist/routing-CgmRi9tD.d.mts +105 -0
  64. package/dist/seo/index.d.mts +273 -0
  65. package/dist/seo/index.d.ts +273 -0
  66. package/dist/seo/server.d.mts +89 -0
  67. package/dist/seo/server.d.ts +89 -0
  68. package/dist/setup/client.d.mts +60 -0
  69. package/dist/setup/client.d.ts +60 -0
  70. package/dist/setup/index.d.mts +5 -0
  71. package/dist/setup/index.d.ts +5 -0
  72. package/dist/setup/index.js +2 -2
  73. package/dist/setup/index.mjs +1 -1
  74. package/dist/setup/server.d.mts +14 -0
  75. package/dist/setup/server.d.ts +14 -0
  76. package/dist/setup/server.js +2 -2
  77. package/dist/setup/server.mjs +1 -1
  78. package/dist/sitemap/index.d.mts +78 -0
  79. package/dist/sitemap/index.d.ts +78 -0
  80. package/dist/types-BN4OwtCO.d.mts +177 -0
  81. package/dist/types-BN4OwtCO.d.ts +177 -0
  82. package/dist/types-BmzutFwy.d.mts +227 -0
  83. package/dist/types-BmzutFwy.d.ts +227 -0
  84. package/dist/types-C0pJGfbH.d.mts +155 -0
  85. package/dist/types-C0pJGfbH.d.ts +155 -0
  86. package/dist/types-DA_Kocle.d.mts +127 -0
  87. package/dist/types-DA_Kocle.d.ts +127 -0
  88. package/dist/types-lFLKKn0G.d.mts +163 -0
  89. package/dist/types-lFLKKn0G.d.ts +163 -0
  90. package/dist/types-nB206tPK.d.mts +309 -0
  91. package/dist/types-nB206tPK.d.ts +309 -0
  92. package/dist/useEventModal-6U1pF3_g.d.mts +209 -0
  93. package/dist/useEventModal-BA8g-1-P.d.ts +209 -0
  94. package/package.json +14 -9
  95. package/dist/chunk-63JNO4QN.mjs.map +0 -1
  96. package/dist/chunk-6EXHT7PS.mjs.map +0 -1
  97. package/dist/chunk-JG2K4S2I.js.map +0 -1
  98. package/dist/chunk-P7LGOKGI.mjs.map +0 -1
  99. package/dist/chunk-PYYEPAHL.js.map +0 -1
  100. package/dist/chunk-YKMCG3DS.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkJG2K4S2I_js = require('../chunk-JG2K4S2I.js');
3
+ var chunkO2OHHBUD_js = require('../chunk-O2OHHBUD.js');
4
4
  require('../chunk-HCFPU7TU.js');
5
5
  require('../chunk-V3F5J6CV.js');
6
6
  require('../chunk-QAYJV4KK.js');
@@ -11,31 +11,31 @@ require('../chunk-EQCVQC35.js');
11
11
 
12
12
  Object.defineProperty(exports, "ManagedImage", {
13
13
  enumerable: true,
14
- get: function () { return chunkJG2K4S2I_js.ManagedImage; }
14
+ get: function () { return chunkO2OHHBUD_js.ManagedImage; }
15
15
  });
16
16
  Object.defineProperty(exports, "assignImageToSlot", {
17
17
  enumerable: true,
18
- get: function () { return chunkJG2K4S2I_js.assignImageToSlot; }
18
+ get: function () { return chunkO2OHHBUD_js.assignImageToSlot; }
19
19
  });
20
20
  Object.defineProperty(exports, "clearImageSlot", {
21
21
  enumerable: true,
22
- get: function () { return chunkJG2K4S2I_js.clearImageSlot; }
22
+ get: function () { return chunkO2OHHBUD_js.clearImageSlot; }
23
23
  });
24
24
  Object.defineProperty(exports, "fetchManagedImage", {
25
25
  enumerable: true,
26
- get: function () { return chunkJG2K4S2I_js.fetchManagedImage; }
26
+ get: function () { return chunkO2OHHBUD_js.fetchManagedImage; }
27
27
  });
28
28
  Object.defineProperty(exports, "fetchManagedImages", {
29
29
  enumerable: true,
30
- get: function () { return chunkJG2K4S2I_js.fetchManagedImages; }
30
+ get: function () { return chunkO2OHHBUD_js.fetchManagedImages; }
31
31
  });
32
32
  Object.defineProperty(exports, "listImageFiles", {
33
33
  enumerable: true,
34
- get: function () { return chunkJG2K4S2I_js.listImageFiles; }
34
+ get: function () { return chunkO2OHHBUD_js.listImageFiles; }
35
35
  });
36
36
  Object.defineProperty(exports, "uploadImage", {
37
37
  enumerable: true,
38
- get: function () { return chunkJG2K4S2I_js.uploadImage; }
38
+ get: function () { return chunkO2OHHBUD_js.uploadImage; }
39
39
  });
40
40
  //# sourceMappingURL=index.js.map
41
41
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-P7LGOKGI.mjs';
1
+ export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from '../chunk-XQJX252G.mjs';
2
2
  import '../chunk-WPSRS352.mjs';
3
3
  import '../chunk-FKVJOT2F.mjs';
4
4
  import '../chunk-BGJLOJ7T.mjs';
@@ -0,0 +1,650 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default, { ReactNode } from 'react';
3
+ export { c as ManagedFAQData, M as ManagedMetadataResult, b as ManagedSchemaProps } from './types-BmzutFwy.mjs';
4
+ export { c as AnalyticsConfig, b as AnalyticsEvent, P as PageView } from './types-DA_Kocle.mjs';
5
+ export { C as ChatConfig, E as EngageElement, a as WidgetConfig } from './types-C0pJGfbH.mjs';
6
+ export { a as FormField, F as FormSubmission, M as ManagedFormConfig } from './types-lFLKKn0G.mjs';
7
+ export { d as BlogAuthor, b as BlogCategory, B as BlogPostType } from './types-BN4OwtCO.mjs';
8
+ export { g as Cart, f as CartItem, e as CommerceCategory, C as CommerceOffering, c as CommerceSchedule, a as CommerceVariant, O as OfferingType } from './types-nB206tPK.mjs';
9
+ export { n as CalendarView, C as CheckoutForm, p as EventCalendar, m as EventEmbed, o as EventModal, E as EventTile, O as OfferingCard, l as OfferingList, P as ProductEmbed, R as RegistrationForm, U as UpcomingEvents, k as createCheckoutSession, j as fetchNextEvent, a as fetchOffering, f as fetchOfferings, c as fetchProducts, h as fetchServices, i as fetchUpcomingEvents, s as formatDate, t as formatDateTime, q as formatPrice, A as getOfferingUrl, r as registerForEvent, u as useEventModal } from './useEventModal-6U1pF3_g.mjs';
10
+ export { RedirectConfig, RedirectRule, clearRedirectCache, fetchRedirectRules, generateNextRedirects, handleManagedRedirects } from './redirects/index.mjs';
11
+ export { ImageApiConfig, ImageFile, ManagedImage, ManagedImageData, ManagedImageProps, assignImageToSlot, clearImageSlot, fetchManagedImage, fetchManagedImages, listImageFiles, uploadImage } from './images/index.mjs';
12
+ export { S as SetupWizard } from './SetupWizard-Cki06kB0.mjs';
13
+ export { Review, ReviewStats, TestimonialSection, TestimonialSectionProps, fetchReviewStats, fetchReviews } from './reputation/index.mjs';
14
+ import 'next';
15
+ import 'next/server';
16
+
17
+ /**
18
+ * @uptrade/site-kit - Shared types across all modules
19
+ *
20
+ * Site-kit ONLY calls Portal API - never Supabase directly.
21
+ * All data access goes through api.uptrademedia.com with API key auth.
22
+ */
23
+ interface SiteKitConfig {
24
+ /**
25
+ * Portal API URL (defaults to https://api.uptrademedia.com)
26
+ */
27
+ apiUrl?: string;
28
+ /**
29
+ * Project API key for all API calls
30
+ * Required - identifies the project and provides access
31
+ */
32
+ apiKey: string;
33
+ /** Analytics module configuration */
34
+ analytics?: {
35
+ enabled: boolean;
36
+ trackPageViews?: boolean;
37
+ trackWebVitals?: boolean;
38
+ trackScrollDepth?: boolean;
39
+ trackClicks?: boolean;
40
+ sessionDuration?: number;
41
+ excludePaths?: string[];
42
+ };
43
+ /** Engage widget configuration */
44
+ engage?: {
45
+ enabled: boolean;
46
+ position?: 'bottom-right' | 'bottom-left';
47
+ zIndex?: number;
48
+ chatEnabled?: boolean;
49
+ };
50
+ /** Forms configuration */
51
+ forms?: {
52
+ enabled: boolean;
53
+ honeypotField?: string;
54
+ };
55
+ /** Debug mode - logs to console */
56
+ debug?: boolean;
57
+ }
58
+
59
+ interface SignalConfig$1 {
60
+ enabled: boolean;
61
+ realtime?: boolean;
62
+ experiments?: boolean;
63
+ behaviorTracking?: boolean;
64
+ }
65
+ interface SiteKitContextValue extends SiteKitConfig {
66
+ isReady: boolean;
67
+ signal?: SignalConfig$1;
68
+ signalUrl?: string;
69
+ }
70
+ declare function useSiteKit(): SiteKitContextValue;
71
+ interface SiteKitProviderProps extends SiteKitConfig {
72
+ children: ReactNode;
73
+ signalUrl?: string;
74
+ }
75
+ declare function SiteKitProvider({ children, apiUrl, signalUrl, apiKey, analytics, engage, forms, signal, debug, }: SiteKitProviderProps & {
76
+ signal?: SignalConfig$1;
77
+ }): react_jsx_runtime.JSX.Element;
78
+
79
+ /**
80
+ * @uptrade/site-kit/affiliates - Affiliates Types
81
+ *
82
+ * TypeScript types for affiliate tracking and display.
83
+ */
84
+ interface Affiliate {
85
+ id: string;
86
+ project_id: string;
87
+ name: string;
88
+ website_url?: string;
89
+ logo_url?: string;
90
+ status: 'active' | 'paused';
91
+ notes?: string;
92
+ created_at: string;
93
+ }
94
+ interface AffiliateOffer {
95
+ id: string;
96
+ affiliate_id: string;
97
+ name: string;
98
+ destination_url: string;
99
+ description?: string;
100
+ payout_type: 'flat' | 'percent' | 'none';
101
+ payout_amount?: number;
102
+ is_active: boolean;
103
+ }
104
+ interface AffiliateWithOffers extends Affiliate {
105
+ offers: AffiliateOffer[];
106
+ }
107
+ interface FetchAffiliatesOptions {
108
+ status?: 'active' | 'paused';
109
+ includeOffers?: boolean;
110
+ }
111
+
112
+ /**
113
+ * @uptrade/site-kit/affiliates - Affiliates API
114
+ *
115
+ * API functions for fetching affiliate data for client sites.
116
+ * All data goes through Portal API with API key auth - never Supabase directly.
117
+ */
118
+
119
+ /**
120
+ * Fetch all active affiliates for the project
121
+ *
122
+ * @example
123
+ * ```ts
124
+ * const affiliates = await fetchAffiliates()
125
+ * ```
126
+ */
127
+ declare function fetchAffiliates(options?: FetchAffiliatesOptions): Promise<AffiliateWithOffers[]>;
128
+ /**
129
+ * Build a tracking URL for an affiliate offer
130
+ * When clicked, this redirects through our tracking endpoint and then to the destination
131
+ *
132
+ * @example
133
+ * ```ts
134
+ * const trackingUrl = getTrackingUrl(affiliate.id, offer.id)
135
+ * // Returns: https://api.uptrademedia.com/a/{affiliateId}/{offerId}
136
+ * ```
137
+ */
138
+ declare function getTrackingUrl(affiliateId: string, offerId: string): string;
139
+
140
+ /**
141
+ * @uptrade/site-kit/affiliates - useAffiliates Hook
142
+ *
143
+ * React hook for fetching and displaying affiliates on client sites.
144
+ */
145
+
146
+ interface UseAffiliatesResult {
147
+ affiliates: AffiliateWithOffers[];
148
+ isLoading: boolean;
149
+ error: string | null;
150
+ getTrackingUrl: (affiliateId: string, offerId: string) => string;
151
+ }
152
+ /**
153
+ * Hook to fetch affiliates for display on client sites
154
+ *
155
+ * @example
156
+ * ```tsx
157
+ * function AffiliatesSection() {
158
+ * const { affiliates, isLoading } = useAffiliates()
159
+ *
160
+ * if (isLoading) return <div>Loading...</div>
161
+ *
162
+ * return (
163
+ * <div className="grid grid-cols-3 gap-4">
164
+ * {affiliates.map(affiliate => (
165
+ * <AffiliateCard key={affiliate.id} affiliate={affiliate} />
166
+ * ))}
167
+ * </div>
168
+ * )
169
+ * }
170
+ * ```
171
+ */
172
+ declare function useAffiliates(): UseAffiliatesResult;
173
+
174
+ interface AffiliateCardProps {
175
+ affiliate: AffiliateWithOffers;
176
+ className?: string;
177
+ /** Optional custom render for the logo */
178
+ renderLogo?: (affiliate: AffiliateWithOffers) => React__default.ReactNode;
179
+ /** Show offers as links below the card */
180
+ showOffers?: boolean;
181
+ }
182
+ /**
183
+ * Single affiliate card - unstyled, bring your own CSS
184
+ *
185
+ * @example
186
+ * ```tsx
187
+ * <AffiliateCard
188
+ * affiliate={affiliate}
189
+ * className="p-4 bg-white rounded-lg shadow"
190
+ * showOffers
191
+ * />
192
+ * ```
193
+ */
194
+ declare function AffiliateCard({ affiliate, className, renderLogo, showOffers, }: AffiliateCardProps): react_jsx_runtime.JSX.Element;
195
+ interface AffiliatesWidgetProps {
196
+ className?: string;
197
+ /** Custom loading component */
198
+ loadingComponent?: React__default.ReactNode;
199
+ /** Custom empty state component */
200
+ emptyComponent?: React__default.ReactNode;
201
+ /** Custom error component */
202
+ errorComponent?: React__default.ReactNode;
203
+ /** Show offers on each card */
204
+ showOffers?: boolean;
205
+ /** Custom render function for each affiliate */
206
+ renderAffiliate?: (affiliate: AffiliateWithOffers) => React__default.ReactNode;
207
+ /** Maximum number to display */
208
+ limit?: number;
209
+ }
210
+ /**
211
+ * Display a grid of affiliates - unstyled, bring your own CSS
212
+ *
213
+ * @example
214
+ * ```tsx
215
+ * // Basic usage
216
+ * <AffiliatesWidget className="grid grid-cols-3 gap-4" />
217
+ *
218
+ * // With custom rendering
219
+ * <AffiliatesWidget
220
+ * renderAffiliate={(affiliate) => (
221
+ * <MyCustomCard key={affiliate.id} data={affiliate} />
222
+ * )}
223
+ * />
224
+ * ```
225
+ */
226
+ declare function AffiliatesWidget({ className, loadingComponent, emptyComponent, errorComponent, showOffers, renderAffiliate, limit, }: AffiliatesWidgetProps): string | number | bigint | true | Iterable<React__default.ReactNode> | Promise<React__default.AwaitedReactNode> | react_jsx_runtime.JSX.Element | null;
227
+
228
+ /**
229
+ * @uptrade/site-kit/signal - Types
230
+ *
231
+ * Type definitions for Signal integration
232
+ */
233
+ interface SignalConfig {
234
+ /** Config version (for cache invalidation) */
235
+ version: string;
236
+ /** Whether Signal is enabled for this project */
237
+ enabled: boolean;
238
+ /** Engage element overrides */
239
+ engage?: {
240
+ popups?: Record<string, EngageOverride>;
241
+ nudges?: Record<string, EngageOverride>;
242
+ banners?: Record<string, EngageOverride>;
243
+ chat?: ChatOverride;
244
+ };
245
+ /** SEO overrides */
246
+ seo?: {
247
+ meta?: Record<string, MetaOverride>;
248
+ redirects?: RedirectRule[];
249
+ };
250
+ /** Commerce overrides */
251
+ commerce?: {
252
+ pricing?: Record<string, PriceOverride>;
253
+ upsells?: Record<string, UpsellConfig>;
254
+ };
255
+ /** Active experiments */
256
+ experiments: ExperimentConfig[];
257
+ /** Updated timestamp */
258
+ updated_at: string;
259
+ }
260
+ interface EngageOverride {
261
+ /** Whether the element is enabled */
262
+ enabled?: boolean;
263
+ /** Timing override in ms */
264
+ timing?: number;
265
+ /** Content overrides */
266
+ content?: {
267
+ headline?: string;
268
+ body?: string;
269
+ cta?: string;
270
+ image?: string;
271
+ };
272
+ /** Targeting overrides */
273
+ targeting?: {
274
+ pages?: string[];
275
+ devices?: ('desktop' | 'mobile' | 'tablet')[];
276
+ segments?: string[];
277
+ };
278
+ }
279
+ interface ChatOverride {
280
+ /** Whether chat is enabled */
281
+ enabled?: boolean;
282
+ /** Auto-open delay in ms */
283
+ auto_open_delay?: number;
284
+ /** Welcome message override */
285
+ welcome_message?: string;
286
+ /** Offline message */
287
+ offline_message?: string;
288
+ }
289
+ interface MetaOverride {
290
+ /** Title tag override */
291
+ title?: string;
292
+ /** Meta description override */
293
+ description?: string;
294
+ /** OG image override */
295
+ og_image?: string;
296
+ }
297
+ interface RedirectRule {
298
+ /** Source path (supports wildcards) */
299
+ from: string;
300
+ /** Destination path */
301
+ to: string;
302
+ /** Redirect type */
303
+ type: 301 | 302;
304
+ /** Whether the rule is active */
305
+ active: boolean;
306
+ }
307
+ interface PriceOverride {
308
+ /** Offering ID */
309
+ offering_id: string;
310
+ /** New price in cents */
311
+ price: number;
312
+ /** Compare-at price for sales */
313
+ compare_at_price?: number;
314
+ /** Reason for override */
315
+ reason: string;
316
+ }
317
+ interface UpsellConfig {
318
+ /** Primary offering ID */
319
+ offering_id: string;
320
+ /** Upsell offering IDs */
321
+ upsell_ids: string[];
322
+ /** Display location */
323
+ location: 'cart' | 'checkout' | 'product_page';
324
+ }
325
+ interface ExperimentConfig {
326
+ /** Unique experiment ID */
327
+ id: string;
328
+ /** Human-readable name */
329
+ name: string;
330
+ /** Experiment status */
331
+ status: 'draft' | 'running' | 'paused' | 'completed';
332
+ /** Variants with weights */
333
+ variants: ExperimentVariant[];
334
+ /** Target pages/segments */
335
+ target?: {
336
+ pages?: string[];
337
+ segments?: string[];
338
+ devices?: ('desktop' | 'mobile' | 'tablet')[];
339
+ };
340
+ /** Goal definition */
341
+ goal: {
342
+ outcome_type: string;
343
+ min_confidence: number;
344
+ };
345
+ /** Traffic allocation (0-1) */
346
+ traffic_allocation: number;
347
+ /** Winner if determined */
348
+ winner_variant?: string;
349
+ }
350
+ interface ExperimentVariant {
351
+ /** Unique variant key */
352
+ key: string;
353
+ /** Display name */
354
+ name: string;
355
+ /** Traffic weight (0-1) */
356
+ weight: number;
357
+ /** Variant description */
358
+ description?: string;
359
+ }
360
+ interface ExperimentAssignment {
361
+ /** Experiment ID */
362
+ experiment_id: string;
363
+ /** Assigned variant key */
364
+ variant_key: string;
365
+ /** Assignment expiration */
366
+ expires: number;
367
+ /** Assigned timestamp */
368
+ assigned_at: string;
369
+ }
370
+ interface SignalEvent {
371
+ /** Event type (page_view, click, form_submit, etc.) */
372
+ event_type: string;
373
+ /** Specific event name */
374
+ event_name: string;
375
+ /** Event data payload */
376
+ event_data: Record<string, unknown>;
377
+ /** Page context */
378
+ page_url: string;
379
+ page_path: string;
380
+ referrer: string;
381
+ /** Device info */
382
+ device_type: 'desktop' | 'mobile' | 'tablet';
383
+ browser: string;
384
+ os: string;
385
+ viewport_width: number;
386
+ viewport_height: number;
387
+ /** Engagement metrics */
388
+ time_on_page: number;
389
+ scroll_depth: number;
390
+ click_count: number;
391
+ /** Active experiments */
392
+ experiments: Array<{
393
+ experiment_id: string;
394
+ variant_key: string;
395
+ }>;
396
+ /** Attribution */
397
+ utm_source?: string;
398
+ utm_medium?: string;
399
+ utm_campaign?: string;
400
+ /** Timestamp */
401
+ timestamp: string;
402
+ }
403
+ interface SignalOutcome {
404
+ /** Outcome type (form_submit, purchase, signup, etc.) */
405
+ outcome_type: string;
406
+ /** Monetary value if applicable */
407
+ value?: number;
408
+ /** Related entity ID */
409
+ entity_id?: string;
410
+ /** Active experiment IDs */
411
+ experiments: string[];
412
+ /** Additional context */
413
+ metadata?: Record<string, unknown>;
414
+ }
415
+ interface SignalContextValue {
416
+ /** Current config */
417
+ config: SignalConfig | null;
418
+ /** Whether Signal is loading */
419
+ loading: boolean;
420
+ /** Error if any */
421
+ error: Error | null;
422
+ /** Track a custom event */
423
+ trackEvent: (event: Partial<SignalEvent>) => void;
424
+ /** Report an outcome/conversion */
425
+ trackOutcome: (outcome: SignalOutcome) => void;
426
+ /** Get experiment assignment */
427
+ getExperiment: (experimentId: string) => ExperimentAssignment | null;
428
+ /** Force refresh config */
429
+ refreshConfig: () => Promise<void>;
430
+ }
431
+ interface SignalBridgeProps {
432
+ /** Enable Signal integration */
433
+ enabled?: boolean;
434
+ /** Enable real-time config updates via SSE */
435
+ realtime?: boolean;
436
+ /** Enable A/B experiment participation */
437
+ experiments?: boolean;
438
+ /** Enable rich behavioral tracking */
439
+ behaviorTracking?: boolean;
440
+ /** Children */
441
+ children: React.ReactNode;
442
+ }
443
+
444
+ declare function useSignal(): SignalContextValue;
445
+ declare function SignalBridge({ enabled, realtime, experiments, behaviorTracking, children, }: SignalBridgeProps): react_jsx_runtime.JSX.Element;
446
+ /**
447
+ * Hook to access Signal config
448
+ */
449
+ declare function useSignalConfig(): SignalConfig | null;
450
+ /**
451
+ * Hook for tracking events
452
+ */
453
+ declare function useSignalEvent(): (event: Partial<SignalEvent>) => void;
454
+ /**
455
+ * Hook for tracking outcomes/conversions
456
+ */
457
+ declare function useSignalOutcome(): {
458
+ trackOutcome: (outcome: SignalOutcome) => void;
459
+ };
460
+ /**
461
+ * Hook for experiment assignment
462
+ */
463
+ declare function useSignalExperiment(experimentId: string): {
464
+ assignment: ExperimentAssignment | null;
465
+ variant: string | null;
466
+ isControl: boolean;
467
+ };
468
+
469
+ interface SignalExperimentProps {
470
+ /** Unique experiment ID */
471
+ experimentId: string;
472
+ /** Variants to test - keys are variant names, values are React nodes */
473
+ variants: Record<string, React__default.ReactNode>;
474
+ /** Fallback content if no assignment (defaults to 'control' variant) */
475
+ fallback?: React__default.ReactNode;
476
+ /** Track impression automatically */
477
+ trackImpression?: boolean;
478
+ /** Children function for more control */
479
+ children?: (props: {
480
+ variant: string;
481
+ isControl: boolean;
482
+ }) => React__default.ReactNode;
483
+ }
484
+ /**
485
+ * Renders different content variants based on Signal's A/B assignment.
486
+ *
487
+ * @example
488
+ * // Simple variant switching
489
+ * <SignalExperiment experimentId="hero-cta" variants={{
490
+ * control: <Button>Get Started</Button>,
491
+ * variant_a: <Button variant="primary">Start Free Trial</Button>,
492
+ * variant_b: <Button variant="secondary">Book a Demo</Button>,
493
+ * }} />
494
+ *
495
+ * @example
496
+ * // With render prop for more control
497
+ * <SignalExperiment experimentId="pricing-layout">
498
+ * {({ variant, isControl }) => (
499
+ * <PricingSection layout={isControl ? 'cards' : 'table'} />
500
+ * )}
501
+ * </SignalExperiment>
502
+ */
503
+ declare function SignalExperiment({ experimentId, variants, fallback, trackImpression, children, }: SignalExperimentProps): react_jsx_runtime.JSX.Element;
504
+ /**
505
+ * Hook for conditional experiment logic
506
+ *
507
+ * @example
508
+ * const { variant, isControl } = useExperimentVariant('pricing-test')
509
+ *
510
+ * return isControl
511
+ * ? <OldPricing />
512
+ * : <NewPricing showAnnual={variant === 'annual_first'} />
513
+ */
514
+ declare function useExperimentVariant(experimentId: string): {
515
+ assignment: ExperimentAssignment | null;
516
+ variant: string | null;
517
+ isControl: boolean;
518
+ };
519
+ /**
520
+ * Component for tracking experiment conversions
521
+ * Wraps interactive elements to track when they convert
522
+ *
523
+ * @example
524
+ * <SignalExperiment experimentId="signup-button" variants={{
525
+ * control: (
526
+ * <ExperimentConversion experimentId="signup-button" outcomeType="click">
527
+ * <Button>Sign Up</Button>
528
+ * </ExperimentConversion>
529
+ * ),
530
+ * variant_a: (
531
+ * <ExperimentConversion experimentId="signup-button" outcomeType="click">
532
+ * <Button variant="large">Join Now - It's Free!</Button>
533
+ * </ExperimentConversion>
534
+ * ),
535
+ * }} />
536
+ */
537
+ declare function ExperimentConversion({ experimentId, outcomeType, value, children, }: {
538
+ experimentId: string;
539
+ outcomeType?: string;
540
+ value?: number;
541
+ children: React__default.ReactElement;
542
+ }): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>>;
543
+
544
+ /**
545
+ * @uptrade/site-kit/setup - Conversational Setup Assistant
546
+ *
547
+ * AI-powered conversational interface for setting up site-kit.
548
+ * Uses Echo/Signal to guide users through configuration.
549
+ *
550
+ * Features:
551
+ * - Streaming AI responses for real-time feedback
552
+ * - Brand extraction from existing websites
553
+ * - Module recommendations based on business type
554
+ * - Integration verification
555
+ * - Copilot instructions generation
556
+ */
557
+ interface SetupContext {
558
+ flow: 'new' | 'existing' | 'rebuild' | null;
559
+ step: string;
560
+ project_id?: string;
561
+ org_id?: string;
562
+ domain?: string;
563
+ business_type?: string;
564
+ scan_results?: ScanResults;
565
+ scrape_results?: ScrapeResults;
566
+ selected_modules?: string[];
567
+ brand?: BrandInfo;
568
+ }
569
+ interface ScanResults {
570
+ forms: {
571
+ file: string;
572
+ form_library: string;
573
+ fields: number;
574
+ }[];
575
+ widgets: {
576
+ file: string;
577
+ widget_type: string;
578
+ }[];
579
+ metadata: {
580
+ file: string;
581
+ type: string;
582
+ }[];
583
+ sitemaps: {
584
+ file: string;
585
+ type: string;
586
+ }[];
587
+ }
588
+ interface ScrapeResults {
589
+ scrape_id: string;
590
+ domain: string;
591
+ pages_found: number;
592
+ faqs_imported: number;
593
+ routes: {
594
+ path: string;
595
+ title: string;
596
+ }[];
597
+ brand?: BrandInfo;
598
+ }
599
+ interface BrandInfo {
600
+ business_name: string;
601
+ tagline?: string;
602
+ primary_color?: string;
603
+ secondary_color?: string;
604
+ logo_url?: string;
605
+ phone_numbers?: string[];
606
+ email_addresses?: string[];
607
+ social_profiles?: Record<string, string>;
608
+ }
609
+ interface SetupState {
610
+ step: 'welcome' | 'auth' | 'project' | 'modules' | 'config' | 'verify' | 'complete';
611
+ isAuthenticated: boolean;
612
+ userEmail?: string;
613
+ accessToken?: string;
614
+ selectedOrg?: {
615
+ id: string;
616
+ name: string;
617
+ };
618
+ selectedProject?: {
619
+ id: string;
620
+ name: string;
621
+ domain: string;
622
+ };
623
+ selectedModules: string[];
624
+ config: Record<string, unknown>;
625
+ errors: string[];
626
+ context: SetupContext;
627
+ }
628
+ interface SetupAssistantProps {
629
+ /** Portal API URL */
630
+ apiUrl?: string;
631
+ /** Signal API URL for AI chat */
632
+ signalUrl?: string;
633
+ /** Supabase URL for auth */
634
+ supabaseUrl?: string;
635
+ /** Supabase anon key */
636
+ supabaseKey?: string;
637
+ /** Pre-selected project ID (if coming from Portal) */
638
+ projectId?: string;
639
+ /** Pre-selected org ID (if coming from Portal) */
640
+ orgId?: string;
641
+ /** Auth token (if already authenticated) */
642
+ authToken?: string;
643
+ /** Callback when setup is complete */
644
+ onComplete?: (config: SetupState) => void;
645
+ /** Custom welcome message */
646
+ welcomeMessage?: string;
647
+ }
648
+ declare function SetupAssistant({ apiUrl, signalUrl, supabaseUrl, supabaseKey, projectId, orgId, authToken, onComplete, welcomeMessage, }: SetupAssistantProps): react_jsx_runtime.JSX.Element;
649
+
650
+ export { type Affiliate, AffiliateCard, type AffiliateCardProps, type AffiliateOffer, type AffiliateWithOffers, AffiliatesWidget, type AffiliatesWidgetProps, type EngageOverride, type ExperimentAssignment, type ExperimentConfig, ExperimentConversion, type ExperimentVariant, type MetaOverride, type PriceOverride, SetupAssistant, SignalBridge, type SignalBridgeProps, type SignalConfig, type SignalContextValue, type SignalEvent, SignalExperiment, type SignalOutcome, type SiteKitConfig, SiteKitProvider, type UseAffiliatesResult, fetchAffiliates, getTrackingUrl, useAffiliates, useExperimentVariant, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome, useSiteKit };