From 67b542f9e9890340f639b6c118a6ffe944214637 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Wed, 11 Feb 2026 15:33:56 -0300 Subject: [PATCH 1/6] build: remove vaadin prerelease and snapshot repositories --- pom.xml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/pom.xml b/pom.xml index 2def57d..aff5be0 100644 --- a/pom.xml +++ b/pom.xml @@ -75,33 +75,8 @@ Vaadin Directory https://maven.vaadin.com/vaadin-addons - - - Vaadin prereleases - https://maven.vaadin.com/vaadin-prereleases - - - - central - https://repo.maven.apache.org/maven2 - - false - - - - - Vaadin prereleases - https://maven.vaadin.com/vaadin-prereleases - - - vaadin-snapshots - https://oss.sonatype.org/content/repositories/vaadin-snapshots/ - false - - - com.vaadin From 26d3dcf1be3cdfcaed0e8d1a767287a963aa44ab Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Wed, 11 Feb 2026 16:50:35 -0300 Subject: [PATCH 2/6] build(demo): upgrade commons-demo to 5.2.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aff5be0..c22d733 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ UTF-8 ${project.basedir}/drivers 11.0.26 - 4.1.0 + 5.2.0 true From c6fa788c31aafe7bd4696bb2924e3440fa904a31 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:50:32 -0300 Subject: [PATCH 3/6] ci: add Vaadin 25 profile --- pom.xml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c22d733..eaece6e 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,7 @@ 11.0.26 5.2.0 true + 2.8.26 @@ -104,7 +105,7 @@ in.virit viritin - 2.8.26 + ${viritin.version} test @@ -497,6 +498,23 @@ + + + v25 + + 21 + 21 + 25.0.3 + 3.1.3 + + + + com.vaadin + vaadin-dev + true + + + From b73b35ca07cdebe73ef3cae9d41a365a9b5ea75b Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Wed, 11 Feb 2026 15:40:42 -0300 Subject: [PATCH 4/6] chore(demo): add aura styles --- .../frontend/styles/lite-template-demo-styles.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/resources/META-INF/frontend/styles/lite-template-demo-styles.css b/src/test/resources/META-INF/frontend/styles/lite-template-demo-styles.css index d7725ba..fe128c5 100644 --- a/src/test/resources/META-INF/frontend/styles/lite-template-demo-styles.css +++ b/src/test/resources/META-INF/frontend/styles/lite-template-demo-styles.css @@ -2,7 +2,7 @@ * #%L * Lite Renderer Add-On * %% - * Copyright (C) 2024 Flowing Code + * Copyright (C) 2024 - 2026 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,12 @@ } .lite-renderer-demo-template img { - height: var(--lumo-size-m); - margin-right: var(--lumo-space-s); + height: var(--lumo-size-m, 36px); + margin-right: var(--lumo-space-s, var(--vaadin-padding-s)); aspect-ratio: 1; } .lite-renderer-demo-template div div { - font-size: var(--lumo-font-size-s); - color: var(--lumo-secondary-text-color); + font-size: var(--lumo-font-size-s, var(--aura-font-size-s)); + color: var(--lumo-secondary-text-color, var(--vaadin-text-color-secondary)); } \ No newline at end of file From b34ba0252d3d01d43e02d58b075adb0f382f0652 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:30:44 -0300 Subject: [PATCH 5/6] build: set version to 0.1.0-SNAPSHOT --- pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eaece6e..e655698 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.flowingcode.vaadin.addons lite-renderer-addon - 0.0.2-SNAPSHOT + 0.1.0-SNAPSHOT Lite Renderer Add-On Lite Template Renderer for Vaadin Flow https://www.flowingcode.com/en/open-source/ @@ -90,6 +90,11 @@ 1.18.34 provided + + com.flowingcode.vaadin + json-migration-helper + 0.9.2 + com.flowingcode.vaadin.addons.demo commons-demo From 66d594056333f8cc51585f9dbdea54ab9962a03c Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Thu, 12 Feb 2026 13:31:43 -0300 Subject: [PATCH 6/6] feat: add compatibility with Vaadin 25 Close #4 --- .../litetemplate/LitRendererBuilder.java | 35 +++++++++++++++++-- .../addons/litetemplate/LiteComponent.java | 5 ++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/flowingcode/vaadin/addons/litetemplate/LitRendererBuilder.java b/src/main/java/com/flowingcode/vaadin/addons/litetemplate/LitRendererBuilder.java index d109e32..927b691 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/litetemplate/LitRendererBuilder.java +++ b/src/main/java/com/flowingcode/vaadin/addons/litetemplate/LitRendererBuilder.java @@ -2,7 +2,7 @@ * #%L * Lite Renderer Add-On * %% - * Copyright (C) 2024 Flowing Code + * Copyright (C) 2024 - 2026 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ */ package com.flowingcode.vaadin.addons.litetemplate; +import com.flowingcode.vaadin.jsonmigration.JsonMigration; import com.vaadin.flow.component.ClickEvent; import com.vaadin.flow.component.Component; import com.vaadin.flow.component.button.Button; @@ -26,16 +27,21 @@ import com.vaadin.flow.dom.Element; import com.vaadin.flow.function.SerializableBiConsumer; import com.vaadin.flow.function.ValueProvider; +import com.vaadin.flow.server.Version; import elemental.json.JsonArray; import elemental.json.JsonBoolean; import elemental.json.JsonNumber; import elemental.json.JsonString; import elemental.json.JsonValue; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Consumer; import lombok.NonNull; +import lombok.SneakyThrows; final class LitRendererBuilder { @@ -86,13 +92,38 @@ private LitRenderer build( String templateExpression = sb.toString() + "\n"; var renderer = LitRenderer.of(templateExpression); - functions.forEach((n, v) -> renderer.withFunction(n, v)); + functions.forEach((n, v) -> withFunction(renderer, n, v)); properties.forEach((n, v) -> renderer.withProperty(n, v)); setTemplateExpression.accept(templateExpression); return renderer; } + @SneakyThrows + private LitRenderer withFunction(LitRenderer renderer, String name, + SerializableBiConsumer handler) { + SerializableBiConsumer c = handler; + if (Version.getMajorVersion() >= 25) { + c = (source, array) -> handler.accept(source, + (JsonArray) JsonMigration.convertToJsonValue(array)); + } + return (LitRenderer) LitRenderer_withFunction.invokeExact(renderer, name, c); + } + + private static final MethodHandle LitRenderer_withFunction = lookup_withFunction(); + + @SneakyThrows + private static MethodHandle lookup_withFunction() { + MethodHandles.Lookup lookup = MethodHandles.lookup(); + MethodType methodType = MethodType.methodType( + LitRenderer.class, + String.class, + SerializableBiConsumer.class + ); + + return lookup.findVirtual(LitRenderer.class, "withFunction", methodType); + } + private String addFunction(SerializableBiConsumer handler) { String name = "function" + functions.size(); functions.put(name, handler); diff --git a/src/main/java/com/flowingcode/vaadin/addons/litetemplate/LiteComponent.java b/src/main/java/com/flowingcode/vaadin/addons/litetemplate/LiteComponent.java index ce3ea39..5297ac9 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/litetemplate/LiteComponent.java +++ b/src/main/java/com/flowingcode/vaadin/addons/litetemplate/LiteComponent.java @@ -2,7 +2,7 @@ * #%L * Lite Renderer Add-On * %% - * Copyright (C) 2024 Flowing Code + * Copyright (C) 2024 - 2026 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ */ package com.flowingcode.vaadin.addons.litetemplate; +import com.flowingcode.vaadin.jsonmigration.JsonMigration; import com.vaadin.flow.component.Component; import com.vaadin.flow.component.ComponentEventBus; import com.vaadin.flow.dom.Element; @@ -31,6 +32,7 @@ import java.util.List; import java.util.Map; import lombok.NonNull; +import lombok.experimental.ExtensionMethod; /** * Wrapper around a {@code Component} that provides fluent methods for managing attributes, @@ -40,6 +42,7 @@ * @author Javier Godoy */ @SuppressWarnings("serial") +@ExtensionMethod(value = JsonMigration.class, suppressBaseMethods = true) public final class LiteComponent extends Component { // The wrapped component that is being managed.