avo 4.0.0.beta.14 → 4.0.0.beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/builds/avo/application.css +30 -30
- data/app/assets/stylesheets/application.css +1 -1
- data/lib/avo/tailwind_variables_preparer.rb +79 -0
- data/lib/avo/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52bcb0361fb2cc8ceaf16690d1d42d6aa167de55e9292cc520eda4e64d5eb7d1
|
|
4
|
+
data.tar.gz: c604c302f9fe37599e2b4255a09e7b6b4c79860b28a9310f2cab3426ae080e31
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41190cda831e41b0db64f3ba3f7e2a2e293bcd5011baf0b9dc0acdf31780f3ca51ea95a9b96df0bc4422372ed7d4f1831c9f971842bdeac2f186f5839b14a834
|
|
7
|
+
data.tar.gz: 18aad86d56c8ead2656ba80e282500788e2ac82623d0b2c2c3a366f985b4e368034349eb03996206c3f3656a06f87aab8048dde2a33942d2f43c4e554fce0750
|
data/Gemfile.lock
CHANGED
|
@@ -4230,6 +4230,36 @@
|
|
|
4230
4230
|
opacity: 60%;
|
|
4231
4231
|
}
|
|
4232
4232
|
}
|
|
4233
|
+
.tippy-box[data-theme~='basic'] {
|
|
4234
|
+
border-radius: var(--radius-md);
|
|
4235
|
+
border-style: var(--tw-border-style);
|
|
4236
|
+
border-width: 1px;
|
|
4237
|
+
border-color: var(--color-neutral-200);
|
|
4238
|
+
background-color: var(--color-background);
|
|
4239
|
+
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04);
|
|
4240
|
+
}
|
|
4241
|
+
.tippy-box[data-theme~='basic'] .tippy-content {
|
|
4242
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
4243
|
+
padding-block: calc(var(--spacing) * 1);
|
|
4244
|
+
font-family: var(--font-sans);
|
|
4245
|
+
font-size: var(--text-sm);
|
|
4246
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
4247
|
+
--tw-leading: calc(var(--spacing) * 5);
|
|
4248
|
+
line-height: calc(var(--spacing) * 5);
|
|
4249
|
+
--tw-font-weight: var(--font-weight-normal);
|
|
4250
|
+
font-weight: var(--font-weight-normal);
|
|
4251
|
+
color: var(--color-content);
|
|
4252
|
+
}
|
|
4253
|
+
.tippy-box[data-theme~='basic'] .tippy-arrow {
|
|
4254
|
+
display: none;
|
|
4255
|
+
}
|
|
4256
|
+
.dark .tippy-box[data-theme~='basic'] {
|
|
4257
|
+
border-color: var(--color-secondary);
|
|
4258
|
+
background-color: var(--color-background);
|
|
4259
|
+
}
|
|
4260
|
+
.dark .tippy-box[data-theme~='basic'] .tippy-content {
|
|
4261
|
+
color: var(--color-content);
|
|
4262
|
+
}
|
|
4233
4263
|
@layer components {
|
|
4234
4264
|
@font-face {
|
|
4235
4265
|
font-family: 'Inter';
|
|
@@ -8958,36 +8988,6 @@
|
|
|
8958
8988
|
font-weight: var(--font-weight-medium);
|
|
8959
8989
|
color: var(--color-content-secondary);
|
|
8960
8990
|
}
|
|
8961
|
-
.tippy-box[data-theme~='basic'] {
|
|
8962
|
-
border-radius: var(--radius-md);
|
|
8963
|
-
border-style: var(--tw-border-style);
|
|
8964
|
-
border-width: 1px;
|
|
8965
|
-
border-color: var(--color-neutral-200);
|
|
8966
|
-
background-color: var(--color-background);
|
|
8967
|
-
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04);
|
|
8968
|
-
}
|
|
8969
|
-
.tippy-box[data-theme~='basic'] .tippy-content {
|
|
8970
|
-
padding-inline: calc(var(--spacing) * 2);
|
|
8971
|
-
padding-block: calc(var(--spacing) * 1);
|
|
8972
|
-
font-family: var(--font-sans);
|
|
8973
|
-
font-size: var(--text-sm);
|
|
8974
|
-
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
8975
|
-
--tw-leading: calc(var(--spacing) * 5);
|
|
8976
|
-
line-height: calc(var(--spacing) * 5);
|
|
8977
|
-
--tw-font-weight: var(--font-weight-normal);
|
|
8978
|
-
font-weight: var(--font-weight-normal);
|
|
8979
|
-
color: var(--color-content);
|
|
8980
|
-
}
|
|
8981
|
-
.tippy-box[data-theme~='basic'] .tippy-arrow {
|
|
8982
|
-
display: none;
|
|
8983
|
-
}
|
|
8984
|
-
.dark .tippy-box[data-theme~='basic'] {
|
|
8985
|
-
border-color: var(--color-secondary);
|
|
8986
|
-
background-color: var(--color-background);
|
|
8987
|
-
}
|
|
8988
|
-
.dark .tippy-box[data-theme~='basic'] .tippy-content {
|
|
8989
|
-
color: var(--color-content);
|
|
8990
|
-
}
|
|
8991
8991
|
.modal {
|
|
8992
8992
|
--modal-height-sm: 24rem;
|
|
8993
8993
|
--modal-height-md: 28rem;
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
@custom-variant hover (&:hover);
|
|
85
85
|
|
|
86
86
|
@import "./css/components/ui/checkbox.css";
|
|
87
|
+
@import "./css/components/tooltip.css";
|
|
87
88
|
|
|
88
89
|
@layer components {
|
|
89
90
|
@import "./css/fonts.css";
|
|
@@ -135,7 +136,6 @@
|
|
|
135
136
|
@import "./css/components/color_scheme_switcher.css";
|
|
136
137
|
@import "./css/components/discreet_information.css";
|
|
137
138
|
@import "./css/components/hotkey.css";
|
|
138
|
-
@import "./css/components/tooltip.css";
|
|
139
139
|
@import "./css/components/modal.css";
|
|
140
140
|
@import "./css/css-animations.css";
|
|
141
141
|
@import "./css/sidebar.css";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
require "fileutils"
|
|
2
|
+
require "rubygems"
|
|
3
|
+
|
|
4
|
+
module Avo
|
|
5
|
+
class TailwindVariablesPreparer
|
|
6
|
+
def self.prepare(target:, label:, avo_gem_path: nil, cwd: Dir.pwd)
|
|
7
|
+
source = resolve_source(avo_gem_path:, cwd:)
|
|
8
|
+
unless source
|
|
9
|
+
raise "[#{label}] Could not resolve Avo variables.css source."
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
target_dir = File.dirname(target)
|
|
13
|
+
begin
|
|
14
|
+
FileUtils.mkdir_p(target_dir)
|
|
15
|
+
rescue Errno::EACCES
|
|
16
|
+
warn "[#{label}] prebuild_css: cannot create #{target_dir} (permission denied). Skipping."
|
|
17
|
+
return true
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
if File.exist?(target) || File.symlink?(target)
|
|
21
|
+
begin
|
|
22
|
+
return true if File.identical?(source, target)
|
|
23
|
+
rescue
|
|
24
|
+
# ignore and continue
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
begin
|
|
28
|
+
File.delete(target)
|
|
29
|
+
rescue Errno::EACCES
|
|
30
|
+
warn "[#{label}] prebuild_css: cannot update #{target} (permission denied). Skipping."
|
|
31
|
+
return true
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
begin
|
|
36
|
+
File.symlink(source, target)
|
|
37
|
+
rescue Errno::EEXIST
|
|
38
|
+
begin
|
|
39
|
+
return true if File.identical?(source, target)
|
|
40
|
+
File.delete(target)
|
|
41
|
+
File.symlink(source, target)
|
|
42
|
+
rescue
|
|
43
|
+
copy_unless_identical(source, target)
|
|
44
|
+
end
|
|
45
|
+
rescue
|
|
46
|
+
copy_unless_identical(source, target)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
true
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def self.resolve_source(avo_gem_path: nil, cwd: Dir.pwd)
|
|
53
|
+
roots = []
|
|
54
|
+
roots << avo_gem_path if avo_gem_path
|
|
55
|
+
roots << File.expand_path("../avo", cwd)
|
|
56
|
+
roots << `bundle show avo 2>/dev/null`.strip
|
|
57
|
+
|
|
58
|
+
begin
|
|
59
|
+
roots << Gem::Specification.find_by_name("avo").full_gem_path
|
|
60
|
+
rescue Gem::LoadError
|
|
61
|
+
# ignore
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
roots
|
|
65
|
+
.compact
|
|
66
|
+
.map(&:strip)
|
|
67
|
+
.reject(&:empty?)
|
|
68
|
+
.uniq
|
|
69
|
+
.map { |root| File.join(root, "app/assets/stylesheets/css/variables.css") }
|
|
70
|
+
.find { |path| File.exist?(path) }
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def self.copy_unless_identical(source, target)
|
|
74
|
+
return if File.exist?(target) && File.identical?(source, target)
|
|
75
|
+
|
|
76
|
+
FileUtils.cp(source, target)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
data/lib/avo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: avo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.0.beta.
|
|
4
|
+
version: 4.0.0.beta.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adrian Marin
|
|
@@ -1048,6 +1048,7 @@ files:
|
|
|
1048
1048
|
- lib/avo/services/telemetry_service.rb
|
|
1049
1049
|
- lib/avo/services/uri_service.rb
|
|
1050
1050
|
- lib/avo/tailwind_builder.rb
|
|
1051
|
+
- lib/avo/tailwind_variables_preparer.rb
|
|
1051
1052
|
- lib/avo/test_helpers.rb
|
|
1052
1053
|
- lib/avo/tools/tool_manager.rb
|
|
1053
1054
|
- lib/avo/u_i_instance.rb
|