From 03eacd24981b11ec816299d71d89ccf9ea364051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Thu, 21 Sep 2023 19:05:43 +0700 Subject: [PATCH] Use new export API to avoid deprecation warnings with latest kino --- lib/kino/maplibre.ex | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/kino/maplibre.ex b/lib/kino/maplibre.ex index 7e078c3..7135d88 100644 --- a/lib/kino/maplibre.ex +++ b/lib/kino/maplibre.ex @@ -53,12 +53,22 @@ defmodule Kino.MapLibre do @doc false def static(%__MODULE__{} = ml) do data = %{spec: ml.spec, events: ml.events} - Kino.JS.new(__MODULE__, data, export_info_string: "maplibre") + + Kino.JS.new(__MODULE__, data, + export: fn data -> {"maplibre", data} end, + # TODO: remove legacy export attribute once we require Kino v0.11.0 + export_info_string: "maplibre" + ) end def static(%MapLibre{} = ml) do data = %{spec: ml.spec, events: %{}} - Kino.JS.new(__MODULE__, data, export_info_string: "maplibre") + + Kino.JS.new(__MODULE__, data, + export: fn data -> {"maplibre", data} end, + # TODO: remove legacy export attribute once we require Kino v0.11.0 + export_info_string: "maplibre" + ) end @doc """