From 0a5b51837d2f5c45c50532e9fead27ddec7b1e57 Mon Sep 17 00:00:00 2001 From: tejpratapsingh Date: Fri, 15 May 2026 00:28:24 +0530 Subject: [PATCH 1/2] templates: add motion template system for dynamic SDUI generation * templates: introduce `MotionTemplate` and `MotionTemplateApplier` for JSON placeholder replacement * templates: add support for dynamic list generation using the `{{REPLICATE}}` marker * templates: implement `MotionTemplateViewGenerator` to bridge templates with `MotionView` creation * templates: add unit tests for placeholder logic and comprehensive module documentation --- modules/templates/README.md | 107 ++++++++++++++++++ modules/templates/build.gradle | 2 + .../motionlib/templates/MotionTemplate.kt | 11 ++ .../templates/MotionTemplateApplier.kt | 97 ++++++++++++++++ .../templates/MotionTemplateViewGenerator.kt | 23 ++++ .../templates/MotionTemplateApplierTest.kt | 69 +++++++++++ 6 files changed, 309 insertions(+) create mode 100644 modules/templates/README.md create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplate.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplier.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateViewGenerator.kt create mode 100644 modules/templates/src/test/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplierTest.kt diff --git a/modules/templates/README.md b/modules/templates/README.md new file mode 100644 index 00000000..5fe2be33 --- /dev/null +++ b/modules/templates/README.md @@ -0,0 +1,107 @@ +# Motion Template System + +The `templates` module provides a way to define `MotionView` structures using JSON templates with placeholders. This allows for decoupling the design of a motion view from the dynamic data it displays. + +## Core Components + +- **`MotionTemplate`**: Holds the SDUI JSON definition with `{{placeholder}}` markers. +- **`MotionTemplateApplier`**: Replaces placeholders in the JSON with actual values from a `Map`. +- **`MotionTemplateViewGenerator`**: Combines the applier and SDUI parsers to create `MotionView` instances. + +## Usage Example + +### 1. Define a Template + +You can define your SDUI JSON with placeholders for any value (strings, numbers, etc.). + +```json +{ + "type": "TransparentTextView", + "text": "Welcome, {{username}}!", + "startFrame": 0, + "endFrame": "{{duration}}", + "layout": { + "width": "match_parent", + "height": "wrap_content", + "gravity": "center" + } +} +``` + +### 2. Load and Apply Data + +Use the `MotionTemplateViewGenerator` to create a `MotionView`. + +```kotlin +// 1. Prepare the template +val templateJson = """{ ... }""" // The JSON above +val template = MotionTemplate(JsonParser.parseString(templateJson).asJsonObject) + +// 2. Define the data +val data = mapOf( + "username" to "John Doe", + "duration" to 150 +) + +// 3. Generate the MotionView +val motionView = MotionTemplateViewGenerator.generate(context, template, data) + +// 4. Add to your composer or layout +motionComposer.addView(motionView as View) +``` + +## Advanced Usage + +### List Replication +You can generate a dynamic list of views (like lyrics or a gallery) using the `{{REPLICATE}}` marker. + +**Template:** +```json +{ + "views": [ + { + "{{REPLICATE}}": "items", + "template": { + "type": "PopUpTextView", + "text": "{{text}}", + "startFrame": "{{frame}}" + } + } + ] +} +``` + +**Data:** +```kotlin +val data = mapOf( + "items" to listOf( + mapOf("text" to "Line 1", "frame" to 0), + mapOf("text" to "Line 2", "frame" to 100) + ) +) +``` + +**Result:** +The system will repeat the `template` object for each item in the `items` list, injecting the item's data into the placeholders. + +## Real World Example: Lyrics Video + +Instead of manually creating views for each lyric line in code, you can use a template: + +```kotlin +val lyricsData = project.lyrics.map { + mapOf("text" to it.text, "frame" to it.frame, "nextFrame" to it.nextFrame) +} + +val data = mapOf( + "songName" to project.name, + "lyrics" to lyricsData +) + +val motionView = MotionTemplateViewGenerator.generate(context, lyricsTemplate, data) +``` + +The system uses `Gson`'s `JsonObject` and `JsonArray` to traverse the template tree. It performs string replacement on any `JsonPrimitive` that is a string. + +> [!NOTE] +> All data values are converted to strings using `.toString()` before replacement. Ensure your SDUI factories can handle the resulting string types (e.g., parsing "150" back to an Int if needed, though most SDUI parsers in this project handle stringified numbers well). diff --git a/modules/templates/build.gradle b/modules/templates/build.gradle index 6d579a9e..0e5169ae 100644 --- a/modules/templates/build.gradle +++ b/modules/templates/build.gradle @@ -47,7 +47,9 @@ afterEvaluate { dependencies { implementation project(path: ':modules:core') + implementation project(path: ':modules:sdui') implementation libs.androidx.appcompat + implementation libs.gson api project(path: ':modules:motionlib') diff --git a/modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplate.kt b/modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplate.kt new file mode 100644 index 00000000..06a40e54 --- /dev/null +++ b/modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplate.kt @@ -0,0 +1,11 @@ +package com.tejpratapsingh.motionlib.templates + +import com.google.gson.JsonObject + +/** + * Represents a Motion template. + * @param sduiJson The raw SDUI JSON containing placeholders like {{variable_name}}. + */ +data class MotionTemplate( + val sduiJson: JsonObject +) diff --git a/modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplier.kt b/modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplier.kt new file mode 100644 index 00000000..005b7b28 --- /dev/null +++ b/modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplier.kt @@ -0,0 +1,97 @@ +package com.tejpratapsingh.motionlib.templates + +import com.google.gson.JsonArray +import com.google.gson.JsonElement +import com.google.gson.JsonObject +import com.google.gson.JsonPrimitive + +/** + * Applies data to a [MotionTemplate] by replacing placeholders in its SDUI JSON. + */ +object MotionTemplateApplier { + + private const val PLACEHOLDER_START = "{{" + private const val PLACEHOLDER_END = "}}" + + private const val REPLICATE_KEY = "{{REPLICATE}}" + private const val TEMPLATE_KEY = "template" + + /** + * Applies data to the template JSON. + * @param template The template to apply data to. + * @param data A map of keys to values to replace placeholders. + * @return A new [JsonObject] with placeholders replaced by actual data. + */ + fun apply(template: MotionTemplate, data: Map): JsonObject { + return applyToElement(template.sduiJson, data).asJsonObject + } + + private fun applyToElement(element: JsonElement, data: Map): JsonElement { + return when { + element.isJsonObject -> { + val jsonObj = element.asJsonObject + val newObj = JsonObject() + jsonObj.entrySet().forEach { (key, value) -> + newObj.add(key, applyToElement(value, data)) + } + newObj + } + + element.isJsonArray -> { + val newArray = JsonArray() + element.asJsonArray.forEach { value -> + if (value.isJsonObject && value.asJsonObject.has(REPLICATE_KEY)) { + // Handle list replication + val replicationObj = value.asJsonObject + val dataKey = replicationObj.get(REPLICATE_KEY).asString + val listTemplate = replicationObj.get(TEMPLATE_KEY) + + val listData = data[dataKey] as? List<*> + listData?.forEach { item -> + val itemMap = when (item) { + is Map<*, *> -> item.mapKeys { it.key.toString() } + else -> { + // Try to convert object to map using reflection or keep as is if primitive + // For simplicity in this example, we assume Map or we can use Gson to convert object to Map + try { + val json = com.google.gson.Gson().toJsonTree(item).asJsonObject + json.entrySet().associate { it.key to it.value } + } catch (e: Exception) { + emptyMap() + } + } + } + // Merge item data with parent data so globals are available + val mergedData = data + itemMap.filterValues { it != null }.mapValues { it.value!! } + newArray.add(applyToElement(listTemplate, mergedData)) + } + } else { + newArray.add(applyToElement(value, data)) + } + } + newArray + } + + element.isJsonPrimitive -> { + val primitive = element.asJsonPrimitive + if (primitive.isString) { + val replacedString = replacePlaceholders(primitive.asString, data) + JsonPrimitive(replacedString) + } else { + primitive + } + } + + else -> element + } + } + + private fun replacePlaceholders(input: String, data: Map): String { + var result = input + data.forEach { (key, value) -> + val placeholder = "$PLACEHOLDER_START$key$PLACEHOLDER_END" + result = result.replace(placeholder, value.toString()) + } + return result + } +} diff --git a/modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateViewGenerator.kt b/modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateViewGenerator.kt new file mode 100644 index 00000000..768c253a --- /dev/null +++ b/modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateViewGenerator.kt @@ -0,0 +1,23 @@ +package com.tejpratapsingh.motionlib.templates + +import android.content.Context +import com.tejpratapsingh.motion.sdui.infra.toMotionView +import com.tejpratapsingh.motionlib.core.MotionView + +/** + * Generates [MotionView] from [MotionTemplate] and dynamic data. + */ +object MotionTemplateViewGenerator { + + /** + * Generates a [MotionView] instance. + * @param context Android context. + * @param template The template to use. + * @param data Dynamic data to apply to the template. + * @return A [MotionView] created from the SDUI definition. + */ + fun generate(context: Context, template: MotionTemplate, data: Map): MotionView { + val appliedJson = MotionTemplateApplier.apply(template, data) + return appliedJson.toMotionView(context) + } +} diff --git a/modules/templates/src/test/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplierTest.kt b/modules/templates/src/test/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplierTest.kt new file mode 100644 index 00000000..1cd26526 --- /dev/null +++ b/modules/templates/src/test/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplierTest.kt @@ -0,0 +1,69 @@ +package com.tejpratapsingh.motionlib.templates + +import com.google.gson.JsonObject +import com.google.gson.JsonParser +import org.junit.Assert.assertEquals +import org.junit.Test + +class MotionTemplateApplierTest { + + @Test + fun testSimplePlaceholderReplacement() { + val rawJson = """ + { + "type": "text", + "content": "{{text_content}}", + "color": "{{color_code}}" + } + """.trimIndent() + + val template = MotionTemplate(JsonParser.parseString(rawJson).asJsonObject) + val data = mapOf( + "text_content" to "Hello World", + "color" to "Red" // This won't match color_code exactly unless we handle partial matches or the key is exact + ) + + // Let's use exact keys for the test + val exactData = mapOf( + "text_content" to "Hello World", + "color_code" to "#FF0000" + ) + + val result = MotionTemplateApplier.apply(template, exactData) + + assertEquals("Hello World", result.get("content").asString) + assertEquals("#FF0000", result.get("color").asString) + } + + @Test + fun testListReplication() { + val rawJson = """ + { + "views": [ + { + "{{REPLICATE}}": "items", + "template": { + "type": "text", + "content": "Item {{id}}: {{name}}" + } + } + ] + } + """.trimIndent() + + val template = MotionTemplate(JsonParser.parseString(rawJson).asJsonObject) + val data = mapOf( + "items" to listOf( + mapOf("id" to 1, "name" to "Alpha"), + mapOf("id" to 2, "name" to "Beta") + ) + ) + + val result = MotionTemplateApplier.apply(template, data) + val views = result.getAsJsonArray("views") + + assertEquals(2, views.size()) + assertEquals("Item 1: Alpha", views[0].asJsonObject.get("content").asString) + assertEquals("Item 2: Beta", views[1].asJsonObject.get("content").asString) + } +} From d9df255e8f7ea496360bb4b306dec5e29aa867c7 Mon Sep 17 00:00:00 2001 From: tejpratapsingh Date: Sat, 16 May 2026 00:32:00 +0530 Subject: [PATCH 2/2] templates: replace JSON-based template system with extensible Kotlin DSL * templates: introduce `MotionTemplate` DSL with structured `parameters` and `content` blocks * templates: add DSL extension functions for text, image, video, background, and audio components * templates: implement `TemplateSerialization` to support JSON import/export and data application * templates: add `TemplateData` and `TemplateParameter` models for type-safe data handling * motionlib: update `MotionVideoProducer` to support dynamic audio addition and gravity-based positioning * templates: update documentation with complex DSL and JSON template examples * templates: add unit and instrumentation tests for DSL structure and serialization logic --- .idea/gradle.xml | 1 + .../filamentrenderer/Filament3dView.kt | 2 +- .../openglrenderer/MotionOpenGlView.kt | 2 +- .../presentation/SampleMotionVideo.kt | 8 +- .../motionlib/core/MotionTextSizeProvider.kt | 27 +- .../motionlib/core/MotionTransition.kt | 18 + .../core/MotionTextSizeProviderTest.kt | 48 +++ .../ffmpeg/video/FFMpegVideoFrameView.kt | 2 +- modules/lyrics-maker/build.gradle | 2 + .../presentation/compose/AppNavHost.kt | 33 +- .../compose/LyricsTemplateSelector.kt | 185 ++++++++++ .../compose/ProjectDetailsCompose.kt | 37 +- .../motion/MultiLyricsVideoProducer.kt | 161 +++++---- .../templates/AccentLyricsTemplate.kt | 103 ++++++ .../templates/GlitchLyricsTemplate.kt | 89 +++++ .../templates/GradientLyricsTemplate.kt | 105 ++++++ .../templates/LyricsTemplateExtensions.kt | 19 + .../templates/LyricsTemplateRegistry.kt | 20 ++ .../templates/PopupLyricsTemplate.kt | 91 +++++ .../templates/RainbowLyricsTemplate.kt | 74 ++++ .../templates/TypewriterLyricsTemplate.kt | 90 +++++ .../templates/VibrateLyricsTemplate.kt | 88 +++++ .../templates/WordwriterLyricsTemplate.kt | 90 +++++ .../templates/ZoomLyricsTemplate.kt | 102 ++++++ .../presentation/view/LyricsContainer.kt | 5 +- .../presentation/view/MultiLyricsContainer.kt | 25 +- .../presentation/view/SongNameTextView.kt | 5 + modules/motion-video-player/.gitignore | 1 + modules/motion-video-player/build.gradle | 44 +++ .../motion-video-player/consumer-rules.pro | 0 .../motion-video-player/proguard-rules.pro | 21 ++ .../custom/video/MotionVideoPlayerCompose.kt | 208 +++++++++++ modules/motionlib/build.gradle | 8 +- .../core/motion/BaseContourMotionView.kt | 2 +- .../core/motion/BaseMotionTransition.kt | 33 ++ .../core/motion/IMotionVideoProducer.kt | 3 + .../core/motion/MotionVideoProducer.kt | 59 +++- .../core/motion/transitions/BlurTransition.kt | 29 ++ .../motion/transitions/CrossFadeTransition.kt | 20 ++ .../motion/transitions/SlideTransition.kt | 47 +++ .../ui/custom/audio/BaseAudioWaveformView.kt | 4 +- .../custom/audio/CircularAudioWaveformView.kt | 4 +- .../custom/audio/RadialAudioWaveformView.kt | 4 +- .../custom/image/CircularMotionImageView.kt | 14 +- .../ui/custom/image/MotionImageView.kt | 14 +- .../custom/text/AccentMiddlePopUpTextView.kt | 181 ++++++++++ .../motionlib/ui/custom/text/PopUpTextView.kt | 24 +- .../ui/custom/text/RainbowPopUpTextView.kt | 191 ++++++++++ .../ui/custom/text/TransparentTextView.kt | 5 + .../ui/custom/text/TypeWriterTextView.kt | 5 + .../ui/custom/text/WordBlinkTextView.kt | 5 + .../ui/custom/text/WordWriterTextView.kt | 19 + .../text/abstract/AbstractMotionTextView.kt | 19 + .../motionlib/ui/effects/BlurEffect.kt | 53 +++ .../motionlib/ui/effects/FadeInEffect.kt | 41 +++ .../motionlib/ui/effects/FadeOutEffect.kt | 41 +++ .../motionlib/ui/effects/GlitchEffect.kt | 44 +++ .../ui/effects/SlideBottomToTopEffect.kt | 41 +++ .../motionlib/ui/effects/SlideEffect.kt | 52 +++ .../ui/effects/SlideLeftToRightEffect.kt | 41 +++ .../ui/effects/SlideTopToBottomEffect.kt | 41 +++ .../motionlib/ui/effects/VibrateEffect.kt | 30 ++ .../motionlib/ui/effects/ZoomInEffect.kt | 37 ++ .../motionlib/ui/effects/ZoomOutEffect.kt | 37 ++ .../motionlib/utils/ImageUtil.kt | 47 +++ .../core/motion/MotionTransitionTest.kt | 65 ++++ .../motion/sdui/infra/MotionSdui.kt | 32 ++ .../sdui/infra/MotionSduiInitializer.kt | 327 ++++++++++++++++++ .../sdui/infra/MotionTransitionParser.kt | 28 ++ .../infra/SDUIMotionVideoProducerFactory.kt | 38 +- .../sdui/MotionEffectRegistrationTest.kt | 149 ++++++++ .../sdui/infra/MotionTransitionParserTest.kt | 57 +++ modules/templates/README.md | 309 +++++++++++++---- modules/templates/build.gradle | 4 +- .../MotionTemplateInstrumentationTest.kt | 101 ++++++ .../motionlib/templates/MotionTemplate.kt | 11 - .../templates/MotionTemplateApplier.kt | 97 ------ .../templates/MotionTemplateViewGenerator.kt | 23 -- .../templates/dsl/MotionTemplateDSL.kt | 162 +++++++++ .../templates/extensions/AudioExtensions.kt | 31 ++ .../extensions/BackgroundExtensions.kt | 20 ++ .../extensions/ContainerExtensions.kt | 20 ++ .../templates/extensions/ImageExtensions.kt | 32 ++ .../templates/extensions/TextExtensions.kt | 130 +++++++ .../templates/extensions/VideoExtensions.kt | 32 ++ .../templates/json/JsonMotionTemplate.kt | 38 ++ .../templates/model/MotionTemplate.kt | 14 + .../motionlib/templates/model/TemplateData.kt | 11 + .../templates/model/TemplateParameter.kt | 12 + .../serialization/TemplateSerialization.kt | 140 ++++++++ .../templates/MotionTemplateApplierTest.kt | 69 ---- .../motionlib/templates/MotionTemplateTest.kt | 116 +++++++ .../templates/TemplateSerializationTest.kt | 108 ++++++ settings.gradle | 1 + skills/create_new_motion_view/skill.md | 90 +++++ web/web-sdui/src/App.tsx | 19 +- web/web-sdui/src/components/MotionCanvas.tsx | 2 +- web/web-sdui/src/effects/useApplyEffects.ts | 85 ++++- web/web-sdui/src/views/AudioWaveformView.tsx | 6 +- web/web-sdui/src/views/GradientView.tsx | 19 +- web/web-sdui/src/views/MotionImageView.tsx | 39 +++ .../src/views/MultiLyricsContainer.tsx | 6 +- web/web-sdui/src/views/PopUpTextView.tsx | 8 +- .../src/views/TransparentTextView.tsx | 7 +- web/web-sdui/src/views/VideoFrameView.tsx | 36 +- web/web-sdui/src/views/ViewRegistry.tsx | 13 +- web/web-sdui/src/views/WordBlinkTextView.tsx | 49 +++ web/web-sdui/src/views/WordWriterTextView.tsx | 7 +- web/web-sdui/tsconfig.app.json | 4 +- 109 files changed, 4956 insertions(+), 512 deletions(-) create mode 100644 modules/core/src/main/java/com/tejpratapsingh/motionlib/core/MotionTransition.kt create mode 100644 modules/core/src/test/java/com/tejpratapsingh/motionlib/core/MotionTextSizeProviderTest.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/compose/LyricsTemplateSelector.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/AccentLyricsTemplate.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/GlitchLyricsTemplate.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/GradientLyricsTemplate.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/LyricsTemplateExtensions.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/LyricsTemplateRegistry.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/PopupLyricsTemplate.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/RainbowLyricsTemplate.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/TypewriterLyricsTemplate.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/VibrateLyricsTemplate.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/WordwriterLyricsTemplate.kt create mode 100644 modules/lyrics-maker/src/main/java/com/tejpratapsingh/lyricsmaker/presentation/templates/ZoomLyricsTemplate.kt create mode 100644 modules/motion-video-player/.gitignore create mode 100644 modules/motion-video-player/build.gradle create mode 100644 modules/motion-video-player/consumer-rules.pro create mode 100644 modules/motion-video-player/proguard-rules.pro create mode 100644 modules/motion-video-player/src/main/java/com/tejpratapsingh/motionlib/ui/custom/video/MotionVideoPlayerCompose.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/core/motion/BaseMotionTransition.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/core/motion/transitions/BlurTransition.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/core/motion/transitions/CrossFadeTransition.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/core/motion/transitions/SlideTransition.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/custom/text/AccentMiddlePopUpTextView.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/custom/text/RainbowPopUpTextView.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/BlurEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/FadeInEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/FadeOutEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/GlitchEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/SlideBottomToTopEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/SlideEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/SlideLeftToRightEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/SlideTopToBottomEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/VibrateEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/ZoomInEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/ui/effects/ZoomOutEffect.kt create mode 100644 modules/motionlib/src/main/java/com/tejpratapsingh/motionlib/utils/ImageUtil.kt create mode 100644 modules/motionlib/src/test/java/com/tejpratapsingh/motionlib/core/motion/MotionTransitionTest.kt create mode 100644 modules/sdui/src/main/java/com/tejpratapsingh/motion/sdui/infra/MotionTransitionParser.kt create mode 100644 modules/sdui/src/test/java/com/tejpratapsingh/motion/sdui/MotionEffectRegistrationTest.kt create mode 100644 modules/sdui/src/test/java/com/tejpratapsingh/motion/sdui/infra/MotionTransitionParserTest.kt create mode 100644 modules/templates/src/androidTest/java/com/tejpratapsingh/motionlib/templates/MotionTemplateInstrumentationTest.kt delete mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplate.kt delete mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplier.kt delete mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/MotionTemplateViewGenerator.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/dsl/MotionTemplateDSL.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/extensions/AudioExtensions.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/extensions/BackgroundExtensions.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/extensions/ContainerExtensions.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/extensions/ImageExtensions.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/extensions/TextExtensions.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/extensions/VideoExtensions.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/json/JsonMotionTemplate.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/model/MotionTemplate.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/model/TemplateData.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/model/TemplateParameter.kt create mode 100644 modules/templates/src/main/java/com/tejpratapsingh/motionlib/templates/serialization/TemplateSerialization.kt delete mode 100644 modules/templates/src/test/java/com/tejpratapsingh/motionlib/templates/MotionTemplateApplierTest.kt create mode 100644 modules/templates/src/test/java/com/tejpratapsingh/motionlib/templates/MotionTemplateTest.kt create mode 100644 modules/templates/src/test/java/com/tejpratapsingh/motionlib/templates/TemplateSerializationTest.kt create mode 100644 skills/create_new_motion_view/skill.md create mode 100644 web/web-sdui/src/views/MotionImageView.tsx create mode 100644 web/web-sdui/src/views/WordBlinkTextView.tsx diff --git a/.idea/gradle.xml b/.idea/gradle.xml index fc2b1fc0..58334ccd 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -22,6 +22,7 @@