Packages
surface
0.9.5
0.12.3
0.12.2
0.12.1
0.12.0
0.11.5
0.11.4
0.11.3
0.11.2
0.11.1
0.11.0
0.10.0
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.6
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.1
0.6.0
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.3.2
0.3.1
0.3.0
0.2.1
0.2.0
0.1.1
0.1.0
0.1.0-alpha.2
0.1.0-alpha.1
0.1.0-alpha.0
A component based library for Phoenix LiveView
Current section
46 Versions
Jump to
Current section
46 Versions
Compare versions
8
files changed
+71
additions
-53
deletions
| @@ -1,5 +1,13 @@ | |
| 1 1 | # Changelog |
| 2 2 | |
| 3 | + ## v0.9.5 (2024-04-09) |
| 4 | + |
| 5 | + Improves compatibility with minor dependency versions used by Surface v0.9, this will improve the upgrade (`mix deps.update --all`) of apps that depend on this version. |
| 6 | + |
| 7 | + * Compatibility with `phoenix_live_view ~> 0.18.18` |
| 8 | + * Compatibility with `phoenix ~> 1.6.16` |
| 9 | + * Compatibility with `phoenix_html ~> 3.3.1` |
| 10 | + |
| 3 11 | ## v0.9.4 (2023-02-15) |
| 4 12 | |
| 5 13 | * Update `phoenix_live_view` to `v0.18.14` |
| @@ -1,7 +1,36 @@ | |
| 1 | - {<<"app">>,<<"surface">>}. |
| 2 | - {<<"build_tools">>,[<<"mix">>]}. |
| 1 | + {<<"links">>,[{<<"GitHub">>,<<"https://github.com/surface-ui/surface">>}]}. |
| 2 | + {<<"name">>,<<"surface">>}. |
| 3 | + {<<"version">>,<<"0.9.5">>}. |
| 3 4 | {<<"description">>,<<"A component based library for Phoenix LiveView">>}. |
| 4 | - {<<"elixir">>,<<"~> 1.12">>}. |
| 5 | + {<<"elixir">>,<<"~> 1.13">>}. |
| 6 | + {<<"app">>,<<"surface">>}. |
| 7 | + {<<"licenses">>,[<<"MIT">>]}. |
| 8 | + {<<"requirements">>, |
| 9 | + [[{<<"name">>,<<"jason">>}, |
| 10 | + {<<"app">>,<<"jason">>}, |
| 11 | + {<<"optional">>,false}, |
| 12 | + {<<"requirement">>,<<"~> 1.0">>}, |
| 13 | + {<<"repository">>,<<"hexpm">>}], |
| 14 | + [{<<"name">>,<<"phoenix_live_view">>}, |
| 15 | + {<<"app">>,<<"phoenix_live_view">>}, |
| 16 | + {<<"optional">>,false}, |
| 17 | + {<<"requirement">>,<<"~> 0.18.18">>}, |
| 18 | + {<<"repository">>,<<"hexpm">>}], |
| 19 | + [{<<"name">>,<<"phoenix">>}, |
| 20 | + {<<"app">>,<<"phoenix">>}, |
| 21 | + {<<"optional">>,false}, |
| 22 | + {<<"requirement">>,<<"~> 1.6.16">>}, |
| 23 | + {<<"repository">>,<<"hexpm">>}], |
| 24 | + [{<<"name">>,<<"phoenix_html">>}, |
| 25 | + {<<"app">>,<<"phoenix_html">>}, |
| 26 | + {<<"optional">>,false}, |
| 27 | + {<<"requirement">>,<<"~> 3.3.1">>}, |
| 28 | + {<<"repository">>,<<"hexpm">>}], |
| 29 | + [{<<"name">>,<<"sourceror">>}, |
| 30 | + {<<"app">>,<<"sourceror">>}, |
| 31 | + {<<"optional">>,false}, |
| 32 | + {<<"requirement">>,<<"~> 1.0.0">>}, |
| 33 | + {<<"repository">>,<<"hexpm">>}]]}. |
| 5 34 | {<<"files">>, |
| 6 35 | [<<"lib">>,<<"lib/surface">>,<<"lib/surface/renderer.ex">>, |
| 7 36 | <<"lib/surface/formatter.ex">>,<<"lib/surface/compiler.ex">>, |
| @@ -179,23 +208,4 @@ | |
| 179 208 | <<"priv/catalogue/surface/components/assets/bulma.min.css">>, |
| 180 209 | <<".formatter.exs">>,<<"mix.exs">>,<<"README.md">>,<<"LICENSE.md">>, |
| 181 210 | <<"CHANGELOG.md">>]}. |
| 182 | - {<<"licenses">>,[<<"MIT">>]}. |
| 183 | - {<<"links">>,[{<<"GitHub">>,<<"https://github.com/surface-ui/surface">>}]}. |
| 184 | - {<<"name">>,<<"surface">>}. |
| 185 | - {<<"requirements">>, |
| 186 | - [[{<<"app">>,<<"jason">>}, |
| 187 | - {<<"name">>,<<"jason">>}, |
| 188 | - {<<"optional">>,false}, |
| 189 | - {<<"repository">>,<<"hexpm">>}, |
| 190 | - {<<"requirement">>,<<"~> 1.0">>}], |
| 191 | - [{<<"app">>,<<"phoenix_live_view">>}, |
| 192 | - {<<"name">>,<<"phoenix_live_view">>}, |
| 193 | - {<<"optional">>,false}, |
| 194 | - {<<"repository">>,<<"hexpm">>}, |
| 195 | - {<<"requirement">>,<<"~> 0.18.14">>}], |
| 196 | - [{<<"app">>,<<"sourceror">>}, |
| 197 | - {<<"name">>,<<"sourceror">>}, |
| 198 | - {<<"optional">>,false}, |
| 199 | - {<<"repository">>,<<"hexpm">>}, |
| 200 | - {<<"requirement">>,<<"~> 0.11">>}]]}. |
| 201 | - {<<"version">>,<<"0.9.4">>}. |
| 211 | + {<<"build_tools">>,[<<"mix">>]}. |
| @@ -334,7 +334,7 @@ defmodule Mix.Tasks.Surface.Init.ExPatcher do | |
| 334 334 | |> Z.node() |
| 335 335 | |> Sourceror.to_string() |
| 336 336 | |
| 337 | - {{:., _, _}, _} -> |
| 337 | + %Sourceror.Zipper{node: {:., _, _}} -> |
| 338 338 | # We can't get the range of the dot call in a qualified call like |
| 339 339 | # `foo.bar()`, so we apply the patch to the parent. We get into this |
| 340 340 | # situation when the qualified call has no arguments: the first child |
| @@ -344,7 +344,7 @@ defmodule Mix.Tasks.Surface.Init.ExPatcher do | |
| 344 344 | # impossible to generate a patch for the child call alone. |
| 345 345 | append_child_patch(zipper, string) |
| 346 346 | |
| 347 | - last_child_zipper -> |
| 347 | + %Sourceror.Zipper{} = last_child_zipper -> |
| 348 348 | append_child_patch(last_child_zipper, string) |
| 349 349 | end |
| 350 350 | end) |
| @@ -41,10 +41,10 @@ defmodule Mix.Tasks.Surface.Init.ExPatcher.Move do | |
| 41 41 | def find_child(zipper, predicate) do |
| 42 42 | zipper |
| 43 43 | |> case do |
| 44 | - {{name, _, _}, _} when name != :__block__ -> |
| 44 | + %Sourceror.Zipper{node: {name, _, _}} when name != :__block__ -> |
| 45 45 | zipper |
| 46 46 | |
| 47 | - _ -> |
| 47 | + %Sourceror.Zipper{} -> |
| 48 48 | Z.down(zipper) |
| 49 49 | end |
| 50 50 | |> return_match_or_move_right(predicate) |
| @@ -210,10 +210,10 @@ defmodule Mix.Tasks.Surface.Init.ExPatcher.Move do | |
| 210 210 | |
| 211 211 | defp normalize_opts(zipper) do |
| 212 212 | case zipper do |
| 213 | - {[{{:__block__, _, _}, _} | _], _} -> |
| 213 | + %Sourceror.Zipper{node: [{{:__block__, _, _}, _} | _]} -> |
| 214 214 | zipper |
| 215 215 | |
| 216 | - _ -> |
| 216 | + %Sourceror.Zipper{} -> |
| 217 217 | Z.down(zipper) |
| 218 218 | end |
| 219 219 | end |
| @@ -51,7 +51,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 51 51 | ast = state.engine.handle_body(buffer, root: true) |
| 52 52 | |
| 53 53 | quote do |
| 54 | - require Phoenix.LiveView.HTMLEngine |
| 54 | + require Phoenix.LiveView.TagEngine |
| 55 55 | unquote(ast) |
| 56 56 | end |
| 57 57 | end |
| @@ -265,7 +265,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 265 265 | static_props_map = {:%{}, [], slot_props ++ static_props} |
| 266 266 | |
| 267 267 | quote do |
| 268 | - Phoenix.LiveView.HTMLEngine.component( |
| 268 | + Phoenix.LiveView.TagEngine.component( |
| 269 269 | &apply(unquote(module_expr), unquote(fun_expr), [&1]), |
| 270 270 | Map.merge( |
| 271 271 | Surface.build_dynamic_assigns( |
| @@ -296,7 +296,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 296 296 | static_props_map = {:%{}, [], slot_props ++ static_props} |
| 297 297 | |
| 298 298 | quote do |
| 299 | - Phoenix.LiveView.HTMLEngine.component( |
| 299 | + Phoenix.LiveView.TagEngine.component( |
| 300 300 | &(unquote(Macro.var(fun, __MODULE__)) / 1), |
| 301 301 | Map.merge( |
| 302 302 | Surface.build_assigns( |
| @@ -332,7 +332,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 332 332 | module_for_build_assigns = if fun == :render, do: module |
| 333 333 | |
| 334 334 | quote do |
| 335 | - Phoenix.LiveView.HTMLEngine.component( |
| 335 | + Phoenix.LiveView.TagEngine.component( |
| 336 336 | &(unquote(module).unquote(fun) / 1), |
| 337 337 | Map.merge( |
| 338 338 | Surface.build_assigns( |
| @@ -363,7 +363,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 363 363 | static_props_map = {:%{}, [], static_props ++ slot_props} |
| 364 364 | |
| 365 365 | quote do |
| 366 | - Phoenix.LiveView.HTMLEngine.component( |
| 366 | + Phoenix.LiveView.TagEngine.component( |
| 367 367 | &unquote(module).render/1, |
| 368 368 | Map.merge( |
| 369 369 | Surface.build_assigns( |
| @@ -394,7 +394,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 394 394 | static_props_map = {:%{}, [], slot_props ++ static_props} |
| 395 395 | |
| 396 396 | quote do |
| 397 | - Phoenix.LiveView.HTMLEngine.component( |
| 397 | + Phoenix.LiveView.TagEngine.component( |
| 398 398 | &unquote(module).render/1, |
| 399 399 | Map.merge( |
| 400 400 | Surface.build_assigns( |
| @@ -425,7 +425,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 425 425 | static_props_map = {:%{}, [], [{:module, module} | slot_props] ++ static_props} |
| 426 426 | |
| 427 427 | quote do |
| 428 | - Phoenix.LiveView.HTMLEngine.component( |
| 428 | + Phoenix.LiveView.TagEngine.component( |
| 429 429 | &Phoenix.Component.live_component/1, |
| 430 430 | Map.merge( |
| 431 431 | Surface.build_assigns( |
| @@ -460,7 +460,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 460 460 | static_props_map = {:%{}, [], [{:module, module_expr} | slot_props] ++ static_props} |
| 461 461 | |
| 462 462 | quote do |
| 463 | - Phoenix.LiveView.HTMLEngine.component( |
| 463 | + Phoenix.LiveView.TagEngine.component( |
| 464 464 | &Phoenix.Component.live_component/1, |
| 465 465 | Map.merge( |
| 466 466 | Surface.build_dynamic_assigns( |
| @@ -554,7 +554,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 554 554 | |
| 555 555 | inner_block = |
| 556 556 | quote do |
| 557 | - Phoenix.LiveView.HTMLEngine.inner_block(unquote(slot_name), do: unquote(block)) |
| 557 | + Phoenix.LiveView.TagEngine.inner_block(unquote(slot_name), do: unquote(block)) |
| 558 558 | end |
| 559 559 | |
| 560 560 | props = [__slot__: slot_name, inner_block: inner_block] ++ props |
| @@ -645,7 +645,7 @@ defmodule Surface.Compiler.EExEngine do | |
| 645 645 | |
| 646 646 | ast = |
| 647 647 | quote do |
| 648 | - Phoenix.LiveView.HTMLEngine.inner_block(unquote(name), do: unquote(block)) |
| 648 | + Phoenix.LiveView.TagEngine.inner_block(unquote(name), do: unquote(block)) |
| 649 649 | end |
| 650 650 | |
| 651 651 | props = [__slot__: name, inner_block: ast] ++ props |
Loading more files…