@clypra-studio/engine 0.1.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.
Files changed (53) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +677 -0
  3. package/dist/chunk-5JOAEDIQ.js +446 -0
  4. package/dist/chunk-5JOAEDIQ.js.map +1 -0
  5. package/dist/chunk-CJRH4PAV.js +2826 -0
  6. package/dist/chunk-CJRH4PAV.js.map +1 -0
  7. package/dist/chunk-EVQAI3P3.js +3725 -0
  8. package/dist/chunk-EVQAI3P3.js.map +1 -0
  9. package/dist/chunk-PZ5AY32C.js +10 -0
  10. package/dist/chunk-PZ5AY32C.js.map +1 -0
  11. package/dist/chunk-QMRMNH52.js +811 -0
  12. package/dist/chunk-QMRMNH52.js.map +1 -0
  13. package/dist/index-BWo6qV_z.d.cts +139 -0
  14. package/dist/index-BWo6qV_z.d.ts +139 -0
  15. package/dist/index-lNWEWqab.d.cts +633 -0
  16. package/dist/index-lNWEWqab.d.ts +633 -0
  17. package/dist/index.cjs +21232 -0
  18. package/dist/index.cjs.map +1 -0
  19. package/dist/index.d.cts +12254 -0
  20. package/dist/index.d.ts +12254 -0
  21. package/dist/index.js +13320 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/textEffects/index.cjs +3341 -0
  24. package/dist/textEffects/index.cjs.map +1 -0
  25. package/dist/textEffects/index.d.cts +1 -0
  26. package/dist/textEffects/index.d.ts +1 -0
  27. package/dist/textEffects/index.js +30 -0
  28. package/dist/textEffects/index.js.map +1 -0
  29. package/dist/transitions/index.cjs +848 -0
  30. package/dist/transitions/index.cjs.map +1 -0
  31. package/dist/transitions/index.d.cts +170 -0
  32. package/dist/transitions/index.d.ts +170 -0
  33. package/dist/transitions/index.js +32 -0
  34. package/dist/transitions/index.js.map +1 -0
  35. package/dist/v2/backends/index.cjs +480 -0
  36. package/dist/v2/backends/index.cjs.map +1 -0
  37. package/dist/v2/backends/index.d.cts +3 -0
  38. package/dist/v2/backends/index.d.ts +3 -0
  39. package/dist/v2/backends/index.js +8 -0
  40. package/dist/v2/backends/index.js.map +1 -0
  41. package/dist/v2/contract/index.cjs +18 -0
  42. package/dist/v2/contract/index.cjs.map +1 -0
  43. package/dist/v2/contract/index.d.cts +165 -0
  44. package/dist/v2/contract/index.d.ts +165 -0
  45. package/dist/v2/contract/index.js +1 -0
  46. package/dist/v2/contract/index.js.map +1 -0
  47. package/dist/videoEffects/index.cjs +2883 -0
  48. package/dist/videoEffects/index.cjs.map +1 -0
  49. package/dist/videoEffects/index.d.cts +801 -0
  50. package/dist/videoEffects/index.d.ts +801 -0
  51. package/dist/videoEffects/index.js +68 -0
  52. package/dist/videoEffects/index.js.map +1 -0
  53. package/package.json +119 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/transitions/index.ts","../../src/transitions/TransitionRenderer.ts","../../src/transitions/presets.ts","../../src/transitions/helpers.ts"],"sourcesContent":["/**\n * Transitions Module\n *\n * Professional transition effects for video editing\n * Part of @clypra/engine - shared between clypra-studio and clypra app\n *\n * @module transitions\n */\n\n// Core renderer\nexport { TransitionRenderer } from \"./TransitionRenderer\";\n\n// Types\nexport type { TransitionRenderer as TransitionRendererType, EasingFunction, TransitionParameters, TransitionCategory, TransitionPreset, AppliedTransition } from \"./types\";\n\n// Preset library\nexport { TRANSITION_PRESETS, TRANSITION_CATEGORIES } from \"./presets\";\n\n// Helper functions\nexport { getTransitionCategories, getTransitionsByCategory, searchTransitions, getTransitionById, getTransitionByRenderer, getAllTransitions, getTransitionCountByCategory, getAllTransitionTags, getTransitionsByTags, getRecommendedDuration } from \"./helpers\";\n","/**\n * Transition Renderer\n *\n * Applies transitions between two video frames.\n * These are NOT video files - they are algorithmic blends.\n *\n * Examples:\n * - fade: Crossfade opacity\n * - zoom_in: Scale up during fade\n * - wipe_left: Reveal next frame from left\n *\n * Part of @clypra/engine - shared between clypra-studio and clypra app\n */\n\nimport type { TransitionRenderer as TransitionRendererType, TransitionParameters, EasingFunction } from \"./types\";\n\nexport class TransitionRenderer {\n /**\n * Render a transition between two frames\n *\n * @param ctx - Canvas 2D context\n * @param fromFrame - Canvas or image of the outgoing frame\n * @param toFrame - Canvas or image of the incoming frame\n * @param renderer - Transition type\n * @param params - Transition parameters\n * @param progress - Transition progress (0-1)\n */\n static render(ctx: CanvasRenderingContext2D, fromFrame: HTMLCanvasElement | HTMLImageElement, toFrame: HTMLCanvasElement | HTMLImageElement, renderer: TransitionRendererType, params: TransitionParameters, progress: number): void {\n const method = this.getRenderer(renderer);\n if (method) {\n // Apply easing to progress\n const easedProgress = this.applyEasing(progress, params.easing || \"ease-in-out\");\n method.call(this, ctx, fromFrame, toFrame, params, easedProgress);\n } else {\n console.warn(`Unknown transition renderer: ${renderer}`);\n // Fallback to simple fade\n this.renderFade(ctx, fromFrame, toFrame, params, progress);\n }\n }\n\n /**\n * Get the renderer function for a transition type\n */\n private static getRenderer(type: TransitionRendererType): ((ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number) => void) | null {\n const renderers: Record<TransitionRendererType, any> = {\n // Basic\n fade: this.renderFade,\n dissolve: this.renderDissolve,\n cut: this.renderCut,\n canvas: this.renderFade, // Legacy fallback for clypra app\n\n // Zoom\n zoom_in: this.renderZoomIn,\n zoom_out: this.renderZoomOut,\n zoom_blur: this.renderZoomBlur,\n\n // Slide\n slide_left: this.renderSlideLeft,\n slide_right: this.renderSlideRight,\n slide_up: this.renderSlideUp,\n slide_down: this.renderSlideDown,\n\n // Wipe\n wipe_left: this.renderWipeLeft,\n wipe_right: this.renderWipeRight,\n wipe_up: this.renderWipeUp,\n wipe_down: this.renderWipeDown,\n wipe_clockwise: this.renderWipeClockwise,\n wipe_center: this.renderWipeCenter,\n\n // Shape\n circle_expand: this.renderCircleExpand,\n circle_collapse: this.renderCircleCollapse,\n diamond_expand: this.renderDiamondExpand,\n rectangle_expand: this.renderRectangleExpand,\n\n // Blur\n blur_fade: this.renderBlurFade,\n directional_blur: this.renderDirectionalBlur,\n\n // Creative\n glitch: this.renderGlitch,\n rgb_split: this.renderRGBSplit,\n chromatic: this.renderChromatic,\n film_burn: this.renderFilmBurn,\n light_leak: this.renderLightLeak,\n whip_pan: this.renderWhipPan,\n };\n\n return renderers[type] || null;\n }\n\n // ============================================================================\n // BASIC TRANSITIONS\n // ============================================================================\n\n private static renderFade(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Draw from frame\n ctx.globalAlpha = 1 - progress;\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame\n ctx.globalAlpha = progress;\n ctx.drawImage(to, 0, 0, width, height);\n\n ctx.globalAlpha = 1;\n }\n\n private static renderDissolve(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Same as fade\n this.renderFade(ctx, from, to, params, progress);\n }\n\n private static renderCut(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Instant cut at 50% progress\n if (progress < 0.5) {\n ctx.drawImage(from, 0, 0, width, height);\n } else {\n ctx.drawImage(to, 0, 0, width, height);\n }\n }\n\n // ============================================================================\n // ZOOM TRANSITIONS\n // ============================================================================\n\n private static renderZoomIn(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const scale = params.scale || 1.3;\n\n // Zoom out from frame\n const fromScale = 1 + progress * (scale - 1);\n ctx.save();\n ctx.translate(width / 2, height / 2);\n ctx.scale(fromScale, fromScale);\n ctx.globalAlpha = 1 - progress;\n ctx.drawImage(from, -width / 2, -height / 2, width, height);\n ctx.restore();\n\n // Fade in to frame\n ctx.globalAlpha = progress;\n ctx.drawImage(to, 0, 0, width, height);\n\n ctx.globalAlpha = 1;\n }\n\n private static renderZoomOut(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const scale = params.scale || 0.7;\n\n // Zoom in from frame\n const fromScale = 1 - progress * (1 - scale);\n ctx.save();\n ctx.translate(width / 2, height / 2);\n ctx.scale(fromScale, fromScale);\n ctx.globalAlpha = 1 - progress;\n ctx.drawImage(from, -width / 2, -height / 2, width, height);\n ctx.restore();\n\n // Fade in to frame\n ctx.globalAlpha = progress;\n ctx.drawImage(to, 0, 0, width, height);\n\n ctx.globalAlpha = 1;\n }\n\n private static renderZoomBlur(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const blurAmount = (params.blurAmount || 10) * (1 - Math.abs(progress - 0.5) * 2);\n ctx.filter = `blur(${blurAmount}px)`;\n this.renderZoomIn(ctx, from, to, params, progress);\n ctx.filter = \"none\";\n }\n\n // ============================================================================\n // SLIDE TRANSITIONS\n // ============================================================================\n\n private static renderSlideLeft(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Slide from frame out to the left\n ctx.drawImage(from, -width * progress, 0, width, height);\n\n // Slide to frame in from the right\n ctx.drawImage(to, width * (1 - progress), 0, width, height);\n }\n\n private static renderSlideRight(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Slide from frame out to the right\n ctx.drawImage(from, width * progress, 0, width, height);\n\n // Slide to frame in from the left\n ctx.drawImage(to, -width * (1 - progress), 0, width, height);\n }\n\n private static renderSlideUp(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Slide from frame out to the top\n ctx.drawImage(from, 0, -height * progress, width, height);\n\n // Slide to frame in from the bottom\n ctx.drawImage(to, 0, height * (1 - progress), width, height);\n }\n\n private static renderSlideDown(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n\n // Slide from frame out to the bottom\n ctx.drawImage(from, 0, height * progress, width, height);\n\n // Slide to frame in from the top\n ctx.drawImage(to, 0, -height * (1 - progress), width, height);\n }\n\n // ============================================================================\n // WIPE TRANSITIONS\n // ============================================================================\n\n private static renderWipeLeft(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const wipeX = width * progress;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(0, 0, wipeX, height);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeRight(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const wipeX = width * (1 - progress);\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(wipeX, 0, width - wipeX, height);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeUp(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const wipeY = height * progress;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(0, 0, width, wipeY);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeDown(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const wipeY = height * (1 - progress);\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(0, wipeY, width, height - wipeY);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeClockwise(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const centerX = width / 2;\n const centerY = height / 2;\n const angle = progress * Math.PI * 2;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with radial clipping\n ctx.save();\n ctx.beginPath();\n ctx.moveTo(centerX, centerY);\n ctx.arc(centerX, centerY, Math.max(width, height), -Math.PI / 2, angle - Math.PI / 2);\n ctx.closePath();\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderWipeCenter(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const centerX = width / 2;\n const centerY = height / 2;\n const radius = Math.max(width, height) * progress;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with circular clipping\n ctx.save();\n ctx.beginPath();\n ctx.arc(centerX, centerY, radius, 0, Math.PI * 2);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n // ============================================================================\n // SHAPE TRANSITIONS\n // ============================================================================\n\n private static renderCircleExpand(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n this.renderWipeCenter(ctx, from, to, params, progress);\n }\n\n private static renderCircleCollapse(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n this.renderWipeCenter(ctx, to, from, params, 1 - progress);\n }\n\n private static renderDiamondExpand(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const centerX = width / 2;\n const centerY = height / 2;\n const size = Math.max(width, height) * progress;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with diamond clipping\n ctx.save();\n ctx.beginPath();\n ctx.moveTo(centerX, centerY - size);\n ctx.lineTo(centerX + size, centerY);\n ctx.lineTo(centerX, centerY + size);\n ctx.lineTo(centerX - size, centerY);\n ctx.closePath();\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n private static renderRectangleExpand(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const rectWidth = width * progress;\n const rectHeight = height * progress;\n const x = (width - rectWidth) / 2;\n const y = (height - rectHeight) / 2;\n\n // Draw from frame\n ctx.drawImage(from, 0, 0, width, height);\n\n // Draw to frame with rect clipping\n ctx.save();\n ctx.beginPath();\n ctx.rect(x, y, rectWidth, rectHeight);\n ctx.clip();\n ctx.drawImage(to, 0, 0, width, height);\n ctx.restore();\n }\n\n // ============================================================================\n // BLUR TRANSITIONS\n // ============================================================================\n\n private static renderBlurFade(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const blurAmount = (params.blurAmount || 10) * (1 - Math.abs(progress - 0.5) * 2);\n ctx.filter = `blur(${blurAmount}px)`;\n this.renderFade(ctx, from, to, params, progress);\n ctx.filter = \"none\";\n }\n\n private static renderDirectionalBlur(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Directional blur requires custom implementation\n // Fallback to blur fade\n this.renderBlurFade(ctx, from, to, params, progress);\n }\n\n // ============================================================================\n // CREATIVE TRANSITIONS\n // ============================================================================\n\n private static renderGlitch(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Combine both frames with glitch effect\n this.renderFade(ctx, from, to, params, progress);\n\n // Add glitch artifacts\n const width = ctx.canvas.width;\n const height = ctx.canvas.height;\n const glitchIntensity = Math.sin(progress * Math.PI) * 20;\n\n for (let i = 0; i < 5; i++) {\n const y = Math.random() * height;\n const sliceHeight = Math.random() * 20;\n const offset = (Math.random() - 0.5) * glitchIntensity;\n\n const imageData = ctx.getImageData(0, y, width, sliceHeight);\n ctx.putImageData(imageData, offset, y);\n }\n }\n\n private static renderRGBSplit(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Draw with RGB channel offset\n const offset = Math.sin(progress * Math.PI) * 10;\n\n ctx.globalCompositeOperation = \"screen\";\n ctx.globalAlpha = 0.5;\n ctx.drawImage(from, offset, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.drawImage(to, -offset, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = \"source-over\";\n }\n\n private static renderChromatic(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n this.renderRGBSplit(ctx, from, to, params, progress);\n }\n\n private static renderFilmBurn(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Add burn effect overlay\n this.renderFade(ctx, from, to, params, progress);\n\n const intensity = Math.sin(progress * Math.PI);\n ctx.fillStyle = `rgba(255, 200, 100, ${intensity * 0.5})`;\n ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n }\n\n private static renderLightLeak(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n // Add light leak overlay\n this.renderFade(ctx, from, to, params, progress);\n\n const gradient = ctx.createLinearGradient(0, 0, ctx.canvas.width, ctx.canvas.height);\n const intensity = Math.sin(progress * Math.PI);\n gradient.addColorStop(0, `rgba(255, 200, 100, ${intensity * 0.4})`);\n gradient.addColorStop(1, \"rgba(255, 200, 100, 0)\");\n\n ctx.globalCompositeOperation = \"screen\";\n ctx.fillStyle = gradient;\n ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n ctx.globalCompositeOperation = \"source-over\";\n }\n\n private static renderWhipPan(ctx: CanvasRenderingContext2D, from: HTMLCanvasElement | HTMLImageElement, to: HTMLCanvasElement | HTMLImageElement, params: TransitionParameters, progress: number): void {\n const blurAmount = Math.sin(progress * Math.PI) * 20;\n ctx.filter = `blur(${blurAmount}px)`;\n\n if (progress < 0.5) {\n const offset = progress * ctx.canvas.width * 2;\n ctx.drawImage(from, -offset, 0, ctx.canvas.width, ctx.canvas.height);\n } else {\n const offset = (1 - progress) * ctx.canvas.width * 2;\n ctx.drawImage(to, offset, 0, ctx.canvas.width, ctx.canvas.height);\n }\n\n ctx.filter = \"none\";\n }\n\n // ============================================================================\n // EASING FUNCTIONS\n // ============================================================================\n\n private static applyEasing(t: number, easing: EasingFunction = \"linear\"): number {\n switch (easing) {\n case \"linear\":\n return t;\n case \"ease\":\n case \"ease-in-out\":\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n case \"ease-in\":\n return t * t;\n case \"ease-out\":\n return t * (2 - t);\n case \"ease-in-quad\":\n return t * t;\n case \"ease-out-quad\":\n return t * (2 - t);\n case \"ease-in-out-quad\":\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n case \"ease-in-cubic\":\n return t * t * t;\n case \"ease-out-cubic\":\n return --t * t * t + 1;\n case \"ease-in-out-cubic\":\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n case \"ease-in-quart\":\n return t * t * t * t;\n case \"ease-out-quart\":\n return 1 - --t * t * t * t;\n case \"ease-in-out-quart\":\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\n case \"spring\":\n return 1 - Math.cos(t * Math.PI * 2.5) * (1 - t);\n case \"bounce\":\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n } else if (t < 2 / 2.75) {\n return 7.5625 * (t -= 1.5 / 2.75) * t + 0.75;\n } else if (t < 2.5 / 2.75) {\n return 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375;\n } else {\n return 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;\n }\n default:\n return t;\n }\n }\n}\n","/**\n * Transition Presets\n * Professional transition definitions mapped to TransitionRenderer types\n *\n * Part of @clypra/engine - shared between clypra-studio and clypra app\n */\n\nimport type { TransitionPreset, TransitionCategory } from \"./types\";\n\nexport const TRANSITION_CATEGORIES: TransitionCategory[] = [\"fade\", \"slide\", \"wipe\", \"zoom\", \"dissolve\", \"creative\"];\n\n/**\n * Professional Transition Preset Library\n * Maps UI-friendly presets to engine TransitionRenderer types\n */\nexport const TRANSITION_PRESETS: TransitionPreset[] = [\n // ========== FADE ==========\n {\n id: \"simple-fade\",\n name: \"Simple Fade\",\n category: \"fade\",\n description: \"Classic crossfade - smooth opacity transition\",\n tags: [\"basic\", \"smooth\", \"classic\"],\n defaultDuration: 1.0,\n renderer: \"fade\",\n params: {},\n },\n {\n id: \"fade-to-black\",\n name: \"Fade to Black\",\n category: \"fade\",\n description: \"Fade out to black, then fade in from black\",\n tags: [\"dramatic\", \"black\", \"film\"],\n defaultDuration: 1.5,\n renderer: \"fade\",\n params: {\n color: \"#000000\",\n },\n },\n {\n id: \"fade-to-white\",\n name: \"Fade to White\",\n category: \"fade\",\n description: \"Bright flash transition through white\",\n tags: [\"bright\", \"flash\", \"clean\"],\n defaultDuration: 1.0,\n renderer: \"fade\",\n params: {\n color: \"#FFFFFF\",\n },\n },\n {\n id: \"dissolve\",\n name: \"Dissolve\",\n category: \"dissolve\",\n description: \"Smooth crossfade dissolution\",\n tags: [\"smooth\", \"classic\", \"blend\"],\n defaultDuration: 1.0,\n renderer: \"dissolve\",\n params: {},\n },\n\n // ========== SLIDE ==========\n {\n id: \"slide-left\",\n name: \"Slide Left\",\n category: \"slide\",\n description: \"New clip slides in from right to left\",\n tags: [\"directional\", \"smooth\", \"horizontal\"],\n defaultDuration: 0.8,\n renderer: \"slide_left\",\n params: {},\n },\n {\n id: \"slide-right\",\n name: \"Slide Right\",\n category: \"slide\",\n description: \"New clip slides in from left to right\",\n tags: [\"directional\", \"smooth\", \"horizontal\"],\n defaultDuration: 0.8,\n renderer: \"slide_right\",\n params: {},\n },\n {\n id: \"slide-up\",\n name: \"Slide Up\",\n category: \"slide\",\n description: \"New clip slides in from bottom to top\",\n tags: [\"directional\", \"smooth\", \"vertical\"],\n defaultDuration: 0.8,\n renderer: \"slide_up\",\n params: {},\n },\n {\n id: \"slide-down\",\n name: \"Slide Down\",\n category: \"slide\",\n description: \"New clip slides in from top to bottom\",\n tags: [\"directional\", \"smooth\", \"vertical\"],\n defaultDuration: 0.8,\n renderer: \"slide_down\",\n params: {},\n },\n\n // ========== WIPE ==========\n {\n id: \"wipe-left\",\n name: \"Wipe Left\",\n category: \"wipe\",\n description: \"Clean horizontal wipe from left\",\n tags: [\"directional\", \"clean\", \"horizontal\"],\n defaultDuration: 0.9,\n renderer: \"wipe_left\",\n params: {},\n },\n {\n id: \"wipe-right\",\n name: \"Wipe Right\",\n category: \"wipe\",\n description: \"Clean horizontal wipe from right\",\n tags: [\"directional\", \"clean\", \"horizontal\"],\n defaultDuration: 0.9,\n renderer: \"wipe_right\",\n params: {},\n },\n {\n id: \"wipe-up\",\n name: \"Wipe Up\",\n category: \"wipe\",\n description: \"Clean vertical wipe from bottom\",\n tags: [\"directional\", \"clean\", \"vertical\"],\n defaultDuration: 0.9,\n renderer: \"wipe_up\",\n params: {},\n },\n {\n id: \"wipe-down\",\n name: \"Wipe Down\",\n category: \"wipe\",\n description: \"Clean vertical wipe from top\",\n tags: [\"directional\", \"clean\", \"vertical\"],\n defaultDuration: 0.9,\n renderer: \"wipe_down\",\n params: {},\n },\n {\n id: \"wipe-clockwise\",\n name: \"Clock Wipe\",\n category: \"wipe\",\n description: \"Rotating clock hand wipe effect\",\n tags: [\"radial\", \"rotating\", \"clock\"],\n defaultDuration: 1.2,\n renderer: \"wipe_clockwise\",\n params: {},\n },\n {\n id: \"wipe-center\",\n name: \"Circle Wipe\",\n category: \"wipe\",\n description: \"Circular reveal from center outward\",\n tags: [\"radial\", \"reveal\", \"circular\"],\n defaultDuration: 1.0,\n renderer: \"wipe_center\",\n params: {},\n },\n\n // ========== ZOOM ==========\n {\n id: \"zoom-in\",\n name: \"Zoom In\",\n category: \"zoom\",\n description: \"Outgoing clip zooms in while new clip fades in\",\n tags: [\"scale\", \"dramatic\", \"zoom\"],\n defaultDuration: 1.0,\n renderer: \"zoom_in\",\n params: {\n scale: 1.3,\n },\n },\n {\n id: \"zoom-out\",\n name: \"Zoom Out\",\n category: \"zoom\",\n description: \"Outgoing clip zooms out while new clip fades in\",\n tags: [\"scale\", \"reveal\", \"zoom\"],\n defaultDuration: 1.0,\n renderer: \"zoom_out\",\n params: {\n scale: 0.7,\n },\n },\n {\n id: \"zoom-blur\",\n name: \"Zoom with Blur\",\n category: \"zoom\",\n description: \"Fast zoom with motion blur for energy\",\n tags: [\"fast\", \"blur\", \"energy\"],\n defaultDuration: 0.6,\n renderer: \"zoom_blur\",\n params: {\n scale: 1.3,\n blurAmount: 12,\n },\n },\n\n // ========== SHAPE ==========\n {\n id: \"circle-expand\",\n name: \"Circle Expand\",\n category: \"wipe\",\n description: \"New clip expands from center in a circle\",\n tags: [\"radial\", \"expand\", \"circle\"],\n defaultDuration: 1.0,\n renderer: \"circle_expand\",\n params: {},\n },\n {\n id: \"circle-collapse\",\n name: \"Circle Collapse\",\n category: \"wipe\",\n description: \"Old clip collapses to center in a circle\",\n tags: [\"radial\", \"collapse\", \"circle\"],\n defaultDuration: 1.0,\n renderer: \"circle_collapse\",\n params: {},\n },\n {\n id: \"diamond-expand\",\n name: \"Diamond Expand\",\n category: \"wipe\",\n description: \"New clip expands from center in a diamond shape\",\n tags: [\"geometric\", \"expand\", \"diamond\"],\n defaultDuration: 1.0,\n renderer: \"diamond_expand\",\n params: {},\n },\n {\n id: \"rectangle-expand\",\n name: \"Rectangle Expand\",\n category: \"wipe\",\n description: \"New clip expands from center in a rectangle\",\n tags: [\"geometric\", \"expand\", \"rectangle\"],\n defaultDuration: 1.0,\n renderer: \"rectangle_expand\",\n params: {},\n },\n\n // ========== BLUR ==========\n {\n id: \"blur-fade\",\n name: \"Blur Fade\",\n category: \"creative\",\n description: \"Dreamy fade with motion blur effect\",\n tags: [\"blur\", \"dreamy\", \"soft\"],\n defaultDuration: 1.2,\n renderer: \"blur_fade\",\n params: {\n blurAmount: 15,\n },\n },\n {\n id: \"directional-blur\",\n name: \"Directional Blur\",\n category: \"creative\",\n description: \"Fade with directional motion blur\",\n tags: [\"blur\", \"motion\", \"directional\"],\n defaultDuration: 1.0,\n renderer: \"directional_blur\",\n params: {\n blurAmount: 12,\n },\n },\n\n // ========== CREATIVE ==========\n {\n id: \"glitch\",\n name: \"Glitch\",\n category: \"creative\",\n description: \"Digital glitch transition with artifacts\",\n tags: [\"glitch\", \"digital\", \"distortion\"],\n defaultDuration: 0.8,\n renderer: \"glitch\",\n params: {},\n },\n {\n id: \"rgb-split\",\n name: \"RGB Split\",\n category: \"creative\",\n description: \"Chromatic aberration RGB channel split\",\n tags: [\"chromatic\", \"rgb\", \"split\"],\n defaultDuration: 0.7,\n renderer: \"rgb_split\",\n params: {},\n },\n {\n id: \"chromatic\",\n name: \"Chromatic\",\n category: \"creative\",\n description: \"Chromatic aberration effect\",\n tags: [\"chromatic\", \"aberration\", \"color\"],\n defaultDuration: 0.8,\n renderer: \"chromatic\",\n params: {},\n },\n {\n id: \"film-burn\",\n name: \"Film Burn\",\n category: \"creative\",\n description: \"Vintage film burn effect\",\n tags: [\"film\", \"burn\", \"vintage\"],\n defaultDuration: 1.2,\n renderer: \"film_burn\",\n params: {},\n },\n {\n id: \"light-leak\",\n name: \"Light Leak\",\n category: \"creative\",\n description: \"Light leak overlay transition\",\n tags: [\"light\", \"leak\", \"vintage\"],\n defaultDuration: 1.0,\n renderer: \"light_leak\",\n params: {},\n },\n {\n id: \"whip-pan\",\n name: \"Whip Pan\",\n category: \"creative\",\n description: \"Fast whip pan with motion blur\",\n tags: [\"whip\", \"fast\", \"blur\"],\n defaultDuration: 0.5,\n renderer: \"whip_pan\",\n params: {},\n },\n\n // ========== BASIC (for compatibility) ==========\n {\n id: \"cut\",\n name: \"Cut\",\n category: \"fade\",\n description: \"Instant cut (no transition)\",\n tags: [\"instant\", \"cut\", \"basic\"],\n defaultDuration: 0.0,\n renderer: \"cut\",\n params: {},\n },\n];\n","/**\n * Transition Helpers\n * Utility functions for working with transition presets\n *\n * Part of @clypra/engine - shared between clypra-studio and clypra app\n */\n\nimport type { TransitionPreset, TransitionCategory, TransitionRenderer } from \"./types\";\nimport { TRANSITION_PRESETS, TRANSITION_CATEGORIES } from \"./presets\";\n\n/**\n * Get all available transition categories\n */\nexport function getTransitionCategories(): TransitionCategory[] {\n return [...TRANSITION_CATEGORIES];\n}\n\n/**\n * Get transitions filtered by category\n */\nexport function getTransitionsByCategory(category: TransitionCategory): TransitionPreset[] {\n return TRANSITION_PRESETS.filter((preset) => preset.category === category);\n}\n\n/**\n * Search transitions by query (name, description, or tags)\n */\nexport function searchTransitions(query: string): TransitionPreset[] {\n if (!query || query.trim() === \"\") {\n return TRANSITION_PRESETS;\n }\n\n const lowerQuery = query.toLowerCase().trim();\n\n return TRANSITION_PRESETS.filter((preset) => {\n // Search in name\n if (preset.name.toLowerCase().includes(lowerQuery)) {\n return true;\n }\n\n // Search in description\n if (preset.description.toLowerCase().includes(lowerQuery)) {\n return true;\n }\n\n // Search in tags\n if (preset.tags.some((tag) => tag.toLowerCase().includes(lowerQuery))) {\n return true;\n }\n\n // Search in renderer name\n if (preset.renderer.toLowerCase().includes(lowerQuery)) {\n return true;\n }\n\n return false;\n });\n}\n\n/**\n * Get a specific transition preset by ID\n */\nexport function getTransitionById(id: string): TransitionPreset | undefined {\n return TRANSITION_PRESETS.find((preset) => preset.id === id);\n}\n\n/**\n * Get a transition preset by renderer type\n */\nexport function getTransitionByRenderer(renderer: TransitionRenderer): TransitionPreset | undefined {\n return TRANSITION_PRESETS.find((preset) => preset.renderer === renderer);\n}\n\n/**\n * Get all transition presets\n */\nexport function getAllTransitions(): TransitionPreset[] {\n return [...TRANSITION_PRESETS];\n}\n\n/**\n * Get transition count by category\n */\nexport function getTransitionCountByCategory(): Record<TransitionCategory, number> {\n const counts = {} as Record<TransitionCategory, number>;\n\n for (const category of TRANSITION_CATEGORIES) {\n counts[category] = getTransitionsByCategory(category).length;\n }\n\n return counts;\n}\n\n/**\n * Get all unique tags from all transitions\n */\nexport function getAllTransitionTags(): string[] {\n const tagsSet = new Set<string>();\n\n for (const preset of TRANSITION_PRESETS) {\n for (const tag of preset.tags) {\n tagsSet.add(tag);\n }\n }\n\n return Array.from(tagsSet).sort();\n}\n\n/**\n * Filter transitions by multiple tags (AND logic)\n */\nexport function getTransitionsByTags(tags: string[]): TransitionPreset[] {\n if (tags.length === 0) {\n return TRANSITION_PRESETS;\n }\n\n const lowerTags = tags.map((tag) => tag.toLowerCase());\n\n return TRANSITION_PRESETS.filter((preset) => {\n const presetTags = preset.tags.map((tag) => tag.toLowerCase());\n return lowerTags.every((tag) => presetTags.includes(tag));\n });\n}\n\n/**\n * Get recommended transition duration for a preset\n */\nexport function getRecommendedDuration(presetId: string): number {\n const preset = getTransitionById(presetId);\n return preset?.defaultDuration ?? 1.0;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgBO,IAAM,qBAAN,MAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAW9B,OAAO,OAAO,KAA+B,WAAiD,SAA+C,UAAkC,QAA8B,UAAwB;AACnO,UAAM,SAAS,KAAK,YAAY,QAAQ;AACxC,QAAI,QAAQ;AAEV,YAAM,gBAAgB,KAAK,YAAY,UAAU,OAAO,UAAU,aAAa;AAC/E,aAAO,KAAK,MAAM,KAAK,WAAW,SAAS,QAAQ,aAAa;AAAA,IAClE,OAAO;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AACpC;","names":[]}
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Transition Types
3
+ * Type definitions for transition effects between video clips
4
+ *
5
+ * Part of @clypra/engine - shared between clypra-studio and clypra app
6
+ */
7
+ type TransitionRenderer$1 = "fade" | "dissolve" | "cut" | "canvas" | "zoom_in" | "zoom_out" | "zoom_blur" | "slide_left" | "slide_right" | "slide_up" | "slide_down" | "wipe_left" | "wipe_right" | "wipe_up" | "wipe_down" | "wipe_clockwise" | "wipe_center" | "circle_expand" | "circle_collapse" | "diamond_expand" | "rectangle_expand" | "blur_fade" | "directional_blur" | "glitch" | "rgb_split" | "chromatic" | "film_burn" | "light_leak" | "whip_pan";
8
+ type EasingFunction = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "ease-in-quad" | "ease-out-quad" | "ease-in-out-quad" | "ease-in-cubic" | "ease-out-cubic" | "ease-in-out-cubic" | "ease-in-quart" | "ease-out-quart" | "ease-in-out-quart" | "spring" | "bounce";
9
+ interface TransitionParameters {
10
+ easing?: EasingFunction;
11
+ direction?: "left" | "right" | "up" | "down";
12
+ angle?: number;
13
+ scale?: number;
14
+ centerX?: number;
15
+ centerY?: number;
16
+ blurAmount?: number;
17
+ feather?: number;
18
+ color?: string;
19
+ [key: string]: any;
20
+ }
21
+ type TransitionCategory = "fade" | "slide" | "wipe" | "zoom" | "dissolve" | "creative";
22
+ interface TransitionPreset {
23
+ id: string;
24
+ name: string;
25
+ category: TransitionCategory;
26
+ description: string;
27
+ tags: string[];
28
+ defaultDuration: number;
29
+ durationConstraints?: {
30
+ min: number;
31
+ max: number;
32
+ };
33
+ renderer: TransitionRenderer$1;
34
+ params: TransitionParameters;
35
+ isPremium?: boolean;
36
+ thumbnail?: string;
37
+ }
38
+ interface AppliedTransition {
39
+ id: string;
40
+ transitionId: string;
41
+ renderer: TransitionRenderer$1;
42
+ params: TransitionParameters;
43
+ duration: number;
44
+ easing?: EasingFunction;
45
+ }
46
+
47
+ /**
48
+ * Transition Renderer
49
+ *
50
+ * Applies transitions between two video frames.
51
+ * These are NOT video files - they are algorithmic blends.
52
+ *
53
+ * Examples:
54
+ * - fade: Crossfade opacity
55
+ * - zoom_in: Scale up during fade
56
+ * - wipe_left: Reveal next frame from left
57
+ *
58
+ * Part of @clypra/engine - shared between clypra-studio and clypra app
59
+ */
60
+
61
+ declare class TransitionRenderer {
62
+ /**
63
+ * Render a transition between two frames
64
+ *
65
+ * @param ctx - Canvas 2D context
66
+ * @param fromFrame - Canvas or image of the outgoing frame
67
+ * @param toFrame - Canvas or image of the incoming frame
68
+ * @param renderer - Transition type
69
+ * @param params - Transition parameters
70
+ * @param progress - Transition progress (0-1)
71
+ */
72
+ static render(ctx: CanvasRenderingContext2D, fromFrame: HTMLCanvasElement | HTMLImageElement, toFrame: HTMLCanvasElement | HTMLImageElement, renderer: TransitionRenderer$1, params: TransitionParameters, progress: number): void;
73
+ /**
74
+ * Get the renderer function for a transition type
75
+ */
76
+ private static getRenderer;
77
+ private static renderFade;
78
+ private static renderDissolve;
79
+ private static renderCut;
80
+ private static renderZoomIn;
81
+ private static renderZoomOut;
82
+ private static renderZoomBlur;
83
+ private static renderSlideLeft;
84
+ private static renderSlideRight;
85
+ private static renderSlideUp;
86
+ private static renderSlideDown;
87
+ private static renderWipeLeft;
88
+ private static renderWipeRight;
89
+ private static renderWipeUp;
90
+ private static renderWipeDown;
91
+ private static renderWipeClockwise;
92
+ private static renderWipeCenter;
93
+ private static renderCircleExpand;
94
+ private static renderCircleCollapse;
95
+ private static renderDiamondExpand;
96
+ private static renderRectangleExpand;
97
+ private static renderBlurFade;
98
+ private static renderDirectionalBlur;
99
+ private static renderGlitch;
100
+ private static renderRGBSplit;
101
+ private static renderChromatic;
102
+ private static renderFilmBurn;
103
+ private static renderLightLeak;
104
+ private static renderWhipPan;
105
+ private static applyEasing;
106
+ }
107
+
108
+ /**
109
+ * Transition Presets
110
+ * Professional transition definitions mapped to TransitionRenderer types
111
+ *
112
+ * Part of @clypra/engine - shared between clypra-studio and clypra app
113
+ */
114
+
115
+ declare const TRANSITION_CATEGORIES: TransitionCategory[];
116
+ /**
117
+ * Professional Transition Preset Library
118
+ * Maps UI-friendly presets to engine TransitionRenderer types
119
+ */
120
+ declare const TRANSITION_PRESETS: TransitionPreset[];
121
+
122
+ /**
123
+ * Transition Helpers
124
+ * Utility functions for working with transition presets
125
+ *
126
+ * Part of @clypra/engine - shared between clypra-studio and clypra app
127
+ */
128
+
129
+ /**
130
+ * Get all available transition categories
131
+ */
132
+ declare function getTransitionCategories(): TransitionCategory[];
133
+ /**
134
+ * Get transitions filtered by category
135
+ */
136
+ declare function getTransitionsByCategory(category: TransitionCategory): TransitionPreset[];
137
+ /**
138
+ * Search transitions by query (name, description, or tags)
139
+ */
140
+ declare function searchTransitions(query: string): TransitionPreset[];
141
+ /**
142
+ * Get a specific transition preset by ID
143
+ */
144
+ declare function getTransitionById(id: string): TransitionPreset | undefined;
145
+ /**
146
+ * Get a transition preset by renderer type
147
+ */
148
+ declare function getTransitionByRenderer(renderer: TransitionRenderer$1): TransitionPreset | undefined;
149
+ /**
150
+ * Get all transition presets
151
+ */
152
+ declare function getAllTransitions(): TransitionPreset[];
153
+ /**
154
+ * Get transition count by category
155
+ */
156
+ declare function getTransitionCountByCategory(): Record<TransitionCategory, number>;
157
+ /**
158
+ * Get all unique tags from all transitions
159
+ */
160
+ declare function getAllTransitionTags(): string[];
161
+ /**
162
+ * Filter transitions by multiple tags (AND logic)
163
+ */
164
+ declare function getTransitionsByTags(tags: string[]): TransitionPreset[];
165
+ /**
166
+ * Get recommended transition duration for a preset
167
+ */
168
+ declare function getRecommendedDuration(presetId: string): number;
169
+
170
+ export { type AppliedTransition, type EasingFunction, TRANSITION_CATEGORIES, TRANSITION_PRESETS, type TransitionCategory, type TransitionParameters, type TransitionPreset, TransitionRenderer, type TransitionRenderer$1 as TransitionRendererType, getAllTransitionTags, getAllTransitions, getRecommendedDuration, getTransitionById, getTransitionByRenderer, getTransitionCategories, getTransitionCountByCategory, getTransitionsByCategory, getTransitionsByTags, searchTransitions };
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Transition Types
3
+ * Type definitions for transition effects between video clips
4
+ *
5
+ * Part of @clypra/engine - shared between clypra-studio and clypra app
6
+ */
7
+ type TransitionRenderer$1 = "fade" | "dissolve" | "cut" | "canvas" | "zoom_in" | "zoom_out" | "zoom_blur" | "slide_left" | "slide_right" | "slide_up" | "slide_down" | "wipe_left" | "wipe_right" | "wipe_up" | "wipe_down" | "wipe_clockwise" | "wipe_center" | "circle_expand" | "circle_collapse" | "diamond_expand" | "rectangle_expand" | "blur_fade" | "directional_blur" | "glitch" | "rgb_split" | "chromatic" | "film_burn" | "light_leak" | "whip_pan";
8
+ type EasingFunction = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "ease-in-quad" | "ease-out-quad" | "ease-in-out-quad" | "ease-in-cubic" | "ease-out-cubic" | "ease-in-out-cubic" | "ease-in-quart" | "ease-out-quart" | "ease-in-out-quart" | "spring" | "bounce";
9
+ interface TransitionParameters {
10
+ easing?: EasingFunction;
11
+ direction?: "left" | "right" | "up" | "down";
12
+ angle?: number;
13
+ scale?: number;
14
+ centerX?: number;
15
+ centerY?: number;
16
+ blurAmount?: number;
17
+ feather?: number;
18
+ color?: string;
19
+ [key: string]: any;
20
+ }
21
+ type TransitionCategory = "fade" | "slide" | "wipe" | "zoom" | "dissolve" | "creative";
22
+ interface TransitionPreset {
23
+ id: string;
24
+ name: string;
25
+ category: TransitionCategory;
26
+ description: string;
27
+ tags: string[];
28
+ defaultDuration: number;
29
+ durationConstraints?: {
30
+ min: number;
31
+ max: number;
32
+ };
33
+ renderer: TransitionRenderer$1;
34
+ params: TransitionParameters;
35
+ isPremium?: boolean;
36
+ thumbnail?: string;
37
+ }
38
+ interface AppliedTransition {
39
+ id: string;
40
+ transitionId: string;
41
+ renderer: TransitionRenderer$1;
42
+ params: TransitionParameters;
43
+ duration: number;
44
+ easing?: EasingFunction;
45
+ }
46
+
47
+ /**
48
+ * Transition Renderer
49
+ *
50
+ * Applies transitions between two video frames.
51
+ * These are NOT video files - they are algorithmic blends.
52
+ *
53
+ * Examples:
54
+ * - fade: Crossfade opacity
55
+ * - zoom_in: Scale up during fade
56
+ * - wipe_left: Reveal next frame from left
57
+ *
58
+ * Part of @clypra/engine - shared between clypra-studio and clypra app
59
+ */
60
+
61
+ declare class TransitionRenderer {
62
+ /**
63
+ * Render a transition between two frames
64
+ *
65
+ * @param ctx - Canvas 2D context
66
+ * @param fromFrame - Canvas or image of the outgoing frame
67
+ * @param toFrame - Canvas or image of the incoming frame
68
+ * @param renderer - Transition type
69
+ * @param params - Transition parameters
70
+ * @param progress - Transition progress (0-1)
71
+ */
72
+ static render(ctx: CanvasRenderingContext2D, fromFrame: HTMLCanvasElement | HTMLImageElement, toFrame: HTMLCanvasElement | HTMLImageElement, renderer: TransitionRenderer$1, params: TransitionParameters, progress: number): void;
73
+ /**
74
+ * Get the renderer function for a transition type
75
+ */
76
+ private static getRenderer;
77
+ private static renderFade;
78
+ private static renderDissolve;
79
+ private static renderCut;
80
+ private static renderZoomIn;
81
+ private static renderZoomOut;
82
+ private static renderZoomBlur;
83
+ private static renderSlideLeft;
84
+ private static renderSlideRight;
85
+ private static renderSlideUp;
86
+ private static renderSlideDown;
87
+ private static renderWipeLeft;
88
+ private static renderWipeRight;
89
+ private static renderWipeUp;
90
+ private static renderWipeDown;
91
+ private static renderWipeClockwise;
92
+ private static renderWipeCenter;
93
+ private static renderCircleExpand;
94
+ private static renderCircleCollapse;
95
+ private static renderDiamondExpand;
96
+ private static renderRectangleExpand;
97
+ private static renderBlurFade;
98
+ private static renderDirectionalBlur;
99
+ private static renderGlitch;
100
+ private static renderRGBSplit;
101
+ private static renderChromatic;
102
+ private static renderFilmBurn;
103
+ private static renderLightLeak;
104
+ private static renderWhipPan;
105
+ private static applyEasing;
106
+ }
107
+
108
+ /**
109
+ * Transition Presets
110
+ * Professional transition definitions mapped to TransitionRenderer types
111
+ *
112
+ * Part of @clypra/engine - shared between clypra-studio and clypra app
113
+ */
114
+
115
+ declare const TRANSITION_CATEGORIES: TransitionCategory[];
116
+ /**
117
+ * Professional Transition Preset Library
118
+ * Maps UI-friendly presets to engine TransitionRenderer types
119
+ */
120
+ declare const TRANSITION_PRESETS: TransitionPreset[];
121
+
122
+ /**
123
+ * Transition Helpers
124
+ * Utility functions for working with transition presets
125
+ *
126
+ * Part of @clypra/engine - shared between clypra-studio and clypra app
127
+ */
128
+
129
+ /**
130
+ * Get all available transition categories
131
+ */
132
+ declare function getTransitionCategories(): TransitionCategory[];
133
+ /**
134
+ * Get transitions filtered by category
135
+ */
136
+ declare function getTransitionsByCategory(category: TransitionCategory): TransitionPreset[];
137
+ /**
138
+ * Search transitions by query (name, description, or tags)
139
+ */
140
+ declare function searchTransitions(query: string): TransitionPreset[];
141
+ /**
142
+ * Get a specific transition preset by ID
143
+ */
144
+ declare function getTransitionById(id: string): TransitionPreset | undefined;
145
+ /**
146
+ * Get a transition preset by renderer type
147
+ */
148
+ declare function getTransitionByRenderer(renderer: TransitionRenderer$1): TransitionPreset | undefined;
149
+ /**
150
+ * Get all transition presets
151
+ */
152
+ declare function getAllTransitions(): TransitionPreset[];
153
+ /**
154
+ * Get transition count by category
155
+ */
156
+ declare function getTransitionCountByCategory(): Record<TransitionCategory, number>;
157
+ /**
158
+ * Get all unique tags from all transitions
159
+ */
160
+ declare function getAllTransitionTags(): string[];
161
+ /**
162
+ * Filter transitions by multiple tags (AND logic)
163
+ */
164
+ declare function getTransitionsByTags(tags: string[]): TransitionPreset[];
165
+ /**
166
+ * Get recommended transition duration for a preset
167
+ */
168
+ declare function getRecommendedDuration(presetId: string): number;
169
+
170
+ export { type AppliedTransition, type EasingFunction, TRANSITION_CATEGORIES, TRANSITION_PRESETS, type TransitionCategory, type TransitionParameters, type TransitionPreset, TransitionRenderer, type TransitionRenderer$1 as TransitionRendererType, getAllTransitionTags, getAllTransitions, getRecommendedDuration, getTransitionById, getTransitionByRenderer, getTransitionCategories, getTransitionCountByCategory, getTransitionsByCategory, getTransitionsByTags, searchTransitions };
@@ -0,0 +1,32 @@
1
+ import {
2
+ TRANSITION_CATEGORIES,
3
+ TRANSITION_PRESETS,
4
+ TransitionRenderer,
5
+ getAllTransitionTags,
6
+ getAllTransitions,
7
+ getRecommendedDuration,
8
+ getTransitionById,
9
+ getTransitionByRenderer,
10
+ getTransitionCategories,
11
+ getTransitionCountByCategory,
12
+ getTransitionsByCategory,
13
+ getTransitionsByTags,
14
+ searchTransitions
15
+ } from "../chunk-QMRMNH52.js";
16
+ import "../chunk-PZ5AY32C.js";
17
+ export {
18
+ TRANSITION_CATEGORIES,
19
+ TRANSITION_PRESETS,
20
+ TransitionRenderer,
21
+ getAllTransitionTags,
22
+ getAllTransitions,
23
+ getRecommendedDuration,
24
+ getTransitionById,
25
+ getTransitionByRenderer,
26
+ getTransitionCategories,
27
+ getTransitionCountByCategory,
28
+ getTransitionsByCategory,
29
+ getTransitionsByTags,
30
+ searchTransitions
31
+ };
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}