@thewhateverapp/tile-sdk 0.16.3 → 0.16.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bridge/TileBridge.d.ts.map +1 -1
- package/dist/bridge/TileBridge.js +22 -2
- package/dist/excalibur/index.d.ts +17 -3
- package/dist/excalibur/index.d.ts.map +1 -1
- package/dist/excalibur/index.js +32 -4
- package/dist/react/ExcaliburGame.d.ts +15 -1
- package/dist/react/ExcaliburGame.d.ts.map +1 -1
- package/dist/react/ExcaliburGame.js +30 -1
- package/dist/templates/slideshow/layout.tsx.template.d.ts +17 -7
- package/dist/templates/slideshow/layout.tsx.template.d.ts.map +1 -1
- package/dist/templates/slideshow/layout.tsx.template.js +403 -185
- package/dist/templates/video/layout.tsx.template.d.ts +17 -7
- package/dist/templates/video/layout.tsx.template.d.ts.map +1 -1
- package/dist/templates/video/layout.tsx.template.js +575 -122
- package/package.json +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TileBridge.d.ts","sourceRoot":"","sources":["../../src/bridge/TileBridge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,KAA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CAAC;QAClB,QAAQ,EAAE,OAAO,CAAC;KACnB;IAyCD;;;OAGG;IACI,mBAAmB,IAAI,IAAI;IASlC;;;;;OAKG;IACU,YAAY,IAAI,OAAO,CAAC,UAAU,CAAC;IAuBhD,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,aAAa;CA+CtB;AAKD,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,CAQ7D"}
|
|
@@ -615,8 +615,28 @@ export class TileBridge {
|
|
|
615
615
|
// For web iframes, use a 3-second fallback in case parent doesn't implement protocol
|
|
616
616
|
const isReactNativeWebView = !!window.ReactNativeWebView;
|
|
617
617
|
if (isReactNativeWebView) {
|
|
618
|
-
console.log('[TileBridge] 📱 React Native WebView detected -
|
|
619
|
-
//
|
|
618
|
+
console.log('[TileBridge] 📱 React Native WebView detected - checking for stored visibility state');
|
|
619
|
+
// Check for visibility state stored by webViewBridge before we initialized
|
|
620
|
+
// This handles the race condition where visibility message arrived early
|
|
621
|
+
const storedState = window.__parentVisibilityState;
|
|
622
|
+
if (storedState && typeof storedState.visible === 'boolean') {
|
|
623
|
+
console.log('[TileBridge] 📱 Found stored visibility state:', JSON.stringify(storedState));
|
|
624
|
+
this.receivedVisibilityMessage = true;
|
|
625
|
+
this.visibilityState.visible = storedState.visible;
|
|
626
|
+
this.visibilityState.muted = storedState.muted ?? !storedState.visible;
|
|
627
|
+
// Apply the stored state
|
|
628
|
+
if (this.visibilityState.muted) {
|
|
629
|
+
console.log('[TileBridge] 📱 Applying stored state: MUTING');
|
|
630
|
+
this.muteAllMedia();
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
console.log('[TileBridge] 📱 Applying stored state: UNMUTING');
|
|
634
|
+
this.unmuteAllMedia();
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
console.log('[TileBridge] 📱 No stored visibility state - waiting for parent visibility');
|
|
639
|
+
}
|
|
620
640
|
}
|
|
621
641
|
else {
|
|
622
642
|
// Web iframe fallback - parent might not implement visibility protocol
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
10
|
-
* import { ExcaliburGame, useEngine, useGameLoop } from '@thewhateverapp/tile-sdk/excalibur';
|
|
11
|
-
* import { Actor, Color, Vector } from 'excalibur';
|
|
10
|
+
* import { ExcaliburGame, useEngine, useGameLoop, Actor, Vector, Color } from '@thewhateverapp/tile-sdk/excalibur';
|
|
12
11
|
*
|
|
13
12
|
* function MyGame() {
|
|
14
13
|
* return (
|
|
@@ -43,6 +42,21 @@
|
|
|
43
42
|
* }
|
|
44
43
|
* ```
|
|
45
44
|
*/
|
|
46
|
-
export { ExcaliburGame, useEngine, useScene, useGameLoop, useGameState, useGameInput,
|
|
45
|
+
export { ExcaliburGame, useEngine, useScene, useGameLoop, useGameState, useGameInput, TILE_WIDTH, TILE_HEIGHT, } from '../react/ExcaliburGame.js';
|
|
47
46
|
export type { ExcaliburGameProps } from '../react/ExcaliburGame.js';
|
|
47
|
+
export { Actor, Vector, Color, Engine, Scene, Timer, Trigger, Label, } from '../react/ExcaliburGame.js';
|
|
48
|
+
export { Sprite, SpriteSheet, Animation, AnimationStrategy, AnimationDirection, Graphic, GraphicsGroup, Rectangle, Circle, Polygon, Line, Text, Font, Canvas, ImageFiltering, ImageWrapping, } from '../react/ExcaliburGame.js';
|
|
49
|
+
export { ImageSource, Sound, Loader, DefaultLoader, Resource, Gif, } from '../react/ExcaliburGame.js';
|
|
50
|
+
export { CollisionType, CollisionGroup, CollisionGroupManager, BoundingBox, Shape, CircleCollider, PolygonCollider, EdgeCollider, CompositeCollider, BodyComponent, ColliderComponent, Side, PhysicsConfig, } from '../react/ExcaliburGame.js';
|
|
51
|
+
export { Keys, Buttons, Axes, Gamepads, Gamepad, PointerScope, PointerButton, } from '../react/ExcaliburGame.js';
|
|
52
|
+
export { ActionContext, ActionsComponent, EasingFunctions, } from '../react/ExcaliburGame.js';
|
|
53
|
+
export { ParticleEmitter, EmitterType, } from '../react/ExcaliburGame.js';
|
|
54
|
+
export { TileMap, Tile, IsometricTile, IsometricMap, } from '../react/ExcaliburGame.js';
|
|
55
|
+
export { Entity, Component, TransformComponent, MotionComponent, GraphicsComponent, System, SystemType, Query, World, } from '../react/ExcaliburGame.js';
|
|
56
|
+
export { vec, Ray, Random, clamp, toRadians, toDegrees, } from '../react/ExcaliburGame.js';
|
|
57
|
+
export { Camera } from '../react/ExcaliburGame.js';
|
|
58
|
+
export { DisplayMode, ScreenElement } from '../react/ExcaliburGame.js';
|
|
59
|
+
export { PreUpdateEvent, PostUpdateEvent, PreDrawEvent, PostDrawEvent, CollisionStartEvent, CollisionEndEvent, PreCollisionEvent, PostCollisionEvent, EnterViewPortEvent, ExitViewPortEvent, } from '../react/ExcaliburGame.js';
|
|
60
|
+
export { coroutine } from '../react/ExcaliburGame.js';
|
|
61
|
+
export { Logger, LogLevel, EasingFunction } from '../react/ExcaliburGame.js';
|
|
48
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/excalibur/index.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/excalibur/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,EACL,aAAa,EACb,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,YAAY,EAEZ,UAAU,EACV,WAAW,GACZ,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,OAAO,EACL,KAAK,EACL,MAAM,EACN,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AA2B,CAAC;AAGnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,EACL,cAAc,EACd,eAAe,EACf,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/excalibur/index.js
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```tsx
|
|
11
|
-
* import { ExcaliburGame, useEngine, useGameLoop } from '@thewhateverapp/tile-sdk/excalibur';
|
|
12
|
-
* import { Actor, Color, Vector } from 'excalibur';
|
|
11
|
+
* import { ExcaliburGame, useEngine, useGameLoop, Actor, Vector, Color } from '@thewhateverapp/tile-sdk/excalibur';
|
|
13
12
|
*
|
|
14
13
|
* function MyGame() {
|
|
15
14
|
* return (
|
|
@@ -44,8 +43,37 @@
|
|
|
44
43
|
* }
|
|
45
44
|
* ```
|
|
46
45
|
*/
|
|
46
|
+
// React components and hooks
|
|
47
47
|
export { ExcaliburGame, useEngine, useScene, useGameLoop, useGameState, useGameInput,
|
|
48
|
-
// Re-exported Excalibur classes
|
|
49
|
-
Actor, Vector, Color, Rectangle, Circle, Label, Text, Sprite,
|
|
50
48
|
// Constants
|
|
51
49
|
TILE_WIDTH, TILE_HEIGHT, } from '../react/ExcaliburGame.js';
|
|
50
|
+
// Core Excalibur classes
|
|
51
|
+
export { Actor, Vector, Color, Engine, Scene, Timer, Trigger, Label, } from '../react/ExcaliburGame.js';
|
|
52
|
+
// Graphics - Shapes & Sprites
|
|
53
|
+
export { Sprite, SpriteSheet, Animation, AnimationStrategy, AnimationDirection, Graphic, GraphicsGroup, Rectangle, Circle, Polygon, Line, Text, Font, Canvas, ImageFiltering, ImageWrapping, } from '../react/ExcaliburGame.js';
|
|
54
|
+
// Resources - Loading assets
|
|
55
|
+
export { ImageSource, Sound, Loader, DefaultLoader, Resource, Gif, } from '../react/ExcaliburGame.js';
|
|
56
|
+
// Collision & Physics
|
|
57
|
+
export { CollisionType, CollisionGroup, CollisionGroupManager, BoundingBox, Shape, CircleCollider, PolygonCollider, EdgeCollider, CompositeCollider, BodyComponent, ColliderComponent, Side, } from '../react/ExcaliburGame.js';
|
|
58
|
+
// Input
|
|
59
|
+
export { Keys, Buttons, Axes, Gamepads, Gamepad, PointerScope, PointerButton, } from '../react/ExcaliburGame.js';
|
|
60
|
+
// Actions (movement, animation sequences)
|
|
61
|
+
export { ActionContext, ActionsComponent, EasingFunctions, } from '../react/ExcaliburGame.js';
|
|
62
|
+
// Particles
|
|
63
|
+
export { ParticleEmitter, EmitterType, } from '../react/ExcaliburGame.js';
|
|
64
|
+
// Tile Maps
|
|
65
|
+
export { TileMap, Tile, IsometricTile, IsometricMap, } from '../react/ExcaliburGame.js';
|
|
66
|
+
// Entity Component System
|
|
67
|
+
export { Entity, Component, TransformComponent, MotionComponent, GraphicsComponent, System, SystemType, Query, World, } from '../react/ExcaliburGame.js';
|
|
68
|
+
// Math utilities
|
|
69
|
+
export { vec, Ray, Random, clamp, toRadians, toDegrees, } from '../react/ExcaliburGame.js';
|
|
70
|
+
// Camera
|
|
71
|
+
export { Camera } from '../react/ExcaliburGame.js';
|
|
72
|
+
// Display
|
|
73
|
+
export { DisplayMode, ScreenElement } from '../react/ExcaliburGame.js';
|
|
74
|
+
// Events
|
|
75
|
+
export { PreUpdateEvent, PostUpdateEvent, PreDrawEvent, PostDrawEvent, CollisionStartEvent, CollisionEndEvent, PreCollisionEvent, PostCollisionEvent, EnterViewPortEvent, ExitViewPortEvent, } from '../react/ExcaliburGame.js';
|
|
76
|
+
// Coroutines
|
|
77
|
+
export { coroutine } from '../react/ExcaliburGame.js';
|
|
78
|
+
// Utilities
|
|
79
|
+
export { Logger, LogLevel } from '../react/ExcaliburGame.js';
|
|
@@ -44,7 +44,21 @@
|
|
|
44
44
|
*/
|
|
45
45
|
import React, { type ReactNode } from 'react';
|
|
46
46
|
import { Engine, DisplayMode, type Scene } from 'excalibur';
|
|
47
|
-
export { Actor, Vector, Color,
|
|
47
|
+
export { Actor, Vector, Color, Engine, Scene, Timer, Trigger, Label } from 'excalibur';
|
|
48
|
+
export { Sprite, SpriteSheet, Animation, AnimationStrategy, AnimationDirection, Graphic, GraphicsGroup, Rectangle, Circle, Polygon, Line, Text, Font, Canvas, ImageFiltering, ImageWrapping, } from 'excalibur';
|
|
49
|
+
export { ImageSource, Sound, Loader, DefaultLoader, Resource, Gif, } from 'excalibur';
|
|
50
|
+
export { CollisionType, CollisionGroup, CollisionGroupManager, BoundingBox, Shape, CircleCollider, PolygonCollider, EdgeCollider, CompositeCollider, BodyComponent, ColliderComponent, Side, PhysicsConfig, } from 'excalibur';
|
|
51
|
+
export { Keys, Buttons, Axes, Gamepads, Gamepad, PointerScope, PointerButton, } from 'excalibur';
|
|
52
|
+
export { ActionContext, ActionsComponent, EasingFunctions, } from 'excalibur';
|
|
53
|
+
export { ParticleEmitter, EmitterType, } from 'excalibur';
|
|
54
|
+
export { TileMap, Tile, IsometricTile, IsometricMap, } from 'excalibur';
|
|
55
|
+
export { Entity, Component, TransformComponent, MotionComponent, GraphicsComponent, System, SystemType, Query, World, } from 'excalibur';
|
|
56
|
+
export { vec, Ray, Random, clamp, toRadians, toDegrees, } from 'excalibur';
|
|
57
|
+
export { Camera } from 'excalibur';
|
|
58
|
+
export { DisplayMode, ScreenElement } from 'excalibur';
|
|
59
|
+
export { PreUpdateEvent, PostUpdateEvent, PreDrawEvent, PostDrawEvent, CollisionStartEvent, CollisionEndEvent, PreCollisionEvent, PostCollisionEvent, EnterViewPortEvent, ExitViewPortEvent, } from 'excalibur';
|
|
60
|
+
export { coroutine } from 'excalibur';
|
|
61
|
+
export { Logger, LogLevel, EasingFunction } from 'excalibur';
|
|
48
62
|
/**
|
|
49
63
|
* Tile dimensions - standard tile size
|
|
50
64
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExcaliburGame.d.ts","sourceRoot":"","sources":["../../src/react/ExcaliburGame.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,EAAE,WAAW,EAAoB,KAAK,KAAK,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ExcaliburGame.d.ts","sourceRoot":"","sources":["../../src/react/ExcaliburGame.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,EAAE,WAAW,EAAoB,KAAK,KAAK,EAAE,MAAM,WAAW,CAAC;AAI9E,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvF,OAAO,EACL,MAAM,EACN,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,SAAS,EACT,MAAM,EACN,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,cAAc,EACd,aAAa,GACd,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,WAAW,EACX,KAAK,EACL,MAAM,EACN,aAAa,EACb,QAAQ,EACR,GAAG,GACJ,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,aAAa,EACb,cAAc,EAC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useEffect, useState, useCallback, } from 'react';
|
|
47
47
|
import { Engine, DisplayMode, Color as ExColor } from 'excalibur';
|
|
48
48
|
// Re-export Excalibur classes for convenience
|
|
49
|
-
|
|
49
|
+
// Core
|
|
50
|
+
export { Actor, Vector, Color, Engine, Scene, Timer, Trigger, Label } from 'excalibur';
|
|
51
|
+
// Graphics - Shapes & Sprites
|
|
52
|
+
export { Sprite, SpriteSheet, Animation, AnimationStrategy, AnimationDirection, Graphic, GraphicsGroup, Rectangle, Circle, Polygon, Line, Text, Font, Canvas, ImageFiltering, ImageWrapping, } from 'excalibur';
|
|
53
|
+
// Resources - Loading assets
|
|
54
|
+
export { ImageSource, Sound, Loader, DefaultLoader, Resource, Gif, } from 'excalibur';
|
|
55
|
+
// Collision & Physics
|
|
56
|
+
export { CollisionType, CollisionGroup, CollisionGroupManager, BoundingBox, Shape, CircleCollider, PolygonCollider, EdgeCollider, CompositeCollider, BodyComponent, ColliderComponent, Side, } from 'excalibur';
|
|
57
|
+
// Input
|
|
58
|
+
export { Keys, Buttons, Axes, Gamepads, Gamepad, PointerScope, PointerButton, } from 'excalibur';
|
|
59
|
+
// Actions (movement, animation sequences)
|
|
60
|
+
export { ActionContext, ActionsComponent, EasingFunctions, } from 'excalibur';
|
|
61
|
+
// Particles
|
|
62
|
+
export { ParticleEmitter, EmitterType, } from 'excalibur';
|
|
63
|
+
// Tile Maps
|
|
64
|
+
export { TileMap, Tile, IsometricTile, IsometricMap, } from 'excalibur';
|
|
65
|
+
// Entity Component System
|
|
66
|
+
export { Entity, Component, TransformComponent, MotionComponent, GraphicsComponent, System, SystemType, Query, World, } from 'excalibur';
|
|
67
|
+
// Math utilities
|
|
68
|
+
export { vec, Ray, Random, clamp, toRadians, toDegrees, } from 'excalibur';
|
|
69
|
+
// Camera
|
|
70
|
+
export { Camera } from 'excalibur';
|
|
71
|
+
// Display
|
|
72
|
+
export { DisplayMode, ScreenElement } from 'excalibur';
|
|
73
|
+
// Events
|
|
74
|
+
export { PreUpdateEvent, PostUpdateEvent, PreDrawEvent, PostDrawEvent, CollisionStartEvent, CollisionEndEvent, PreCollisionEvent, PostCollisionEvent, EnterViewPortEvent, ExitViewPortEvent, } from 'excalibur';
|
|
75
|
+
// Coroutines
|
|
76
|
+
export { coroutine } from 'excalibur';
|
|
77
|
+
// Utilities
|
|
78
|
+
export { Logger, LogLevel } from 'excalibur';
|
|
50
79
|
/**
|
|
51
80
|
* Tile dimensions - standard tile size
|
|
52
81
|
*/
|
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Slideshow
|
|
2
|
+
* Slideshow Templates - Auto-generated from base-image-worker
|
|
3
|
+
*
|
|
4
|
+
* DO NOT EDIT THIS FILE DIRECTLY!
|
|
5
|
+
* Edit the source files in platform/workers/base-image-worker/ and run:
|
|
6
|
+
* pnpm sync-templates
|
|
7
|
+
*
|
|
8
|
+
* Source files:
|
|
9
|
+
* - Tile page: workers/base-image-worker/src/app/tile/page.tsx
|
|
10
|
+
* - Full page: workers/base-image-worker/src/app/page/page.tsx
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Slideshow Layout Template
|
|
3
14
|
*
|
|
4
15
|
* This layout wraps both /tile and /page routes using a route group.
|
|
5
16
|
* The Slideshow is rendered ONCE here and persists across route navigation.
|
|
6
17
|
*
|
|
7
18
|
* File path: src/app/(slideshow)/layout.tsx
|
|
8
|
-
* Routes: src/app/(slideshow)/tile/page.tsx, src/app/(slideshow)/page/page.tsx
|
|
9
19
|
*/
|
|
10
20
|
export declare const slideshowLayoutTemplate = "'use client';\n\nimport { Slideshow } from '@thewhateverapp/tile-sdk';\n\n// Slideshow configuration injected at generation time\nconst SLIDESHOW_CONFIG = __SLIDESHOW_CONFIG__;\n\nexport default function SlideshowLayout({ children }: { children: React.ReactNode }) {\n return (\n <Slideshow\n images={SLIDESHOW_CONFIG.images}\n autoAdvance={SLIDESHOW_CONFIG.autoAdvance}\n intervalMs={SLIDESHOW_CONFIG.intervalMs}\n transition={SLIDESHOW_CONFIG.transition}\n showDots={false}\n showArrows={false}\n className=\"w-full h-full\"\n >\n {/* Children are the route-specific overlays */}\n {children}\n </Slideshow>\n );\n}\n";
|
|
11
21
|
/**
|
|
12
22
|
* Slideshow Tile Overlay Template
|
|
13
23
|
*
|
|
14
|
-
* Overlay-only component for tile view (
|
|
24
|
+
* Overlay-only component for tile view (256x554px).
|
|
15
25
|
* Slideshow is already mounted in the parent layout.
|
|
16
26
|
*
|
|
17
27
|
* File path: src/app/(slideshow)/tile/page.tsx
|
|
18
28
|
*/
|
|
19
|
-
export declare const slideshowTileOverlayTemplate = "'use client';\n\nimport {
|
|
29
|
+
export declare const slideshowTileOverlayTemplate = "'use client';\n\nimport { Slideshow, useSlideshowState, useTile } from '@thewhateverapp/tile-sdk';\n\nexport default function SlideshowTilePage() {\n \n if (!state.images || state.images.length === 0) {\n return (\n <div className=\"w-full h-full bg-black flex items-center justify-center\">\n <p className=\"text-white/60 text-sm\">No images configured</p>\n </div>\n );\n }\n\n return (\n <Slideshow\n images={state.images}\n autoAdvance={false} // No auto-cycling in tile mode - user swipes manually\n intervalMs={SLIDESHOW_CONFIG.intervalMs}\n transition={SLIDESHOW_CONFIG.transition}\n showDots={false}\n showArrows={false}\n swipeable={true}\n className=\"w-full h-full\"\n >\n <TileOverlay />\n </Slideshow>\n );\n}\n\nfunction TileOverlay() {\n const tile = useTile();\n const { state, controls } = useSlideshowState();\n \n return (\n <>\n {/* Expand button - top right */}\n <div className=\"absolute top-3 right-3 z-20 pointer-events-auto\">\n <button\n onClick={() => tile.navigateToPage()}\n className=\"bg-black/40 backdrop-blur-sm p-2 rounded-full text-white hover:bg-black/60 transition-colors\"\n aria-label=\"Expand to full view\"\n >\n <svg className=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4\" />\n </svg>\n </button>\n </div>\n\n {/* Slide counter - top left */}\n {state.totalSlides > 1 && (\n <div className=\"absolute top-3 left-3 z-10 pointer-events-none\">\n <div className=\"bg-black/50 backdrop-blur-sm px-2 py-1 rounded text-xs text-white font-medium\">\n {state.currentIndex + 1} / {state.totalSlides}\n </div>\n </div>\n )}\n\n {/* Navigation dots at bottom */}\n {state.totalSlides > 1 && (\n <div className=\"absolute bottom-3 left-1/2 -translate-x-1/2 z-20 pointer-events-auto\">\n <div className=\"flex gap-1.5\">\n {state.images.map((_, index) => (\n <button\n key={index}\n onClick={() => controls.goTo(index)}\n disabled={state.isTransitioning}\n className={`w-2 h-2 rounded-full transition-colors ${\n index === state.currentIndex\n ? 'bg-white'\n : 'bg-white/40 hover:bg-white/60'\n }`}\n aria-label={`Go to slide ${index + 1}`}\n />\n ))}\n </div>\n </div>\n )}\n\n {/* Caption overlay */}\n {state.images[state.currentIndex]?.caption && (\n <div className=\"absolute bottom-10 left-3 right-3 z-10 pointer-events-none\">\n <div className=\"bg-black/50 backdrop-blur-sm px-3 py-2 rounded text-white text-sm\">\n {state.images[state.currentIndex].caption}\n </div>\n </div>\n )}\n </>\n );\n}\n";
|
|
20
30
|
/**
|
|
21
31
|
* Slideshow Page Overlay Template
|
|
22
32
|
*
|
|
@@ -25,7 +35,7 @@ export declare const slideshowTileOverlayTemplate = "'use client';\n\nimport { u
|
|
|
25
35
|
*
|
|
26
36
|
* File path: src/app/(slideshow)/page/page.tsx
|
|
27
37
|
*/
|
|
28
|
-
export declare const slideshowPageOverlayTemplate = "'use client';\n\nimport {
|
|
38
|
+
export declare const slideshowPageOverlayTemplate = "'use client';\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { Slideshow, useSlideshowState, useTile } from '@thewhateverapp/tile-sdk';\n\nexport default function SlideshowPageView() {\n \n if (!state.images || state.images.length === 0) {\n return (\n <div className=\"w-full h-full bg-black flex items-center justify-center\">\n <p className=\"text-white/60 text-sm\">No images configured</p>\n </div>\n );\n }\n\n return (\n <Slideshow\n images={state.images}\n autoAdvance={true} // Always auto-cycle in page/fullscreen mode\n intervalMs={SLIDESHOW_CONFIG.intervalMs}\n transition={SLIDESHOW_CONFIG.transition}\n showDots={true}\n showArrows={true}\n swipeable={true}\n className=\"w-full h-full object-cover\"\n >\n <PageOverlay />\n </Slideshow>\n );\n}\n\nfunction PageOverlay() {\n const tile = useTile();\n const { state, controls } = useSlideshowState();\n const [showControls, setShowControls] = useState(true);\n const [hideTimeout, setHideTimeout] = useState<NodeJS.Timeout | null>(null);\n\n // Auto-hide controls after 3 seconds when slideshow is playing\n const resetHideTimer = useCallback(() => {\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n }\n setShowControls(true);\n\n if (!state.isPaused) {\n const timeout = setTimeout(() => {\n setShowControls(false);\n }, 3000);\n setHideTimeout(timeout);\n }\n }, [state.isPaused, hideTimeout]);\n\n // Show controls when slideshow is paused\n useEffect(() => {\n if (state.isPaused) {\n setShowControls(true);\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n setHideTimeout(null);\n }\n } else {\n resetHideTimer();\n }\n }, [state.isPaused]);\n\n // Cleanup timeout on unmount\n useEffect(() => {\n return () => {\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n }\n };\n }, [hideTimeout]);\n\n // Toggle controls on tap/click\n const handleToggleControls = useCallback((e: React.MouseEvent | React.TouchEvent) => {\n const target = e.target as HTMLElement;\n if (target.closest('button, .controls-area')) {\n return;\n }\n e.preventDefault();\n\n if (showControls) {\n setShowControls(false);\n } else {\n resetHideTimer();\n }\n }, [showControls, resetHideTimer]);\n\n // Handle mouse movement to show controls\n const handleMouseMove = useCallback(() => {\n if (!state.isPaused) {\n resetHideTimer();\n }\n }, [state.isPaused, resetHideTimer]);\n\n return (\n <div\n className=\"absolute inset-0 z-20 pointer-events-auto\"\n onClick={handleToggleControls}\n onTouchEnd={handleToggleControls}\n onMouseMove={handleMouseMove}\n >\n {/* Controls - toggleable */}\n <div\n className={`controls-area transition-opacity duration-300 ${\n showControls ? 'opacity-100' : 'opacity-0 pointer-events-none'\n }`}\n >\n {/* Top bar with slide counter and controls */}\n <div className=\"absolute top-0 left-0 right-0 h-20 bg-gradient-to-b from-black/60 to-transparent pointer-events-none\" />\n\n {/* Slide counter - top right */}\n {state.totalSlides > 1 && (\n <div className=\"absolute top-4 right-4 z-10 pointer-events-auto\">\n <div className=\"bg-black/50 backdrop-blur-sm px-3 py-1.5 rounded text-sm text-white font-medium\">\n {state.currentIndex + 1} / {state.totalSlides}\n </div>\n </div>\n )}\n\n {/* Play/Pause button - top left */}\n {state.totalSlides > 1 && (\n <div className=\"absolute top-4 left-4 z-20 pointer-events-auto\">\n <button\n onClick={(e) => {\n e.stopPropagation();\n controls.toggle();\n }}\n className=\"bg-black/40 backdrop-blur-sm p-2.5 rounded-full text-white hover:bg-black/60 transition-colors\"\n aria-label={state.isPaused ? 'Resume slideshow' : 'Pause slideshow'}\n >\n {state.isPaused ? (\n <svg className=\"w-5 h-5\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path d=\"M8 5v14l11-7z\" />\n </svg>\n ) : (\n <svg className=\"w-5 h-5\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path d=\"M6 4h4v16H6V4zm8 0h4v16h-4V4z\" />\n </svg>\n )}\n </button>\n </div>\n )}\n\n {/* Bottom bar with caption and minimize */}\n <div className=\"absolute bottom-0 left-0 right-0 h-32 bg-gradient-to-t from-black/60 to-transparent pointer-events-none\" />\n\n {/* Caption overlay at bottom */}\n {state.images[state.currentIndex]?.caption && (\n <div className=\"absolute bottom-16 left-4 right-16 z-10 pointer-events-none\">\n <div className=\"text-white\">\n <p className=\"text-base drop-shadow-lg\">{state.images[state.currentIndex].caption}</p>\n {state.images[state.currentIndex]?.alt && (\n <p className=\"text-sm text-white/70 mt-1 drop-shadow-lg\">{state.images[state.currentIndex].alt}</p>\n )}\n </div>\n </div>\n )}\n\n {/* Minimize button - bottom right */}\n <div className=\"absolute bottom-4 right-4 z-20 pointer-events-auto\">\n <button\n onClick={(e) => {\n e.stopPropagation();\n tile.navigateToTile();\n }}\n className=\"bg-black/40 backdrop-blur-sm p-2.5 rounded-full text-white hover:bg-black/60 transition-colors\"\n aria-label=\"Minimize to tile\"\n >\n <svg className=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M20 12H4\" />\n </svg>\n </button>\n </div>\n </div>\n </div>\n );\n}\n";
|
|
29
39
|
/**
|
|
30
40
|
* Slideshow Preview Entry - Tile
|
|
31
41
|
*
|
|
@@ -34,7 +44,7 @@ export declare const slideshowPageOverlayTemplate = "'use client';\n\nimport { u
|
|
|
34
44
|
*
|
|
35
45
|
* File path: src/app/_preview/tile.tsx
|
|
36
46
|
*/
|
|
37
|
-
export declare const slideshowPreviewTileTemplate = "'use client';\n\nimport { Slideshow, useSlideshowState,
|
|
47
|
+
export declare const slideshowPreviewTileTemplate = "'use client';\n\nimport { Slideshow, useSlideshowState, useTile } from '@thewhateverapp/tile-sdk';\n\n// Slideshow configuration injected at generation time\nconst SLIDESHOW_CONFIG = __SLIDESHOW_CONFIG__;\n\nfunction TileOverlay() {\n const tile = useTile();\n const { state, controls } = useSlideshowState();\n\n return (\n <>\n <div className=\"absolute top-3 right-3 z-20 pointer-events-auto\">\n <button\n onClick={() => tile.navigateToPage()}\n className=\"bg-black/40 backdrop-blur-sm p-2 rounded-full text-white hover:bg-black/60 transition-colors\"\n aria-label=\"Expand to full view\"\n >\n <svg className=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4\" />\n </svg>\n </button>\n </div>\n\n {state.totalSlides > 1 && (\n <div className=\"absolute top-3 left-3 z-10 pointer-events-none\">\n <div className=\"bg-black/50 backdrop-blur-sm px-2 py-1 rounded text-xs text-white font-medium\">\n {state.currentIndex + 1} / {state.totalSlides}\n </div>\n </div>\n )}\n\n {state.totalSlides > 1 && (\n <div className=\"absolute bottom-3 left-1/2 -translate-x-1/2 z-20 pointer-events-auto\">\n <div className=\"flex gap-1.5\">\n {state.images.map((_, index) => (\n <button\n key={index}\n onClick={() => controls.goTo(index)}\n disabled={state.isTransitioning}\n className={`w-2 h-2 rounded-full transition-colors ${\n index === state.currentIndex\n ? 'bg-white'\n : 'bg-white/40 hover:bg-white/60'\n }`}\n aria-label={`Go to slide ${index + 1}`}\n />\n ))}\n </div>\n </div>\n )}\n\n {state.images[state.currentIndex]?.caption && (\n <div className=\"absolute bottom-10 left-3 right-3 z-10 pointer-events-none\">\n <div className=\"bg-black/50 backdrop-blur-sm px-3 py-2 rounded text-white text-sm\">\n {state.images[state.currentIndex].caption}\n </div>\n </div>\n )}\n </>\n );\n}\n\nexport default function PreviewTile() {\n return (\n <Slideshow\n images={SLIDESHOW_CONFIG.images}\n autoAdvance={SLIDESHOW_CONFIG.autoAdvance}\n intervalMs={SLIDESHOW_CONFIG.intervalMs}\n transition={SLIDESHOW_CONFIG.transition}\n showDots={false}\n showArrows={false}\n className=\"w-full h-full\"\n >\n <TileOverlay />\n </Slideshow>\n );\n}\n";
|
|
38
48
|
/**
|
|
39
49
|
* Slideshow Preview Entry - Page
|
|
40
50
|
*
|
|
@@ -43,5 +53,5 @@ export declare const slideshowPreviewTileTemplate = "'use client';\n\nimport { S
|
|
|
43
53
|
*
|
|
44
54
|
* File path: src/app/_preview/page.tsx
|
|
45
55
|
*/
|
|
46
|
-
export declare const slideshowPreviewPageTemplate = "'use client';\n\nimport { Slideshow, useSlideshowState,
|
|
56
|
+
export declare const slideshowPreviewPageTemplate = "'use client';\n\nimport { Slideshow, useSlideshowState, useTile } from '@thewhateverapp/tile-sdk';\nimport { useState, useEffect, useCallback } from 'react';\n\n// Slideshow configuration injected at generation time\nconst SLIDESHOW_CONFIG = __SLIDESHOW_CONFIG__;\n\nfunction PageOverlay() {\n const tile = useTile();\n const { state, controls } = useSlideshowState();\n const [showControls, setShowControls] = useState(true);\n const [hideTimeout, setHideTimeout] = useState<NodeJS.Timeout | null>(null);\n\n const resetHideTimer = useCallback(() => {\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n }\n setShowControls(true);\n\n if (!state.isPaused) {\n const timeout = setTimeout(() => {\n setShowControls(false);\n }, 3000);\n setHideTimeout(timeout);\n }\n }, [state.isPaused, hideTimeout]);\n\n useEffect(() => {\n if (state.isPaused) {\n setShowControls(true);\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n setHideTimeout(null);\n }\n } else {\n resetHideTimer();\n }\n }, [state.isPaused]);\n\n useEffect(() => {\n return () => {\n if (hideTimeout) {\n clearTimeout(hideTimeout);\n }\n };\n }, [hideTimeout]);\n\n const handleToggleControls = useCallback((e: React.MouseEvent | React.TouchEvent) => {\n const target = e.target as HTMLElement;\n if (target.closest('button, .controls-area')) {\n return;\n }\n e.preventDefault();\n\n if (showControls) {\n setShowControls(false);\n } else {\n resetHideTimer();\n }\n }, [showControls, resetHideTimer]);\n\n const handleMouseMove = useCallback(() => {\n if (!state.isPaused) {\n resetHideTimer();\n }\n }, [state.isPaused, resetHideTimer]);\n\n return (\n <div\n className=\"absolute inset-0 z-20 pointer-events-auto\"\n onClick={handleToggleControls}\n onTouchEnd={handleToggleControls}\n onMouseMove={handleMouseMove}\n >\n <div\n className={`controls-area transition-opacity duration-300 ${\n showControls ? 'opacity-100' : 'opacity-0 pointer-events-none'\n }`}\n >\n <div className=\"absolute top-0 left-0 right-0 h-20 bg-gradient-to-b from-black/60 to-transparent pointer-events-none\" />\n\n {state.totalSlides > 1 && (\n <div className=\"absolute top-4 right-4 z-10 pointer-events-auto\">\n <div className=\"bg-black/50 backdrop-blur-sm px-3 py-1.5 rounded text-sm text-white font-medium\">\n {state.currentIndex + 1} / {state.totalSlides}\n </div>\n </div>\n )}\n\n {state.totalSlides > 1 && (\n <div className=\"absolute top-4 left-4 z-20 pointer-events-auto\">\n <button\n onClick={(e) => {\n e.stopPropagation();\n controls.toggle();\n }}\n className=\"bg-black/40 backdrop-blur-sm p-2.5 rounded-full text-white hover:bg-black/60 transition-colors\"\n aria-label={state.isPaused ? 'Resume slideshow' : 'Pause slideshow'}\n >\n {state.isPaused ? (\n <svg className=\"w-5 h-5\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path d=\"M8 5v14l11-7z\" />\n </svg>\n ) : (\n <svg className=\"w-5 h-5\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path d=\"M6 4h4v16H6V4zm8 0h4v16h-4V4z\" />\n </svg>\n )}\n </button>\n </div>\n )}\n\n <div className=\"absolute bottom-0 left-0 right-0 h-32 bg-gradient-to-t from-black/60 to-transparent pointer-events-none\" />\n\n {state.images[state.currentIndex]?.caption && (\n <div className=\"absolute bottom-16 left-4 right-16 z-10 pointer-events-none\">\n <div className=\"text-white\">\n <p className=\"text-base drop-shadow-lg\">{state.images[state.currentIndex].caption}</p>\n {state.images[state.currentIndex]?.alt && (\n <p className=\"text-sm text-white/70 mt-1 drop-shadow-lg\">{state.images[state.currentIndex].alt}</p>\n )}\n </div>\n </div>\n )}\n\n <div className=\"absolute bottom-4 right-4 z-20 pointer-events-auto\">\n <button\n onClick={(e) => {\n e.stopPropagation();\n tile.navigateToTile();\n }}\n className=\"bg-black/40 backdrop-blur-sm p-2.5 rounded-full text-white hover:bg-black/60 transition-colors\"\n aria-label=\"Minimize to tile\"\n >\n <svg className=\"w-5 h-5\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M20 12H4\" />\n </svg>\n </button>\n </div>\n </div>\n </div>\n );\n}\n\nexport default function PreviewPage() {\n return (\n <Slideshow\n images={SLIDESHOW_CONFIG.images}\n autoAdvance={SLIDESHOW_CONFIG.autoAdvance}\n intervalMs={SLIDESHOW_CONFIG.intervalMs}\n transition={SLIDESHOW_CONFIG.transition}\n showDots={true}\n showArrows={true}\n swipeable={true}\n className=\"w-full h-full object-cover\"\n >\n <PageOverlay />\n </Slideshow>\n );\n}\n";
|
|
47
57
|
//# sourceMappingURL=layout.tsx.template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.tsx.template.d.ts","sourceRoot":"","sources":["../../../src/templates/slideshow/layout.tsx.template.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"layout.tsx.template.d.ts","sourceRoot":"","sources":["../../../src/templates/slideshow/layout.tsx.template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,wqBAuBnC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,0mGA0FxC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,m/LAmLxC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,qwFA+ExC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,myKAiKxC,CAAC"}
|