@thewhateverapp/tile-sdk 0.20.3 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { Background } from './types';
3
+ interface BackgroundLayerProps {
4
+ background: Background;
5
+ className?: string;
6
+ }
7
+ /**
8
+ * BackgroundLayer Component
9
+ *
10
+ * Renders the background layer for the unified template.
11
+ * Supports video, image, slideshow, or no background.
12
+ *
13
+ * Key Features:
14
+ * - Uses VideoPlayer from tile-sdk (singleton pattern - survives route transitions)
15
+ * - Uses Slideshow from tile-sdk (state persistence across /tile and /page)
16
+ * - Handles all background types with consistent API
17
+ */
18
+ export declare function BackgroundLayer({ background, className }: BackgroundLayerProps): React.JSX.Element;
19
+ export {};
20
+ //# sourceMappingURL=BackgroundLayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackgroundLayer.d.ts","sourceRoot":"","sources":["../../../src/components/unified/BackgroundLayer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,UAAU,EAQX,MAAM,SAAS,CAAC;AAEjB,UAAU,oBAAoB;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,SAAc,EAAE,EAAE,oBAAoB,qBAkGnF"}
@@ -0,0 +1,75 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ import { VideoPlayer, Slideshow } from '../../react';
4
+ import { isVideoBackground, isImageBackground, isSlideshowBackground, isNoneBackground, DEFAULT_VIDEO_OPTIONS, DEFAULT_IMAGE_OPTIONS, DEFAULT_SLIDESHOW_OPTIONS, } from './types';
5
+ /**
6
+ * BackgroundLayer Component
7
+ *
8
+ * Renders the background layer for the unified template.
9
+ * Supports video, image, slideshow, or no background.
10
+ *
11
+ * Key Features:
12
+ * - Uses VideoPlayer from tile-sdk (singleton pattern - survives route transitions)
13
+ * - Uses Slideshow from tile-sdk (state persistence across /tile and /page)
14
+ * - Handles all background types with consistent API
15
+ */
16
+ export function BackgroundLayer({ background, className = '' }) {
17
+ // Video Background
18
+ if (isVideoBackground(background)) {
19
+ const options = { ...DEFAULT_VIDEO_OPTIONS, ...background.options };
20
+ const videoUrl = background.assets[0];
21
+ return (React.createElement("div", { className: `absolute inset-0 ${className}` },
22
+ React.createElement(VideoPlayer, { src: videoUrl, loop: options.loop, autoplay: options.autoplay, muted: options.muted, controls: options.controls, className: "w-full h-full object-cover" })));
23
+ }
24
+ // Image Background
25
+ if (isImageBackground(background)) {
26
+ const options = { ...DEFAULT_IMAGE_OPTIONS, ...background.options };
27
+ const imageUrl = background.assets[0];
28
+ const imageStyle = {
29
+ objectFit: options.objectFit,
30
+ objectPosition: options.position,
31
+ filter: [
32
+ options.blur ? `blur(${options.blur}px)` : '',
33
+ options.brightness !== 100 ? `brightness(${options.brightness}%)` : '',
34
+ options.contrast !== 100 ? `contrast(${options.contrast}%)` : '',
35
+ ]
36
+ .filter(Boolean)
37
+ .join(' '),
38
+ };
39
+ return (React.createElement("div", { className: `absolute inset-0 ${className}` },
40
+ React.createElement("img", { src: imageUrl, alt: "Background", className: "w-full h-full", style: imageStyle })));
41
+ }
42
+ // Slideshow Background
43
+ if (isSlideshowBackground(background)) {
44
+ const options = { ...DEFAULT_SLIDESHOW_OPTIONS, ...background.options };
45
+ // Convert string[] to SlideImage[]
46
+ const slideImages = background.assets.map((url) => ({ url }));
47
+ // Map transition types (our 'zoom' → slideshow's supported types)
48
+ const transition = options.transition === 'zoom' ? 'fade' : options.transition;
49
+ return (React.createElement("div", { className: `absolute inset-0 ${className}` },
50
+ React.createElement(Slideshow, { images: slideImages, intervalMs: options.interval, autoAdvance: true, transition: transition, showDots: options.showIndicators, showArrows: options.showControls, className: "w-full h-full" })));
51
+ }
52
+ // None Background (solid color, gradient, or pattern)
53
+ if (isNoneBackground(background)) {
54
+ const { color, gradient, pattern } = background.options || {};
55
+ let style = {};
56
+ if (pattern) {
57
+ style.backgroundImage = `url(${pattern})`;
58
+ style.backgroundSize = 'cover';
59
+ style.backgroundPosition = 'center';
60
+ }
61
+ else if (gradient) {
62
+ style.background = gradient;
63
+ }
64
+ else if (color) {
65
+ style.backgroundColor = color;
66
+ }
67
+ else {
68
+ // Default to transparent
69
+ style.backgroundColor = 'transparent';
70
+ }
71
+ return React.createElement("div", { className: `absolute inset-0 ${className}`, style: style });
72
+ }
73
+ // Fallback: transparent background
74
+ return React.createElement("div", { className: `absolute inset-0 ${className}` });
75
+ }
@@ -0,0 +1,16 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { ContentConfig } from './types';
3
+ interface ContentLayerProps {
4
+ content: ContentConfig;
5
+ children: ReactNode;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * ContentLayer Component
10
+ *
11
+ * Wraps interactive content and applies layout configuration.
12
+ * This is where the AI-generated interactive components are rendered.
13
+ */
14
+ export declare function ContentLayer({ content, children, className }: ContentLayerProps): React.JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=ContentLayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentLayer.d.ts","sourceRoot":"","sources":["../../../src/components/unified/ContentLayer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,iBAAiB;IACzB,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAc,EAAE,EAAE,iBAAiB,qBA6BpF"}
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ /**
4
+ * ContentLayer Component
5
+ *
6
+ * Wraps interactive content and applies layout configuration.
7
+ * This is where the AI-generated interactive components are rendered.
8
+ */
9
+ export function ContentLayer({ content, children, className = '' }) {
10
+ const { layout } = content;
11
+ // Build container styles based on layout configuration
12
+ const containerStyle = {
13
+ width: layout?.width,
14
+ height: layout?.height,
15
+ padding: layout?.padding,
16
+ margin: layout?.margin,
17
+ };
18
+ // Position classes
19
+ const positionClasses = {
20
+ top: 'items-start justify-center',
21
+ center: 'items-center justify-center',
22
+ bottom: 'items-end justify-center',
23
+ floating: 'items-start justify-start',
24
+ };
25
+ const position = layout?.position || 'center';
26
+ const positionClass = positionClasses[position] || positionClasses.center;
27
+ return (React.createElement("div", { className: `absolute inset-0 flex ${positionClass} ${className}` },
28
+ React.createElement("div", { style: containerStyle, className: "w-full max-w-full" }, children)));
29
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { OverlayConfig } from './types';
3
+ interface OverlayLayerProps {
4
+ overlay?: OverlayConfig;
5
+ className?: string;
6
+ }
7
+ /**
8
+ * OverlayLayer Component
9
+ *
10
+ * Renders an overlay on top of the background layer.
11
+ * Supports gradient, solid color, or blur overlays.
12
+ */
13
+ export declare function OverlayLayer({ overlay, className }: OverlayLayerProps): React.JSX.Element | null;
14
+ export {};
15
+ //# sourceMappingURL=OverlayLayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverlayLayer.d.ts","sourceRoot":"","sources":["../../../src/components/unified/OverlayLayer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAA0B,MAAM,SAAS,CAAC;AAEhE,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,SAAc,EAAE,EAAE,iBAAiB,4BAqC1E"}
@@ -0,0 +1,44 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ import { DEFAULT_OVERLAY_CONFIG } from './types';
4
+ /**
5
+ * OverlayLayer Component
6
+ *
7
+ * Renders an overlay on top of the background layer.
8
+ * Supports gradient, solid color, or blur overlays.
9
+ */
10
+ export function OverlayLayer({ overlay, className = '' }) {
11
+ if (!overlay?.enabled) {
12
+ return null;
13
+ }
14
+ const config = { ...DEFAULT_OVERLAY_CONFIG, ...overlay };
15
+ const opacity = (config.opacity ?? 50) / 100;
16
+ let style = {
17
+ opacity,
18
+ };
19
+ if (config.type === 'gradient' && config.gradient) {
20
+ const { from, to, direction = 'bottom' } = config.gradient;
21
+ const gradientDirection = {
22
+ top: 'to top',
23
+ bottom: 'to bottom',
24
+ left: 'to left',
25
+ right: 'to right',
26
+ radial: 'radial-gradient(circle',
27
+ };
28
+ const dir = gradientDirection[direction] || 'to bottom';
29
+ if (direction === 'radial') {
30
+ style.background = `radial-gradient(circle, ${from}, ${to})`;
31
+ }
32
+ else {
33
+ style.background = `linear-gradient(${dir}, ${from}, ${to})`;
34
+ }
35
+ }
36
+ else if (config.type === 'solid' && config.color) {
37
+ style.backgroundColor = config.color;
38
+ }
39
+ else if (config.type === 'blur') {
40
+ style.backdropFilter = `blur(${config.blur || 10}px)`;
41
+ style.WebkitBackdropFilter = `blur(${config.blur || 10}px)`;
42
+ }
43
+ return React.createElement("div", { className: `absolute inset-0 pointer-events-none ${className}`, style: style });
44
+ }
@@ -0,0 +1,21 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { UnifiedTemplateConfig } from './types';
3
+ interface UnifiedTemplateProps {
4
+ config: UnifiedTemplateConfig;
5
+ children: ReactNode;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * UnifiedTemplate Component
10
+ *
11
+ * Main wrapper component that combines all layers:
12
+ * 1. Background Layer (video, image, slideshow, or none)
13
+ * 2. Overlay Layer (optional gradient, solid, or blur)
14
+ * 3. Content Layer (interactive components)
15
+ *
16
+ * This component is used by both /tile and /page routes to ensure
17
+ * consistent rendering and state preservation across navigation.
18
+ */
19
+ export declare function UnifiedTemplate({ config, children, className }: UnifiedTemplateProps): React.JSX.Element;
20
+ export {};
21
+ //# sourceMappingURL=UnifiedTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnifiedTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/unified/UnifiedTemplate.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,UAAU,oBAAoB;IAC5B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAc,EAAE,EAAE,oBAAoB,qBAyBzF"}
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ import { BackgroundLayer } from './BackgroundLayer';
4
+ import { OverlayLayer } from './OverlayLayer';
5
+ import { ContentLayer } from './ContentLayer';
6
+ /**
7
+ * UnifiedTemplate Component
8
+ *
9
+ * Main wrapper component that combines all layers:
10
+ * 1. Background Layer (video, image, slideshow, or none)
11
+ * 2. Overlay Layer (optional gradient, solid, or blur)
12
+ * 3. Content Layer (interactive components)
13
+ *
14
+ * This component is used by both /tile and /page routes to ensure
15
+ * consistent rendering and state preservation across navigation.
16
+ */
17
+ export function UnifiedTemplate({ config, children, className = '' }) {
18
+ const { background, overlay, content, layout } = config;
19
+ // Layout classes
20
+ const layoutClasses = {
21
+ standard: '',
22
+ fullscreen: 'overflow-hidden',
23
+ overlay: 'relative',
24
+ split: 'grid grid-cols-1 md:grid-cols-2',
25
+ };
26
+ const layoutClass = layoutClasses[layout] || layoutClasses.standard;
27
+ return (React.createElement("div", { className: `relative w-full h-full ${layoutClass} ${className}` },
28
+ React.createElement(BackgroundLayer, { background: background }),
29
+ React.createElement(OverlayLayer, { overlay: overlay }),
30
+ React.createElement(ContentLayer, { content: content }, children)));
31
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Unified Template Components
3
+ *
4
+ * These components provide the foundation for the unified tile template.
5
+ * All tiles use this same structure with optional media backgrounds.
6
+ */
7
+ export * from './types';
8
+ export { BackgroundLayer } from './BackgroundLayer';
9
+ export { OverlayLayer } from './OverlayLayer';
10
+ export { ContentLayer } from './ContentLayer';
11
+ export { UnifiedTemplate } from './UnifiedTemplate';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/unified/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Unified Template Components
3
+ *
4
+ * These components provide the foundation for the unified tile template.
5
+ * All tiles use this same structure with optional media backgrounds.
6
+ */
7
+ // Export types
8
+ export * from './types';
9
+ // Export components
10
+ export { BackgroundLayer } from './BackgroundLayer';
11
+ export { OverlayLayer } from './OverlayLayer';
12
+ export { ContentLayer } from './ContentLayer';
13
+ export { UnifiedTemplate } from './UnifiedTemplate';
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Unified Template Types
3
+ *
4
+ * This template consolidates all previous template types (video, image, slideshow, hybrid)
5
+ * into one consistent structure with optional backgrounds and interactive content.
6
+ */
7
+ export type BackgroundType = 'video' | 'image' | 'slideshow' | 'none';
8
+ export interface VideoBackground {
9
+ type: 'video';
10
+ assets: [string];
11
+ options?: {
12
+ loop?: boolean;
13
+ autoplay?: boolean;
14
+ muted?: boolean;
15
+ controls?: boolean;
16
+ playbackRate?: number;
17
+ };
18
+ }
19
+ export interface ImageBackground {
20
+ type: 'image';
21
+ assets: [string];
22
+ options?: {
23
+ objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
24
+ position?: string;
25
+ blur?: number;
26
+ brightness?: number;
27
+ contrast?: number;
28
+ };
29
+ }
30
+ export interface SlideshowBackground {
31
+ type: 'slideshow';
32
+ assets: string[];
33
+ options?: {
34
+ interval?: number;
35
+ transition?: 'fade' | 'slide' | 'zoom' | 'none';
36
+ transitionDuration?: number;
37
+ loop?: boolean;
38
+ objectFit?: 'cover' | 'contain' | 'fill';
39
+ showIndicators?: boolean;
40
+ showControls?: boolean;
41
+ };
42
+ }
43
+ export interface NoneBackground {
44
+ type: 'none';
45
+ options?: {
46
+ color?: string;
47
+ gradient?: string;
48
+ pattern?: string;
49
+ };
50
+ }
51
+ export type Background = VideoBackground | ImageBackground | SlideshowBackground | NoneBackground;
52
+ export type LayoutType = 'standard' | 'fullscreen' | 'overlay' | 'split';
53
+ export interface OverlayConfig {
54
+ enabled: boolean;
55
+ type?: 'gradient' | 'solid' | 'blur';
56
+ opacity?: number;
57
+ color?: string;
58
+ blur?: number;
59
+ gradient?: {
60
+ from: string;
61
+ to: string;
62
+ direction?: 'top' | 'bottom' | 'left' | 'right' | 'radial';
63
+ };
64
+ }
65
+ export interface ContentConfig {
66
+ type: string;
67
+ data?: any;
68
+ layout?: {
69
+ position?: 'top' | 'center' | 'bottom' | 'floating';
70
+ width?: string | number;
71
+ height?: string | number;
72
+ padding?: string | number;
73
+ margin?: string | number;
74
+ };
75
+ }
76
+ export interface UnifiedTemplateConfig {
77
+ layout: LayoutType;
78
+ background: Background;
79
+ overlay?: OverlayConfig;
80
+ content: ContentConfig;
81
+ metadata?: {
82
+ title?: string;
83
+ description?: string;
84
+ author?: string;
85
+ version?: string;
86
+ };
87
+ }
88
+ /**
89
+ * Helper type guards
90
+ */
91
+ export declare function isVideoBackground(bg: Background): bg is VideoBackground;
92
+ export declare function isImageBackground(bg: Background): bg is ImageBackground;
93
+ export declare function isSlideshowBackground(bg: Background): bg is SlideshowBackground;
94
+ export declare function isNoneBackground(bg: Background): bg is NoneBackground;
95
+ /**
96
+ * Default configurations
97
+ */
98
+ export declare const DEFAULT_VIDEO_OPTIONS: VideoBackground['options'];
99
+ export declare const DEFAULT_IMAGE_OPTIONS: ImageBackground['options'];
100
+ export declare const DEFAULT_SLIDESHOW_OPTIONS: SlideshowBackground['options'];
101
+ export declare const DEFAULT_OVERLAY_CONFIG: OverlayConfig;
102
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/unified/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IACjB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;IACjB,OAAO,CAAC,EAAE;QACR,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;QACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,C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AO,MAAM,qBAAqB,EAAE,eAAe,CAAC,SAAS,CAM5D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,mBAAmB,CAAC,SAAS,CAQpE,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aASpC,CAAC"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Unified Template Types
3
+ *
4
+ * This template consolidates all previous template types (video, image, slideshow, hybrid)
5
+ * into one consistent structure with optional backgrounds and interactive content.
6
+ */
7
+ /**
8
+ * Helper type guards
9
+ */
10
+ export function isVideoBackground(bg) {
11
+ return bg.type === 'video';
12
+ }
13
+ export function isImageBackground(bg) {
14
+ return bg.type === 'image';
15
+ }
16
+ export function isSlideshowBackground(bg) {
17
+ return bg.type === 'slideshow';
18
+ }
19
+ export function isNoneBackground(bg) {
20
+ return bg.type === 'none';
21
+ }
22
+ /**
23
+ * Default configurations
24
+ */
25
+ export const DEFAULT_VIDEO_OPTIONS = {
26
+ loop: true,
27
+ autoplay: true,
28
+ muted: false,
29
+ controls: false,
30
+ playbackRate: 1,
31
+ };
32
+ export const DEFAULT_IMAGE_OPTIONS = {
33
+ objectFit: 'cover',
34
+ position: 'center',
35
+ blur: 0,
36
+ brightness: 100,
37
+ contrast: 100,
38
+ };
39
+ export const DEFAULT_SLIDESHOW_OPTIONS = {
40
+ interval: 3000,
41
+ transition: 'fade',
42
+ transitionDuration: 500,
43
+ loop: true,
44
+ objectFit: 'cover',
45
+ showIndicators: true,
46
+ showControls: false,
47
+ };
48
+ export const DEFAULT_OVERLAY_CONFIG = {
49
+ enabled: false,
50
+ type: 'gradient',
51
+ opacity: 50,
52
+ gradient: {
53
+ from: 'rgba(0, 0, 0, 0.8)',
54
+ to: 'rgba(0, 0, 0, 0.2)',
55
+ direction: 'bottom',
56
+ },
57
+ };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@ export { useKeyboard } from './react/useKeyboard.js';
6
6
  export { useViewport } from './react/useViewport.js';
7
7
  export { TileContainer } from './react/TileContainer.js';
8
8
  export { withTile } from './react/withTile.js';
9
+ export { UnifiedTemplate, BackgroundLayer, OverlayLayer, ContentLayer, } from './components/unified/index.js';
10
+ export type { UnifiedTemplateConfig, Background, VideoBackground, ImageBackground, SlideshowBackground, NoneBackground, BackgroundType, LayoutType, OverlayConfig, ContentConfig, } from './components/unified/index.js';
9
11
  export { VideoPlayer, useVideoState, useVideo, // Alias for useVideoState
10
12
  useCuePoint, useCuePoints, useVideoProgress, Slideshow, useSlideshowState, useSlideshow, // Alias for useSlideshowState
11
13
  OverlaySlot, FullOverlay, GradientOverlay, } from './react/overlay/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACpE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,OAAO,EAEL,WAAW,EACX,aAAa,EACb,QAAQ,EAAE,0BAA0B;AACpC,WAAW,EACX,YAAY,EACZ,gBAAgB,EAEhB,SAAS,EACT,iBAAiB,EACjB,YAAY,EAAE,8BAA8B;AAE5C,WAAW,EACX,WAAW,EACX,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAEV,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,QAAQ,EAER,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,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B,CAAC"}
package/dist/index.js CHANGED
@@ -6,6 +6,8 @@ export { useKeyboard } from './react/useKeyboard.js';
6
6
  export { useViewport } from './react/useViewport.js';
7
7
  export { TileContainer } from './react/TileContainer.js';
8
8
  export { withTile } from './react/withTile.js';
9
+ // Unified Template Components (all tiles use this structure)
10
+ export { UnifiedTemplate, BackgroundLayer, OverlayLayer, ContentLayer, } from './components/unified/index.js';
9
11
  // Overlay components for hybrid tiles (video/image with interactive overlays)
10
12
  export {
11
13
  // Video player (with route persistence)
@@ -59,21 +59,21 @@ declare const CaptionTrackSchema: z.ZodObject<{
59
59
  background: z.ZodOptional<z.ZodEnum<["none", "solid", "gradient"]>>;
60
60
  color: z.ZodOptional<z.ZodString>;
61
61
  }, "strip", z.ZodTypeAny, {
62
- position: "center" | "bottom" | "top";
62
+ position: "center" | "top" | "bottom";
63
63
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
64
- background?: "none" | "solid" | "gradient" | undefined;
64
+ background?: "none" | "gradient" | "solid" | undefined;
65
65
  color?: string | undefined;
66
66
  }, {
67
- position: "center" | "bottom" | "top";
67
+ position: "center" | "top" | "bottom";
68
68
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
69
- background?: "none" | "solid" | "gradient" | undefined;
69
+ background?: "none" | "gradient" | "solid" | undefined;
70
70
  color?: string | undefined;
71
71
  }>;
72
72
  }, "strip", z.ZodTypeAny, {
73
73
  style: {
74
- position: "center" | "bottom" | "top";
74
+ position: "center" | "top" | "bottom";
75
75
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
76
- background?: "none" | "solid" | "gradient" | undefined;
76
+ background?: "none" | "gradient" | "solid" | undefined;
77
77
  color?: string | undefined;
78
78
  };
79
79
  segments: {
@@ -84,9 +84,9 @@ declare const CaptionTrackSchema: z.ZodObject<{
84
84
  }[];
85
85
  }, {
86
86
  style: {
87
- position: "center" | "bottom" | "top";
87
+ position: "center" | "top" | "bottom";
88
88
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
89
- background?: "none" | "solid" | "gradient" | undefined;
89
+ background?: "none" | "gradient" | "solid" | undefined;
90
90
  color?: string | undefined;
91
91
  };
92
92
  segments: {
@@ -102,11 +102,11 @@ declare const PlacementSchema: z.ZodUnion<[z.ZodObject<{
102
102
  inset: z.ZodOptional<z.ZodNumber>;
103
103
  align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
104
104
  }, "strip", z.ZodTypeAny, {
105
- lane: "center" | "bottom" | "top";
105
+ lane: "center" | "top" | "bottom";
106
106
  align?: "center" | "left" | "right" | undefined;
107
107
  inset?: number | undefined;
108
108
  }, {
109
- lane: "center" | "bottom" | "top";
109
+ lane: "center" | "top" | "bottom";
110
110
  align?: "center" | "left" | "right" | undefined;
111
111
  inset?: number | undefined;
112
112
  }>, z.ZodObject<{
@@ -119,13 +119,13 @@ declare const PlacementSchema: z.ZodUnion<[z.ZodObject<{
119
119
  }, "strip", z.ZodTypeAny, {
120
120
  left?: number | undefined;
121
121
  right?: number | undefined;
122
- bottom?: number | undefined;
123
122
  top?: number | undefined;
123
+ bottom?: number | undefined;
124
124
  }, {
125
125
  left?: number | undefined;
126
126
  right?: number | undefined;
127
- bottom?: number | undefined;
128
127
  top?: number | undefined;
128
+ bottom?: number | undefined;
129
129
  }>>;
130
130
  position: z.ZodOptional<z.ZodObject<{
131
131
  x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
@@ -138,24 +138,24 @@ declare const PlacementSchema: z.ZodUnion<[z.ZodObject<{
138
138
  y: string | number;
139
139
  }>>;
140
140
  }, "strip", z.ZodTypeAny, {
141
- type: "inset" | "fullscreen" | "positioned";
141
+ type: "fullscreen" | "inset" | "positioned";
142
142
  insets?: {
143
143
  left?: number | undefined;
144
144
  right?: number | undefined;
145
- bottom?: number | undefined;
146
145
  top?: number | undefined;
146
+ bottom?: number | undefined;
147
147
  } | undefined;
148
148
  position?: {
149
149
  x: string | number;
150
150
  y: string | number;
151
151
  } | undefined;
152
152
  }, {
153
- type: "inset" | "fullscreen" | "positioned";
153
+ type: "fullscreen" | "inset" | "positioned";
154
154
  insets?: {
155
155
  left?: number | undefined;
156
156
  right?: number | undefined;
157
- bottom?: number | undefined;
158
157
  top?: number | undefined;
158
+ bottom?: number | undefined;
159
159
  } | undefined;
160
160
  position?: {
161
161
  x: string | number;
@@ -180,11 +180,11 @@ declare const OverlayCueSchema: z.ZodObject<{
180
180
  inset: z.ZodOptional<z.ZodNumber>;
181
181
  align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
182
182
  }, "strip", z.ZodTypeAny, {
183
- lane: "center" | "bottom" | "top";
183
+ lane: "center" | "top" | "bottom";
184
184
  align?: "center" | "left" | "right" | undefined;
185
185
  inset?: number | undefined;
186
186
  }, {
187
- lane: "center" | "bottom" | "top";
187
+ lane: "center" | "top" | "bottom";
188
188
  align?: "center" | "left" | "right" | undefined;
189
189
  inset?: number | undefined;
190
190
  }>, z.ZodObject<{
@@ -197,13 +197,13 @@ declare const OverlayCueSchema: z.ZodObject<{
197
197
  }, "strip", z.ZodTypeAny, {
198
198
  left?: number | undefined;
199
199
  right?: number | undefined;
200
- bottom?: number | undefined;
201
200
  top?: number | undefined;
201
+ bottom?: number | undefined;
202
202
  }, {
203
203
  left?: number | undefined;
204
204
  right?: number | undefined;
205
- bottom?: number | undefined;
206
205
  top?: number | undefined;
206
+ bottom?: number | undefined;
207
207
  }>>;
208
208
  position: z.ZodOptional<z.ZodObject<{
209
209
  x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
@@ -216,24 +216,24 @@ declare const OverlayCueSchema: z.ZodObject<{
216
216
  y: string | number;
217
217
  }>>;
218
218
  }, "strip", z.ZodTypeAny, {
219
- type: "inset" | "fullscreen" | "positioned";
219
+ type: "fullscreen" | "inset" | "positioned";
220
220
  insets?: {
221
221
  left?: number | undefined;
222
222
  right?: number | undefined;
223
- bottom?: number | undefined;
224
223
  top?: number | undefined;
224
+ bottom?: number | undefined;
225
225
  } | undefined;
226
226
  position?: {
227
227
  x: string | number;
228
228
  y: string | number;
229
229
  } | undefined;
230
230
  }, {
231
- type: "inset" | "fullscreen" | "positioned";
231
+ type: "fullscreen" | "inset" | "positioned";
232
232
  insets?: {
233
233
  left?: number | undefined;
234
234
  right?: number | undefined;
235
- bottom?: number | undefined;
236
235
  top?: number | undefined;
236
+ bottom?: number | undefined;
237
237
  } | undefined;
238
238
  position?: {
239
239
  x: string | number;
@@ -263,16 +263,16 @@ declare const OverlayCueSchema: z.ZodObject<{
263
263
  endMs?: number | undefined;
264
264
  };
265
265
  placement: {
266
- lane: "center" | "bottom" | "top";
266
+ lane: "center" | "top" | "bottom";
267
267
  align?: "center" | "left" | "right" | undefined;
268
268
  inset?: number | undefined;
269
269
  } | {
270
- type: "inset" | "fullscreen" | "positioned";
270
+ type: "fullscreen" | "inset" | "positioned";
271
271
  insets?: {
272
272
  left?: number | undefined;
273
273
  right?: number | undefined;
274
- bottom?: number | undefined;
275
274
  top?: number | undefined;
275
+ bottom?: number | undefined;
276
276
  } | undefined;
277
277
  position?: {
278
278
  x: string | number;
@@ -294,16 +294,16 @@ declare const OverlayCueSchema: z.ZodObject<{
294
294
  endMs?: number | undefined;
295
295
  };
296
296
  placement: {
297
- lane: "center" | "bottom" | "top";
297
+ lane: "center" | "top" | "bottom";
298
298
  align?: "center" | "left" | "right" | undefined;
299
299
  inset?: number | undefined;
300
300
  } | {
301
- type: "inset" | "fullscreen" | "positioned";
301
+ type: "fullscreen" | "inset" | "positioned";
302
302
  insets?: {
303
303
  left?: number | undefined;
304
304
  right?: number | undefined;
305
- bottom?: number | undefined;
306
305
  top?: number | undefined;
306
+ bottom?: number | undefined;
307
307
  } | undefined;
308
308
  position?: {
309
309
  x: string | number;
@@ -406,21 +406,21 @@ export declare const OverlaySpecSchema: z.ZodObject<{
406
406
  background: z.ZodOptional<z.ZodEnum<["none", "solid", "gradient"]>>;
407
407
  color: z.ZodOptional<z.ZodString>;
408
408
  }, "strip", z.ZodTypeAny, {
409
- position: "center" | "bottom" | "top";
409
+ position: "center" | "top" | "bottom";
410
410
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
411
- background?: "none" | "solid" | "gradient" | undefined;
411
+ background?: "none" | "gradient" | "solid" | undefined;
412
412
  color?: string | undefined;
413
413
  }, {
414
- position: "center" | "bottom" | "top";
414
+ position: "center" | "top" | "bottom";
415
415
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
416
- background?: "none" | "solid" | "gradient" | undefined;
416
+ background?: "none" | "gradient" | "solid" | undefined;
417
417
  color?: string | undefined;
418
418
  }>;
419
419
  }, "strip", z.ZodTypeAny, {
420
420
  style: {
421
- position: "center" | "bottom" | "top";
421
+ position: "center" | "top" | "bottom";
422
422
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
423
- background?: "none" | "solid" | "gradient" | undefined;
423
+ background?: "none" | "gradient" | "solid" | undefined;
424
424
  color?: string | undefined;
425
425
  };
426
426
  segments: {
@@ -431,9 +431,9 @@ export declare const OverlaySpecSchema: z.ZodObject<{
431
431
  }[];
432
432
  }, {
433
433
  style: {
434
- position: "center" | "bottom" | "top";
434
+ position: "center" | "top" | "bottom";
435
435
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
436
- background?: "none" | "solid" | "gradient" | undefined;
436
+ background?: "none" | "gradient" | "solid" | undefined;
437
437
  color?: string | undefined;
438
438
  };
439
439
  segments: {
@@ -461,11 +461,11 @@ export declare const OverlaySpecSchema: z.ZodObject<{
461
461
  inset: z.ZodOptional<z.ZodNumber>;
462
462
  align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
463
463
  }, "strip", z.ZodTypeAny, {
464
- lane: "center" | "bottom" | "top";
464
+ lane: "center" | "top" | "bottom";
465
465
  align?: "center" | "left" | "right" | undefined;
466
466
  inset?: number | undefined;
467
467
  }, {
468
- lane: "center" | "bottom" | "top";
468
+ lane: "center" | "top" | "bottom";
469
469
  align?: "center" | "left" | "right" | undefined;
470
470
  inset?: number | undefined;
471
471
  }>, z.ZodObject<{
@@ -478,13 +478,13 @@ export declare const OverlaySpecSchema: z.ZodObject<{
478
478
  }, "strip", z.ZodTypeAny, {
479
479
  left?: number | undefined;
480
480
  right?: number | undefined;
481
- bottom?: number | undefined;
482
481
  top?: number | undefined;
482
+ bottom?: number | undefined;
483
483
  }, {
484
484
  left?: number | undefined;
485
485
  right?: number | undefined;
486
- bottom?: number | undefined;
487
486
  top?: number | undefined;
487
+ bottom?: number | undefined;
488
488
  }>>;
489
489
  position: z.ZodOptional<z.ZodObject<{
490
490
  x: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
@@ -497,24 +497,24 @@ export declare const OverlaySpecSchema: z.ZodObject<{
497
497
  y: string | number;
498
498
  }>>;
499
499
  }, "strip", z.ZodTypeAny, {
500
- type: "inset" | "fullscreen" | "positioned";
500
+ type: "fullscreen" | "inset" | "positioned";
501
501
  insets?: {
502
502
  left?: number | undefined;
503
503
  right?: number | undefined;
504
- bottom?: number | undefined;
505
504
  top?: number | undefined;
505
+ bottom?: number | undefined;
506
506
  } | undefined;
507
507
  position?: {
508
508
  x: string | number;
509
509
  y: string | number;
510
510
  } | undefined;
511
511
  }, {
512
- type: "inset" | "fullscreen" | "positioned";
512
+ type: "fullscreen" | "inset" | "positioned";
513
513
  insets?: {
514
514
  left?: number | undefined;
515
515
  right?: number | undefined;
516
- bottom?: number | undefined;
517
516
  top?: number | undefined;
517
+ bottom?: number | undefined;
518
518
  } | undefined;
519
519
  position?: {
520
520
  x: string | number;
@@ -544,16 +544,16 @@ export declare const OverlaySpecSchema: z.ZodObject<{
544
544
  endMs?: number | undefined;
545
545
  };
546
546
  placement: {
547
- lane: "center" | "bottom" | "top";
547
+ lane: "center" | "top" | "bottom";
548
548
  align?: "center" | "left" | "right" | undefined;
549
549
  inset?: number | undefined;
550
550
  } | {
551
- type: "inset" | "fullscreen" | "positioned";
551
+ type: "fullscreen" | "inset" | "positioned";
552
552
  insets?: {
553
553
  left?: number | undefined;
554
554
  right?: number | undefined;
555
- bottom?: number | undefined;
556
555
  top?: number | undefined;
556
+ bottom?: number | undefined;
557
557
  } | undefined;
558
558
  position?: {
559
559
  x: string | number;
@@ -575,16 +575,16 @@ export declare const OverlaySpecSchema: z.ZodObject<{
575
575
  endMs?: number | undefined;
576
576
  };
577
577
  placement: {
578
- lane: "center" | "bottom" | "top";
578
+ lane: "center" | "top" | "bottom";
579
579
  align?: "center" | "left" | "right" | undefined;
580
580
  inset?: number | undefined;
581
581
  } | {
582
- type: "inset" | "fullscreen" | "positioned";
582
+ type: "fullscreen" | "inset" | "positioned";
583
583
  insets?: {
584
584
  left?: number | undefined;
585
585
  right?: number | undefined;
586
- bottom?: number | undefined;
587
586
  top?: number | undefined;
587
+ bottom?: number | undefined;
588
588
  } | undefined;
589
589
  position?: {
590
590
  x: string | number;
@@ -608,16 +608,16 @@ export declare const OverlaySpecSchema: z.ZodObject<{
608
608
  endMs?: number | undefined;
609
609
  };
610
610
  placement: {
611
- lane: "center" | "bottom" | "top";
611
+ lane: "center" | "top" | "bottom";
612
612
  align?: "center" | "left" | "right" | undefined;
613
613
  inset?: number | undefined;
614
614
  } | {
615
- type: "inset" | "fullscreen" | "positioned";
615
+ type: "fullscreen" | "inset" | "positioned";
616
616
  insets?: {
617
617
  left?: number | undefined;
618
618
  right?: number | undefined;
619
- bottom?: number | undefined;
620
619
  top?: number | undefined;
620
+ bottom?: number | undefined;
621
621
  } | undefined;
622
622
  position?: {
623
623
  x: string | number;
@@ -634,9 +634,9 @@ export declare const OverlaySpecSchema: z.ZodObject<{
634
634
  }[];
635
635
  captions?: {
636
636
  style: {
637
- position: "center" | "bottom" | "top";
637
+ position: "center" | "top" | "bottom";
638
638
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
639
- background?: "none" | "solid" | "gradient" | undefined;
639
+ background?: "none" | "gradient" | "solid" | undefined;
640
640
  color?: string | undefined;
641
641
  };
642
642
  segments: {
@@ -655,16 +655,16 @@ export declare const OverlaySpecSchema: z.ZodObject<{
655
655
  endMs?: number | undefined;
656
656
  };
657
657
  placement: {
658
- lane: "center" | "bottom" | "top";
658
+ lane: "center" | "top" | "bottom";
659
659
  align?: "center" | "left" | "right" | undefined;
660
660
  inset?: number | undefined;
661
661
  } | {
662
- type: "inset" | "fullscreen" | "positioned";
662
+ type: "fullscreen" | "inset" | "positioned";
663
663
  insets?: {
664
664
  left?: number | undefined;
665
665
  right?: number | undefined;
666
- bottom?: number | undefined;
667
666
  top?: number | undefined;
667
+ bottom?: number | undefined;
668
668
  } | undefined;
669
669
  position?: {
670
670
  x: string | number;
@@ -681,9 +681,9 @@ export declare const OverlaySpecSchema: z.ZodObject<{
681
681
  }[];
682
682
  captions?: {
683
683
  style: {
684
- position: "center" | "bottom" | "top";
684
+ position: "center" | "top" | "bottom";
685
685
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
686
- background?: "none" | "solid" | "gradient" | undefined;
686
+ background?: "none" | "gradient" | "solid" | undefined;
687
687
  color?: string | undefined;
688
688
  };
689
689
  segments: {
@@ -740,16 +740,16 @@ export declare const OverlaySpecSchema: z.ZodObject<{
740
740
  endMs?: number | undefined;
741
741
  };
742
742
  placement: {
743
- lane: "center" | "bottom" | "top";
743
+ lane: "center" | "top" | "bottom";
744
744
  align?: "center" | "left" | "right" | undefined;
745
745
  inset?: number | undefined;
746
746
  } | {
747
- type: "inset" | "fullscreen" | "positioned";
747
+ type: "fullscreen" | "inset" | "positioned";
748
748
  insets?: {
749
749
  left?: number | undefined;
750
750
  right?: number | undefined;
751
- bottom?: number | undefined;
752
751
  top?: number | undefined;
752
+ bottom?: number | undefined;
753
753
  } | undefined;
754
754
  position?: {
755
755
  x: string | number;
@@ -766,9 +766,9 @@ export declare const OverlaySpecSchema: z.ZodObject<{
766
766
  }[];
767
767
  captions?: {
768
768
  style: {
769
- position: "center" | "bottom" | "top";
769
+ position: "center" | "top" | "bottom";
770
770
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
771
- background?: "none" | "solid" | "gradient" | undefined;
771
+ background?: "none" | "gradient" | "solid" | undefined;
772
772
  color?: string | undefined;
773
773
  };
774
774
  segments: {
@@ -819,16 +819,16 @@ export declare const OverlaySpecSchema: z.ZodObject<{
819
819
  endMs?: number | undefined;
820
820
  };
821
821
  placement: {
822
- lane: "center" | "bottom" | "top";
822
+ lane: "center" | "top" | "bottom";
823
823
  align?: "center" | "left" | "right" | undefined;
824
824
  inset?: number | undefined;
825
825
  } | {
826
- type: "inset" | "fullscreen" | "positioned";
826
+ type: "fullscreen" | "inset" | "positioned";
827
827
  insets?: {
828
828
  left?: number | undefined;
829
829
  right?: number | undefined;
830
- bottom?: number | undefined;
831
830
  top?: number | undefined;
831
+ bottom?: number | undefined;
832
832
  } | undefined;
833
833
  position?: {
834
834
  x: string | number;
@@ -845,9 +845,9 @@ export declare const OverlaySpecSchema: z.ZodObject<{
845
845
  }[];
846
846
  captions?: {
847
847
  style: {
848
- position: "center" | "bottom" | "top";
848
+ position: "center" | "top" | "bottom";
849
849
  size: "sm" | "md" | "lg" | "xs" | "xl" | "2xl";
850
- background?: "none" | "solid" | "gradient" | undefined;
850
+ background?: "none" | "gradient" | "solid" | undefined;
851
851
  color?: string | undefined;
852
852
  };
853
853
  segments: {
@@ -6,8 +6,8 @@
6
6
  * pnpm sync-templates
7
7
  *
8
8
  * Source files:
9
- * - TileOverlay: workers/base-video-worker/src/app/tile/TileOverlay.tsx
10
- * - PageOverlay: workers/base-video-worker/src/app/page/PageOverlay.tsx
9
+ * - TileOverlay: workers/base-video-worker/src/app/(video)/tile/TileOverlay.tsx
10
+ * - PageOverlay: workers/base-video-worker/src/app/(video)/page/PageOverlay.tsx
11
11
  */
12
12
  /**
13
13
  * Video Layout Template
@@ -6,8 +6,8 @@
6
6
  * pnpm sync-templates
7
7
  *
8
8
  * Source files:
9
- * - TileOverlay: workers/base-video-worker/src/app/tile/TileOverlay.tsx
10
- * - PageOverlay: workers/base-video-worker/src/app/page/PageOverlay.tsx
9
+ * - TileOverlay: workers/base-video-worker/src/app/(video)/tile/TileOverlay.tsx
10
+ * - PageOverlay: workers/base-video-worker/src/app/(video)/page/PageOverlay.tsx
11
11
  */
12
12
  /**
13
13
  * Video Layout Template
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thewhateverapp/tile-sdk",
3
- "version": "0.20.3",
3
+ "version": "0.21.0",
4
4
  "description": "SDK for building interactive tiles on The Whatever App platform",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",