Skip to content

Commit a1184f1

Browse files
committed
Merge remote-tracking branch 'origin/main' into introduce_blend
2 parents ca7b7e5 + eb32f37 commit a1184f1

File tree

12 files changed

+78
-52
lines changed

12 files changed

+78
-52
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
branches:
77
- main
8+
- v0.11
9+
- v0.9
810

911
jobs:
1012
mix_test:

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44

55
This version moves all Form helpers to a [separate library](https://github.com/surface-ui/surface_form). Form Helpers are no longer used in new apps from Surface v0.12. Older applications who wish to maintain compatibility, add `{:surface_form, "~> 0.1.0"}` to your `mix.exs`.
66

7+
## v0.11.4 (2024-04-09)
8+
9+
* Add support for Liveview `~> 0.20.10` (#743)
10+
11+
## v0.11.3 (yyyy-mm-dd)
12+
13+
* Restrict phoenix_live_view version up to `0.20.9` due to compatibility
14+
issues introduced by phoenix_live_view `0.20.10` regarding debug annotations.
15+
16+
### Soft Deprecations
17+
18+
* `Link` has been deprecated in favor of liveview's built-in `<.link>`.
19+
See <https://hexdocs.pm/phoenix_live_view/live-navigation.html> for more info.
20+
721
## v0.11.2 (2024-02-19)
822

923
* Add support for Liveview >= `v0.20` (#714)
@@ -49,6 +63,14 @@ This version moves all Form helpers to a [separate library](https://github.com/s
4963
* Collect and generate `@import` entries from components to the top of the file to adhere to the CSS spec
5064
* Fix CSS scope so it can be shared by all function components in the same module, avoiding unnecessary use of `:deep`
5165

66+
## v0.9.5 (2024-04-09)
67+
68+
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.
69+
70+
* Compatibility with `phoenix_live_view ~> 0.18.18`
71+
* Compatibility with `phoenix ~> 1.6.16`
72+
* Compatibility with `phoenix_html ~> 3.3.1`
73+
5274
## v0.9.4 (2023-02-15)
5375

5476
* Update `phoenix_live_view` to `v0.18.14`

lib/surface.ex

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ defmodule Surface do
109109
indentation = meta[:indentation] || 0
110110
column = meta[:column] || 1
111111

112-
debug_annotations? = Module.get_attribute(__CALLER__.module, :__debug_annotations__)
113112
component_type = Module.get_attribute(__CALLER__.module, :component_type)
114113

115114
string
@@ -123,7 +122,7 @@ defmodule Surface do
123122
file: __CALLER__.file,
124123
line: line,
125124
caller: __CALLER__,
126-
annotate_content: debug_annotations? && (&Phoenix.LiveView.HTMLEngine.annotate_tagged_content/1)
125+
annotate_content: annotate_content()
127126
)
128127
end
129128

@@ -174,19 +173,12 @@ defmodule Surface do
174173

175174
@doc false
176175
def __compile_sface__(name, file, env) do
177-
debug_annotations? =
178-
Module.get_attribute(
179-
env.module,
180-
:__debug_annotations__,
181-
Application.get_env(:phoenix_live_view, :debug_heex_annotations, false)
182-
)
183-
184176
file
185177
|> File.read!()
186178
|> Surface.Compiler.compile(1, env, file)
187179
|> Surface.Compiler.to_live_struct(
188180
caller: %Macro.Env{env | file: file, line: 1, function: {String.to_atom(name), 1}},
189-
annotate_content: debug_annotations? && (&Phoenix.LiveView.HTMLEngine.annotate_tagged_content/1)
181+
annotate_content: annotate_content()
190182
)
191183
end
192184

@@ -504,4 +496,10 @@ defmodule Surface do
504496
{root_prop.name, value}
505497
end
506498
end
499+
500+
defp annotate_content do
501+
Code.ensure_loaded?(Phoenix.LiveView.HTMLEngine) &&
502+
function_exported?(Phoenix.LiveView.HTMLEngine, :annotate_body, 1) &&
503+
(&Phoenix.LiveView.HTMLEngine.annotate_body/1)
504+
end
507505
end

lib/surface/compiler/eex_engine.ex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ defmodule Surface.Compiler.EExEngine do
4444
end
4545

4646
defp maybe_annotate_content(nodes, annotate_content, caller) do
47-
if annotate_content do
48-
{before_comment, after_comment} = annotate_content.(caller)
49-
[%AST.Literal{value: before_comment}] ++ nodes ++ [%AST.Literal{value: after_comment}]
50-
else
51-
nodes
47+
case annotate_content && annotate_content.(caller) do
48+
{before_comment, after_comment} ->
49+
[%AST.Literal{value: before_comment}] ++ nodes ++ [%AST.Literal{value: after_comment}]
50+
51+
_ ->
52+
nodes
5253
end
5354
end
5455

lib/surface/components/link.ex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
defmodule Surface.Components.Link do
22
@moduledoc """
3+
> #### Soft deprecation warning {: .warning}
4+
>
5+
> This component has been deprecated in favor of liveview's built-in `<.link>`
6+
> and will be removed in `v0.13`. See https://hexdocs.pm/phoenix_live_view/live-navigation.html for
7+
> more info usage.
8+
39
Generates a link to the given URL.
410
511
Provides similar capabilities to Phoenix's built-in `link/2` function.
@@ -26,6 +32,8 @@ defmodule Surface.Components.Link do
2632
```
2733
"""
2834

35+
@moduledoc deprecated: "Use liveview's built-in `<.link>` instead"
36+
2937
use Surface.Component
3038
use Surface.Components.Events
3139

lib/surface/renderer.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ defmodule Surface.Renderer do
1515
|> Map.put(:function, {:render, 1})
1616
|> Map.put(:file, template)
1717

18-
debug_annotations? = Module.get_attribute(__CALLER__.module, :__debug_annotations__)
19-
2018
template
2119
|> File.read!()
2220
|> Surface.Compiler.compile(1, env, template)
2321
|> Surface.Compiler.to_live_struct(
2422
caller: env,
25-
annotate_content: debug_annotations? && (&Phoenix.LiveView.HTMLEngine.annotate_tagged_content/1)
23+
annotate_content:
24+
Code.ensure_loaded?(Phoenix.LiveView.HTMLEngine) &&
25+
function_exported?(Phoenix.LiveView.HTMLEngine, :annotate_body, 1) &&
26+
(&Phoenix.LiveView.HTMLEngine.annotate_body/1)
2627
)
2728
else
2829
nil

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Surface.MixProject do
22
use Mix.Project
33

4-
@version "0.11.2"
4+
@version "0.11.4"
55

66
def project do
77
[
@@ -33,7 +33,7 @@ defmodule Surface.MixProject do
3333

3434
defp deps do
3535
[
36-
{:phoenix_live_view, "~> 0.19.0 or ~> 0.20.0"},
36+
{:phoenix_live_view, "~> 0.19.0 or ~> 0.20.10"},
3737
{:sourceror, "~> 1.0.0"},
3838
{:blend, "~> 0.3.0", only: :dev},
3939
{:jason, "~> 1.0", only: :test},

mix.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
%{
22
"blend": {:hex, :blend, "0.3.0", "ba12054cd0d9e4235285e72017f04c3678058c7d293212e699d17f59e52340de", [:mix], [], "hexpm", "0a4b17a1acfe5d6dad7df8173b7ba89c92f3f3e02416dd3321b85262117ebfd8"},
3-
"castore": {:hex, :castore, "1.0.5", "9eeebb394cc9a0f3ae56b813459f990abb0a3dedee1be6b27fdb50301930502f", [:mix], [], "hexpm", "8d7c597c3e4a64c395980882d4bca3cebb8d74197c590dc272cfd3b6a6310578"},
3+
"castore": {:hex, :castore, "1.0.6", "ffc42f110ebfdafab0ea159cd43d31365fa0af0ce4a02ecebf1707ae619ee727", [:mix], [], "hexpm", "374c6e7ca752296be3d6780a6d5b922854ffcc74123da90f2f328996b962d33a"},
44
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
5-
"ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"},
6-
"floki": {:hex, :floki, "0.35.4", "cc947b446024732c07274ac656600c5c4dc014caa1f8fb2dfff93d275b83890d", [:mix], [], "hexpm", "27fa185d3469bd8fc5947ef0f8d5c4e47f0af02eb6b070b63c868f69e3af0204"},
5+
"ex_doc": {:hex, :ex_doc, "0.31.2", "8b06d0a5ac69e1a54df35519c951f1f44a7b7ca9a5bb7a260cd8a174d6322ece", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "317346c14febaba9ca40fd97b5b5919f7751fb85d399cc8e7e8872049f37e0af"},
6+
"floki": {:hex, :floki, "0.36.1", "712b7f2ba19a4d5a47dfe3e74d81876c95bbcbee44fe551f0af3d2a388abb3da", [:mix], [], "hexpm", "21ba57abb8204bcc70c439b423fc0dd9f0286de67dc82773a14b0200ada0995f"},
77
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
88
"makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"},
9-
"makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},
10-
"makeup_erlang": {:hex, :makeup_erlang, "0.1.4", "29563475afa9b8a2add1b7a9c8fb68d06ca7737648f28398e04461f008b69521", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f4ed47ecda66de70dd817698a703f8816daa91272e7e45812469498614ae8b29"},
9+
"makeup_elixir": {:hex, :makeup_elixir, "0.16.2", "627e84b8e8bf22e60a2579dad15067c755531fea049ae26ef1020cad58fe9578", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "41193978704763f6bbe6cc2758b84909e62984c7752b3784bd3c218bb341706b"},
10+
"makeup_erlang": {:hex, :makeup_erlang, "0.1.5", "e0ff5a7c708dda34311f7522a8758e23bfcd7d8d8068dc312b5eb41c6fd76eba", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "94d2e986428585a21516d7d7149781480013c56e30c6a233534bedf38867a59a"},
1111
"mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"},
1212
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
1313
"phoenix": {:hex, :phoenix, "1.7.11", "1d88fc6b05ab0c735b250932c4e6e33bfa1c186f76dcf623d8dd52f07d6379c7", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.7", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "b1ec57f2e40316b306708fe59b92a16b9f6f4bf50ccfa41aa8c7feb79e0ec02a"},
14-
"phoenix_html": {:hex, :phoenix_html, "4.0.0", "4857ec2edaccd0934a923c2b0ba526c44a173c86b847e8db725172e9e51d11d6", [:mix], [], "hexpm", "cee794a052f243291d92fa3ccabcb4c29bb8d236f655fb03bcbdc3a8214b8d13"},
15-
"phoenix_live_view": {:hex, :phoenix_live_view, "0.20.9", "46d5d436d3f8ff97f066b6c45528fd842a711fd3875b2d3f706b2e769ea07c51", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "694388615ece21b70c523910cba1c633132b08a270caaf60100dd4eaf331885d"},
14+
"phoenix_html": {:hex, :phoenix_html, "4.1.1", "4c064fd3873d12ebb1388425a8f2a19348cef56e7289e1998e2d2fa758aa982e", [:mix], [], "hexpm", "f2f2df5a72bc9a2f510b21497fd7d2b86d932ec0598f0210fed4114adc546c6f"},
15+
"phoenix_live_view": {:hex, :phoenix_live_view, "0.20.14", "70fa101aa0539e81bed4238777498f6215e9dda3461bdaa067cad6908110c364", [:mix], [{:floki, "~> 0.36", [hex: :floki, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "82f6d006c5264f979ed5eb75593d808bbe39020f20df2e78426f4f2d570e2402"},
1616
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
1717
"phoenix_template": {:hex, :phoenix_template, "1.0.4", "e2092c132f3b5e5b2d49c96695342eb36d0ed514c5b252a77048d5969330d639", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "2c0c81f0e5c6753faf5cca2f229c9709919aba34fab866d3bc05060c9c444206"},
1818
"plug": {:hex, :plug, "1.15.3", "712976f504418f6dff0a3e554c40d705a9bcf89a7ccef92fc6a5ef8f16a30a97", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cc4365a3c010a56af402e0809208873d113e9c38c401cabd88027ef4f5c01fd2"},
1919
"plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"},
20-
"sourceror": {:hex, :sourceror, "1.0.1", "ec2c41726d181adce888ac94b3f33b359a811b46e019c084509e02c70042e424", [:mix], [], "hexpm", "28225464ffd68bda1843c974f3ff7ccef35e29be09a65dfe8e3df3f7e3600c57"},
20+
"sourceror": {:hex, :sourceror, "1.0.2", "c5e86fdc14881f797749d1fe5df017ca66727a8146e7ee3e736605a3df78f3e6", [:mix], [], "hexpm", "832335e87d0913658f129d58b2a7dc0490ddd4487b02de6d85bca0169ec2bd79"},
2121
"telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"},
2222
"websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},
23-
"websock_adapter": {:hex, :websock_adapter, "0.5.5", "9dfeee8269b27e958a65b3e235b7e447769f66b5b5925385f5a569269164a210", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "4b977ba4a01918acbf77045ff88de7f6972c2a009213c515a445c48f224ffce9"},
23+
"websock_adapter": {:hex, :websock_adapter, "0.5.6", "0437fe56e093fd4ac422de33bf8fc89f7bc1416a3f2d732d8b2c8fd54792fe60", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "e04378d26b0af627817ae84c92083b7e97aca3121196679b73c73b99d0d133ea"},
2424
}

test/support/debug_annotations.ex renamed to test/support/debug_annotations.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
# Note this file is intentionally a .exs file because it is loaded
2+
# in the test helper with phoenix_live_view debug_heex_annotations turned on.
13
defmodule Surface.CompilerTest.DebugAnnotations do
2-
import Surface.CompilerTest.DebugAnnotationsUtil
3-
4-
use_component()
4+
use Surface.Component
55

66
def func_with_tag(assigns) do
77
~F[<div>func_with_tag</div>]

test/support/debug_annotations_util.ex

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,4 @@ defmodule Surface.CompilerTest.DebugAnnotationsUtil do
55
|> Version.parse!()
66
|> Version.compare("0.20.0") != :lt
77
end
8-
9-
defmacro use_component() do
10-
if __MODULE__.debug_heex_annotations_supported?() do
11-
quote do
12-
use Surface.Component, debug_heex_annotations: true
13-
end
14-
else
15-
quote do
16-
use Surface.Component
17-
end
18-
end
19-
end
208
end

0 commit comments

Comments
 (0)