@wakastellar/ui 2.3.0 → 2.3.2
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/dist/components/index.d.ts +15 -0
- package/dist/components/waka-ad-banner/index.d.ts +36 -0
- package/dist/components/waka-ad-fallback/index.d.ts +33 -0
- package/dist/components/waka-ad-inline/index.d.ts +15 -0
- package/dist/components/waka-ad-interstitial/index.d.ts +26 -0
- package/dist/components/waka-ad-placeholder/index.d.ts +17 -0
- package/dist/components/waka-ad-provider/index.d.ts +103 -0
- package/dist/components/waka-ad-sidebar/index.d.ts +18 -0
- package/dist/components/waka-ad-sticky-footer/index.d.ts +17 -0
- package/dist/components/waka-content-recommendation/index.d.ts +23 -0
- package/dist/components/waka-outstream-video/index.d.ts +24 -0
- package/dist/components/waka-sponsored-badge/index.d.ts +20 -0
- package/dist/components/waka-sponsored-card/index.d.ts +25 -0
- package/dist/components/waka-sponsored-feed/index.d.ts +31 -0
- package/dist/components/waka-video-ad/index.d.ts +32 -0
- package/dist/components/waka-video-overlay/index.d.ts +26 -0
- package/dist/index.cjs.js +177 -171
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +14535 -12812
- package/dist/utils/security.d.ts +96 -0
- package/package.json +4 -4
- package/src/blocks/sidebar/index.tsx +6 -6
- package/src/components/DataTable/templates/index.tsx +3 -2
- package/src/components/index.ts +94 -0
- package/src/components/waka-3d-pie-chart/index.tsx +11 -11
- package/src/components/waka-achievement-unlock/index.tsx +16 -16
- package/src/components/waka-ad-banner/index.tsx +275 -0
- package/src/components/waka-ad-fallback/index.tsx +181 -0
- package/src/components/waka-ad-inline/index.tsx +103 -0
- package/src/components/waka-ad-interstitial/index.tsx +278 -0
- package/src/components/waka-ad-placeholder/index.tsx +84 -0
- package/src/components/waka-ad-provider/index.tsx +329 -0
- package/src/components/waka-ad-sidebar/index.tsx +113 -0
- package/src/components/waka-ad-sticky-footer/index.tsx +125 -0
- package/src/components/waka-badge-showcase/index.tsx +12 -11
- package/src/components/waka-command-bar/index.tsx +2 -1
- package/src/components/waka-content-recommendation/index.tsx +294 -0
- package/src/components/waka-cost-breakdown/index.tsx +10 -10
- package/src/components/waka-funnel-chart/index.tsx +8 -8
- package/src/components/waka-health-pulse/index.tsx +6 -6
- package/src/components/waka-leaderboard/index.tsx +9 -9
- package/src/components/waka-loot-box/index.tsx +20 -20
- package/src/components/waka-outstream-video/index.tsx +240 -0
- package/src/components/waka-player-card/index.tsx +5 -5
- package/src/components/waka-quota-bar/index.tsx +4 -4
- package/src/components/waka-radar-score/index.tsx +10 -10
- package/src/components/waka-scratch-card/index.tsx +5 -4
- package/src/components/waka-server-rack/index.tsx +28 -27
- package/src/components/waka-sponsored-badge/index.tsx +97 -0
- package/src/components/waka-sponsored-card/index.tsx +275 -0
- package/src/components/waka-sponsored-feed/index.tsx +127 -0
- package/src/components/waka-spotlight/index.tsx +2 -1
- package/src/components/waka-success-explosion/index.tsx +4 -4
- package/src/components/waka-video-ad/index.tsx +406 -0
- package/src/components/waka-video-overlay/index.tsx +257 -0
- package/src/components/waka-xp-bar/index.tsx +13 -13
- package/src/styles/base.css +16 -0
- package/src/styles/tailwind.preset.js +12 -0
- package/src/styles/themes/forest.css +16 -0
- package/src/styles/themes/monochrome.css +16 -0
- package/src/styles/themes/perpetuity.css +16 -0
- package/src/styles/themes/sunset.css +16 -0
- package/src/styles/themes/twilight.css +16 -0
|
@@ -215,3 +215,18 @@ export { WakaFeatureFlagRow, defaultFeatureFlags, type FeatureFlag, type Feature
|
|
|
215
215
|
export { WakaDatabaseCard, defaultDatabase, defaultDatabases, type DatabaseInfo, type DatabaseMetrics, type DatabaseType as WakaDatabaseType, type DatabaseStatus as WakaDatabaseStatus, type ReplicationRole, type WakaDatabaseCardProps, } from './waka-database-card';
|
|
216
216
|
export { WakaMigrationList, defaultMigrations, type Migration, type MigrationStatus, type WakaMigrationListProps, } from './waka-migration-list';
|
|
217
217
|
export { WakaQueryExplain, defaultQueryPlan, type QueryPlan, type ExplainNode, type NodeType, type WakaQueryExplainProps, } from './waka-query-explain';
|
|
218
|
+
export { WakaAdProvider, useAdContext, useAdVisibility, useAdConsent, useAdSlot, AD_SIZES, type AdNetwork, type AdSize, type AdPosition, type AdSlot, type AdConfig, type AdEvent, type CustomAd, } from './waka-ad-provider';
|
|
219
|
+
export { WakaAdBanner, type WakaAdBannerProps, } from './waka-ad-banner';
|
|
220
|
+
export { WakaAdPlaceholder, type WakaAdPlaceholderProps, } from './waka-ad-placeholder';
|
|
221
|
+
export { WakaAdFallback, type WakaAdFallbackProps, type AdFallbackVariant, } from './waka-ad-fallback';
|
|
222
|
+
export { WakaSponsoredBadge, type WakaSponsoredBadgeProps, type SponsoredBadgeVariant, type SponsoredBadgeSize, } from './waka-sponsored-badge';
|
|
223
|
+
export { WakaAdSidebar, type WakaAdSidebarProps, } from './waka-ad-sidebar';
|
|
224
|
+
export { WakaAdInline, type WakaAdInlineProps, } from './waka-ad-inline';
|
|
225
|
+
export { WakaAdInterstitial, type WakaAdInterstitialProps, } from './waka-ad-interstitial';
|
|
226
|
+
export { WakaAdStickyFooter, type WakaAdStickyFooterProps, } from './waka-ad-sticky-footer';
|
|
227
|
+
export { WakaSponsoredCard, type WakaSponsoredCardProps, type SponsoredCardVariant, } from './waka-sponsored-card';
|
|
228
|
+
export { WakaSponsoredFeed, type WakaSponsoredFeedProps, } from './waka-sponsored-feed';
|
|
229
|
+
export { WakaContentRecommendation, type WakaContentRecommendationProps, type RecommendationLayout, } from './waka-content-recommendation';
|
|
230
|
+
export { WakaVideoAd, type WakaVideoAdProps, } from './waka-video-ad';
|
|
231
|
+
export { WakaOutstreamVideo, type WakaOutstreamVideoProps, } from './waka-outstream-video';
|
|
232
|
+
export { WakaVideoOverlay, type WakaVideoOverlayProps, type OverlayPosition, type OverlayTrigger, } from './waka-video-overlay';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AdSize } from '../waka-ad-provider';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface WakaAdBannerProps {
|
|
4
|
+
/** Unique slot ID */
|
|
5
|
+
slotId: string;
|
|
6
|
+
/** Ad size preset */
|
|
7
|
+
size?: AdSize;
|
|
8
|
+
/** Custom width (when size is "custom") */
|
|
9
|
+
customWidth?: number;
|
|
10
|
+
/** Custom height (when size is "custom") */
|
|
11
|
+
customHeight?: number;
|
|
12
|
+
/** GPT ad unit path (for GPT network) */
|
|
13
|
+
adUnitPath?: string;
|
|
14
|
+
/** Targeting parameters */
|
|
15
|
+
targeting?: Record<string, string | string[]>;
|
|
16
|
+
/** Auto-refresh interval in seconds (0 = disabled) */
|
|
17
|
+
refreshInterval?: number;
|
|
18
|
+
/** Enable lazy loading */
|
|
19
|
+
lazyLoad?: boolean;
|
|
20
|
+
/** Fallback content when no ad available */
|
|
21
|
+
fallback?: React.ReactNode;
|
|
22
|
+
/** Show sponsored badge */
|
|
23
|
+
showBadge?: boolean;
|
|
24
|
+
/** Badge position */
|
|
25
|
+
badgePosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
26
|
+
/** Custom class name */
|
|
27
|
+
className?: string;
|
|
28
|
+
/** Callback when ad loads */
|
|
29
|
+
onLoad?: () => void;
|
|
30
|
+
/** Callback when ad fails */
|
|
31
|
+
onError?: (error: Error) => void;
|
|
32
|
+
/** Callback when ad is clicked */
|
|
33
|
+
onClick?: () => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function WakaAdBanner({ slotId, size, customWidth, customHeight, adUnitPath, targeting, refreshInterval, lazyLoad, fallback, showBadge, badgePosition, className, onLoad, onError, onClick, }: WakaAdBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export default WakaAdBanner;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AdSize } from '../waka-ad-provider';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type AdFallbackVariant = "house" | "empty" | "custom";
|
|
4
|
+
export interface WakaAdFallbackProps {
|
|
5
|
+
/** Fallback variant */
|
|
6
|
+
variant?: AdFallbackVariant;
|
|
7
|
+
/** Ad size preset */
|
|
8
|
+
size?: AdSize;
|
|
9
|
+
/** Width in pixels (overrides size) */
|
|
10
|
+
width?: number;
|
|
11
|
+
/** Height in pixels (overrides size) */
|
|
12
|
+
height?: number;
|
|
13
|
+
/** Title text */
|
|
14
|
+
title?: string;
|
|
15
|
+
/** Description text */
|
|
16
|
+
description?: string;
|
|
17
|
+
/** Call to action text */
|
|
18
|
+
ctaText?: string;
|
|
19
|
+
/** Link URL */
|
|
20
|
+
ctaUrl?: string;
|
|
21
|
+
/** Image URL */
|
|
22
|
+
imageUrl?: string;
|
|
23
|
+
/** Show border */
|
|
24
|
+
showBorder?: boolean;
|
|
25
|
+
/** Custom class name */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** Callback when clicked */
|
|
28
|
+
onClick?: () => void;
|
|
29
|
+
/** Custom children for variant="custom" */
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare function WakaAdFallback({ variant, size, width, height, title, description, ctaText, ctaUrl, imageUrl, showBorder, className, onClick, children, }: WakaAdFallbackProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export default WakaAdFallback;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { WakaAdBannerProps } from '../waka-ad-banner';
|
|
2
|
+
export interface WakaAdInlineProps extends Omit<WakaAdBannerProps, "size"> {
|
|
3
|
+
/** Ad size - defaults to responsive */
|
|
4
|
+
size?: "responsive" | "rectangle" | "leaderboard";
|
|
5
|
+
/** Alignment within container */
|
|
6
|
+
align?: "left" | "center" | "right";
|
|
7
|
+
/** Vertical margin */
|
|
8
|
+
margin?: "none" | "sm" | "md" | "lg";
|
|
9
|
+
/** Show separator lines */
|
|
10
|
+
showSeparators?: boolean;
|
|
11
|
+
/** Label above the ad */
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function WakaAdInline({ slotId, size, align, margin, showSeparators, label, className, ...bannerProps }: WakaAdInlineProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default WakaAdInline;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface WakaAdInterstitialProps {
|
|
2
|
+
/** Unique slot ID */
|
|
3
|
+
slotId: string;
|
|
4
|
+
/** Whether the interstitial is open */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Callback when closed */
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
/** Minimum display time before close button appears (seconds) */
|
|
9
|
+
minDisplayTime?: number;
|
|
10
|
+
/** Auto-close after duration (seconds, 0 = manual close only) */
|
|
11
|
+
autoCloseAfter?: number;
|
|
12
|
+
/** GPT ad unit path */
|
|
13
|
+
adUnitPath?: string;
|
|
14
|
+
/** Show countdown timer */
|
|
15
|
+
showCountdown?: boolean;
|
|
16
|
+
/** Skip button text */
|
|
17
|
+
skipText?: string;
|
|
18
|
+
/** Custom class name */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Callback when ad loads */
|
|
21
|
+
onLoad?: () => void;
|
|
22
|
+
/** Callback when ad is clicked */
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function WakaAdInterstitial({ slotId, open, onClose, minDisplayTime, autoCloseAfter, adUnitPath, showCountdown, skipText, className, onLoad, onClick, }: WakaAdInterstitialProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export default WakaAdInterstitial;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AdSize } from '../waka-ad-provider';
|
|
2
|
+
export interface WakaAdPlaceholderProps {
|
|
3
|
+
/** Ad size preset */
|
|
4
|
+
size?: AdSize;
|
|
5
|
+
/** Width in pixels (overrides size) */
|
|
6
|
+
width?: number;
|
|
7
|
+
/** Height in pixels (overrides size) */
|
|
8
|
+
height?: number;
|
|
9
|
+
/** Show animated skeleton */
|
|
10
|
+
animated?: boolean;
|
|
11
|
+
/** Show label text */
|
|
12
|
+
showLabel?: boolean;
|
|
13
|
+
/** Custom class name */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function WakaAdPlaceholder({ size, width, height, animated, showLabel, className, }: WakaAdPlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default WakaAdPlaceholder;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type AdNetwork = "gpt" | "custom" | "adsense";
|
|
3
|
+
export type AdSize = "leaderboard" | "rectangle" | "skyscraper" | "billboard" | "mobile-banner" | "custom";
|
|
4
|
+
export type AdPosition = "top" | "bottom" | "sidebar" | "inline" | "interstitial" | "sticky";
|
|
5
|
+
export interface AdSlot {
|
|
6
|
+
id: string;
|
|
7
|
+
network: AdNetwork;
|
|
8
|
+
size: AdSize;
|
|
9
|
+
position: AdPosition;
|
|
10
|
+
targeting?: Record<string, string | string[]>;
|
|
11
|
+
refreshInterval?: number;
|
|
12
|
+
lazyLoad?: boolean;
|
|
13
|
+
customWidth?: number;
|
|
14
|
+
customHeight?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface AdConfig {
|
|
17
|
+
network: AdNetwork;
|
|
18
|
+
publisherId?: string;
|
|
19
|
+
gptNetworkCode?: string;
|
|
20
|
+
gptAdUnits?: Record<string, string>;
|
|
21
|
+
customAdServer?: string;
|
|
22
|
+
customApiKey?: string;
|
|
23
|
+
enableLazyLoad?: boolean;
|
|
24
|
+
lazyLoadOffset?: number;
|
|
25
|
+
enableRefresh?: boolean;
|
|
26
|
+
defaultRefreshInterval?: number;
|
|
27
|
+
enableConsent?: boolean;
|
|
28
|
+
testMode?: boolean;
|
|
29
|
+
debugMode?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface AdEvent {
|
|
32
|
+
type: "impression" | "click" | "viewable" | "error" | "loaded" | "empty";
|
|
33
|
+
slotId: string;
|
|
34
|
+
timestamp: Date;
|
|
35
|
+
data?: Record<string, unknown>;
|
|
36
|
+
}
|
|
37
|
+
export interface CustomAd {
|
|
38
|
+
id: string;
|
|
39
|
+
imageUrl?: string;
|
|
40
|
+
videoUrl?: string;
|
|
41
|
+
targetUrl: string;
|
|
42
|
+
title?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
sponsor?: string;
|
|
45
|
+
cta?: string;
|
|
46
|
+
trackingPixels?: string[];
|
|
47
|
+
impressionUrl?: string;
|
|
48
|
+
clickUrl?: string;
|
|
49
|
+
}
|
|
50
|
+
interface AdContextValue {
|
|
51
|
+
config: AdConfig;
|
|
52
|
+
isReady: boolean;
|
|
53
|
+
hasConsent: boolean | null;
|
|
54
|
+
setConsent: (consent: boolean) => void;
|
|
55
|
+
registerSlot: (slot: AdSlot) => void;
|
|
56
|
+
unregisterSlot: (slotId: string) => void;
|
|
57
|
+
refreshSlot: (slotId: string) => void;
|
|
58
|
+
refreshAll: () => void;
|
|
59
|
+
getCustomAd: (slotId: string) => Promise<CustomAd | null>;
|
|
60
|
+
trackEvent: (event: AdEvent) => void;
|
|
61
|
+
slots: Map<string, AdSlot>;
|
|
62
|
+
}
|
|
63
|
+
export declare const AD_SIZES: Record<AdSize, {
|
|
64
|
+
width: number;
|
|
65
|
+
height: number;
|
|
66
|
+
label: string;
|
|
67
|
+
}>;
|
|
68
|
+
export declare function useAdContext(): AdContextValue;
|
|
69
|
+
export declare function useAdVisibility(ref: React.RefObject<HTMLElement>, threshold?: number): {
|
|
70
|
+
isVisible: boolean;
|
|
71
|
+
viewableTime: number;
|
|
72
|
+
};
|
|
73
|
+
export declare function useAdConsent(): {
|
|
74
|
+
hasConsent: boolean | null;
|
|
75
|
+
setConsent: (consent: boolean) => void;
|
|
76
|
+
};
|
|
77
|
+
export declare function useAdSlot(slot: AdSlot): {
|
|
78
|
+
refresh: () => void;
|
|
79
|
+
isReady: boolean;
|
|
80
|
+
};
|
|
81
|
+
interface WakaAdProviderProps {
|
|
82
|
+
children: React.ReactNode;
|
|
83
|
+
config: AdConfig;
|
|
84
|
+
onEvent?: (event: AdEvent) => void;
|
|
85
|
+
}
|
|
86
|
+
export declare function WakaAdProvider({ children, config, onEvent }: WakaAdProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
declare global {
|
|
88
|
+
interface Window {
|
|
89
|
+
googletag: {
|
|
90
|
+
cmd: Array<() => void>;
|
|
91
|
+
defineSlot: (adUnitPath: string, size: [number, number], divId: string) => unknown;
|
|
92
|
+
pubads: () => {
|
|
93
|
+
enableSingleRequest: () => void;
|
|
94
|
+
enableLazyLoad: (config: Record<string, unknown>) => void;
|
|
95
|
+
refresh: () => void;
|
|
96
|
+
setTargeting: (key: string, value: string | string[]) => void;
|
|
97
|
+
};
|
|
98
|
+
enableServices: () => void;
|
|
99
|
+
display: (divId: string) => void;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
export default WakaAdProvider;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WakaAdBannerProps } from '../waka-ad-banner';
|
|
2
|
+
export interface WakaAdSidebarProps extends Omit<WakaAdBannerProps, "size"> {
|
|
3
|
+
/** Enable sticky behavior */
|
|
4
|
+
sticky?: boolean;
|
|
5
|
+
/** Top offset when sticky (in pixels) */
|
|
6
|
+
stickyOffset?: number;
|
|
7
|
+
/** Bottom boundary element selector */
|
|
8
|
+
boundarySelector?: string;
|
|
9
|
+
/** Gap between multiple ads */
|
|
10
|
+
gap?: number;
|
|
11
|
+
/** Additional ads to show below */
|
|
12
|
+
additionalSlots?: Array<{
|
|
13
|
+
slotId: string;
|
|
14
|
+
adUnitPath?: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
export declare function WakaAdSidebar({ slotId, sticky, stickyOffset, boundarySelector, gap, additionalSlots, className, ...bannerProps }: WakaAdSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default WakaAdSidebar;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WakaAdBannerProps } from '../waka-ad-banner';
|
|
2
|
+
export interface WakaAdStickyFooterProps extends Omit<WakaAdBannerProps, "size"> {
|
|
3
|
+
/** Allow user to dismiss */
|
|
4
|
+
dismissable?: boolean;
|
|
5
|
+
/** Show close button after delay (seconds) */
|
|
6
|
+
showCloseAfter?: number;
|
|
7
|
+
/** Animation style */
|
|
8
|
+
animation?: "slide" | "fade" | "none";
|
|
9
|
+
/** Safe area padding (for mobile notches) */
|
|
10
|
+
safeAreaPadding?: boolean;
|
|
11
|
+
/** Background blur */
|
|
12
|
+
blur?: boolean;
|
|
13
|
+
/** Container class name */
|
|
14
|
+
containerClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function WakaAdStickyFooter({ slotId, dismissable, showCloseAfter, animation, safeAreaPadding, blur, className, containerClassName, ...bannerProps }: WakaAdStickyFooterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export default WakaAdStickyFooter;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type RecommendationLayout = "grid" | "carousel" | "list";
|
|
2
|
+
export interface WakaContentRecommendationProps {
|
|
3
|
+
/** Widget title */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Slot IDs for recommendations */
|
|
6
|
+
slotIds: string[];
|
|
7
|
+
/** Layout style */
|
|
8
|
+
layout?: RecommendationLayout;
|
|
9
|
+
/** Number of columns for grid layout */
|
|
10
|
+
columns?: 2 | 3 | 4;
|
|
11
|
+
/** Show navigation arrows for carousel */
|
|
12
|
+
showArrows?: boolean;
|
|
13
|
+
/** Auto-scroll carousel */
|
|
14
|
+
autoScroll?: boolean;
|
|
15
|
+
/** Auto-scroll interval (seconds) */
|
|
16
|
+
autoScrollInterval?: number;
|
|
17
|
+
/** Custom class name */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Callback when item is clicked */
|
|
20
|
+
onItemClick?: (slotId: string) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function WakaContentRecommendation({ title, slotIds, layout, columns, showArrows, autoScroll, autoScrollInterval, className, onItemClick, }: WakaContentRecommendationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
export default WakaContentRecommendation;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface WakaOutstreamVideoProps {
|
|
2
|
+
/** Unique slot ID */
|
|
3
|
+
slotId: string;
|
|
4
|
+
/** Collapse when video ends or is closed */
|
|
5
|
+
collapseOnEnd?: boolean;
|
|
6
|
+
/** Collapse animation duration (ms) */
|
|
7
|
+
collapseDuration?: number;
|
|
8
|
+
/** Start muted */
|
|
9
|
+
muted?: boolean;
|
|
10
|
+
/** Show close button */
|
|
11
|
+
showClose?: boolean;
|
|
12
|
+
/** Close after seconds (0 = manual only) */
|
|
13
|
+
closeAfter?: number;
|
|
14
|
+
/** Minimum visibility to start playing (0-1) */
|
|
15
|
+
visibilityThreshold?: number;
|
|
16
|
+
/** Custom class name */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Callback when video completes */
|
|
19
|
+
onComplete?: () => void;
|
|
20
|
+
/** Callback when closed */
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function WakaOutstreamVideo({ slotId, collapseOnEnd, collapseDuration, muted, showClose, closeAfter, visibilityThreshold, className, onComplete, onClose, }: WakaOutstreamVideoProps): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
export default WakaOutstreamVideo;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SponsoredBadgeVariant = "default" | "subtle" | "outline" | "dark";
|
|
2
|
+
export type SponsoredBadgeSize = "sm" | "md" | "lg";
|
|
3
|
+
export interface WakaSponsoredBadgeProps {
|
|
4
|
+
/** Sponsor name (optional) */
|
|
5
|
+
sponsor?: string;
|
|
6
|
+
/** Badge variant */
|
|
7
|
+
variant?: SponsoredBadgeVariant;
|
|
8
|
+
/** Badge size */
|
|
9
|
+
size?: SponsoredBadgeSize;
|
|
10
|
+
/** Show info icon */
|
|
11
|
+
showIcon?: boolean;
|
|
12
|
+
/** Custom label text */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Custom class name */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Callback when info is clicked */
|
|
17
|
+
onInfoClick?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function WakaSponsoredBadge({ sponsor, variant, size, showIcon, label, className, onInfoClick, }: WakaSponsoredBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default WakaSponsoredBadge;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type SponsoredCardVariant = "article" | "product" | "compact" | "horizontal";
|
|
2
|
+
export interface WakaSponsoredCardProps {
|
|
3
|
+
/** Unique slot ID */
|
|
4
|
+
slotId: string;
|
|
5
|
+
/** Card variant */
|
|
6
|
+
variant?: SponsoredCardVariant;
|
|
7
|
+
/** GPT ad unit path */
|
|
8
|
+
adUnitPath?: string;
|
|
9
|
+
/** Show image */
|
|
10
|
+
showImage?: boolean;
|
|
11
|
+
/** Show description */
|
|
12
|
+
showDescription?: boolean;
|
|
13
|
+
/** Show CTA button */
|
|
14
|
+
showCta?: boolean;
|
|
15
|
+
/** Image aspect ratio */
|
|
16
|
+
aspectRatio?: "video" | "square" | "portrait";
|
|
17
|
+
/** Custom class name */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Callback when clicked */
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
/** Callback when loaded */
|
|
22
|
+
onLoad?: () => void;
|
|
23
|
+
}
|
|
24
|
+
export declare function WakaSponsoredCard({ slotId, variant, adUnitPath, showImage, showDescription, showCta, aspectRatio, className, onClick, onLoad, }: WakaSponsoredCardProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
+
export default WakaSponsoredCard;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SponsoredCardVariant } from '../waka-sponsored-card';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface WakaSponsoredFeedProps<T> {
|
|
4
|
+
/** Content items */
|
|
5
|
+
items: T[];
|
|
6
|
+
/** Render function for content items */
|
|
7
|
+
renderItem: (item: T, index: number) => React.ReactNode;
|
|
8
|
+
/** Ad slot IDs to inject */
|
|
9
|
+
adSlots: Array<{
|
|
10
|
+
slotId: string;
|
|
11
|
+
adUnitPath?: string;
|
|
12
|
+
}>;
|
|
13
|
+
/** Insert ad every N items */
|
|
14
|
+
adFrequency?: number;
|
|
15
|
+
/** Starting position for first ad (0-indexed) */
|
|
16
|
+
adStartPosition?: number;
|
|
17
|
+
/** Card variant for ads */
|
|
18
|
+
adVariant?: SponsoredCardVariant;
|
|
19
|
+
/** Maximum number of ads to show */
|
|
20
|
+
maxAds?: number;
|
|
21
|
+
/** Grid columns for items */
|
|
22
|
+
columns?: 1 | 2 | 3 | 4;
|
|
23
|
+
/** Gap between items */
|
|
24
|
+
gap?: "sm" | "md" | "lg";
|
|
25
|
+
/** Custom class name */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** Key extractor for items */
|
|
28
|
+
keyExtractor?: (item: T, index: number) => string;
|
|
29
|
+
}
|
|
30
|
+
export declare function WakaSponsoredFeed<T>({ items, renderItem, adSlots, adFrequency, adStartPosition, adVariant, maxAds, columns, gap, className, keyExtractor, }: WakaSponsoredFeedProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default WakaSponsoredFeed;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface WakaVideoAdProps {
|
|
2
|
+
/** Unique slot ID */
|
|
3
|
+
slotId: string;
|
|
4
|
+
/** Video width */
|
|
5
|
+
width?: number;
|
|
6
|
+
/** Video height */
|
|
7
|
+
height?: number;
|
|
8
|
+
/** Aspect ratio */
|
|
9
|
+
aspectRatio?: "16/9" | "4/3" | "1/1" | "9/16";
|
|
10
|
+
/** Autoplay when visible */
|
|
11
|
+
autoplay?: boolean;
|
|
12
|
+
/** Mute by default */
|
|
13
|
+
muted?: boolean;
|
|
14
|
+
/** Show controls */
|
|
15
|
+
showControls?: boolean;
|
|
16
|
+
/** Skip time in seconds (0 = no skip) */
|
|
17
|
+
skipAfter?: number;
|
|
18
|
+
/** Show progress bar */
|
|
19
|
+
showProgress?: boolean;
|
|
20
|
+
/** CTA overlay position */
|
|
21
|
+
ctaPosition?: "bottom" | "overlay" | "end";
|
|
22
|
+
/** Custom class name */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Callback when video completes */
|
|
25
|
+
onComplete?: () => void;
|
|
26
|
+
/** Callback when skipped */
|
|
27
|
+
onSkip?: () => void;
|
|
28
|
+
/** Callback when clicked */
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
}
|
|
31
|
+
export declare function WakaVideoAd({ slotId, width, height, aspectRatio, autoplay, muted, showControls, skipAfter, showProgress, ctaPosition, className, onComplete, onSkip, onClick, }: WakaVideoAdProps): import("react/jsx-runtime").JSX.Element | null;
|
|
32
|
+
export default WakaVideoAd;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type OverlayPosition = "bottom" | "top" | "corner";
|
|
2
|
+
export type OverlayTrigger = "start" | "pause" | "time" | "manual";
|
|
3
|
+
export interface WakaVideoOverlayProps {
|
|
4
|
+
/** Unique slot ID */
|
|
5
|
+
slotId: string;
|
|
6
|
+
/** Whether overlay is visible */
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
/** Trigger for showing overlay */
|
|
9
|
+
trigger?: OverlayTrigger;
|
|
10
|
+
/** Time trigger (seconds from start) */
|
|
11
|
+
triggerTime?: number;
|
|
12
|
+
/** Position of overlay */
|
|
13
|
+
position?: OverlayPosition;
|
|
14
|
+
/** Allow dismissing */
|
|
15
|
+
dismissable?: boolean;
|
|
16
|
+
/** Auto-hide after seconds (0 = manual) */
|
|
17
|
+
hideAfter?: number;
|
|
18
|
+
/** Custom class name */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Callback when dismissed */
|
|
21
|
+
onDismiss?: () => void;
|
|
22
|
+
/** Callback when clicked */
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function WakaVideoOverlay({ slotId, visible, trigger, triggerTime, position, dismissable, hideAfter, className, onDismiss, onClick, }: WakaVideoOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export default WakaVideoOverlay;
|