shimmer 0.0.30 → 0.0.31

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4daaaa818a13c67e102993a851ca62bde262fb8e29ee6b5edfa356344e2708ef
4
- data.tar.gz: 849d1c53c92617e5186070f62915888b0b6575ba165c3a747a0546e773da7334
3
+ metadata.gz: 779d79fb4df76a9a95f859cc5e5d0f42972518abd03a52e99f650258c2a309d1
4
+ data.tar.gz: d48baefb78dc663222646bd7cc98c6e6d15b2f8d76546e4f906fdd45aa61bab3
5
5
  SHA512:
6
- metadata.gz: 990b5dfc75f22a79620a2ea0644c5e87c34486911c3b8ee5def8939aafe84a4c2522dfedff24ac4f4e697fbeca5e6a39a4b43ee0a720990a53a287b972c7bca0
7
- data.tar.gz: 81581da7c7c5a952546771ff6fbecf3b4a0a203db0ffd8c02d4492dca2a1061d46e1a78acb66ab6daf9370e9998e90d6cd1b75a360855d6185d40cf2fb469e05
6
+ metadata.gz: 61ff05bdd88fd025936e51e3fef3847c9f7ef2141279e14bc508ae794e7bf149f81169835272504d8c8f7b93ccf459a0c4ce46c087ce4e0528e465c1870fe83a
7
+ data.tar.gz: 502f044707bf5049a79f8af12ee82d3a5aed421522085f761c5564318d96fdccc2c14ee63056b2b1ef948ad02a685c0db18e7cb09e420e8ba311926fb2bead70
data/Gemfile CHANGED
@@ -19,6 +19,8 @@ gem "dotenv"
19
19
  gem "slim-rails"
20
20
  gem "awesome_print"
21
21
  gem "dotenv-rails"
22
+ gem "image_processing"
23
+ gem "mini_magick"
22
24
 
23
25
  group :development, :test do
24
26
  gem "debug", platforms: [:mri, :mingw, :x64_mingw]
data/Gemfile.lock CHANGED
@@ -135,6 +135,9 @@ GEM
135
135
  rspec (>= 2.99.0, < 4.0)
136
136
  i18n (1.12.0)
137
137
  concurrent-ruby (~> 1.0)
138
+ image_processing (1.12.2)
139
+ mini_magick (>= 4.9.5, < 5)
140
+ ruby-vips (>= 2.0.17, < 3)
138
141
  io-console (0.6.0)
139
142
  irb (1.6.2)
140
143
  reline (>= 0.3.0)
@@ -161,6 +164,7 @@ GEM
161
164
  marcel (1.0.2)
162
165
  matrix (0.4.2)
163
166
  method_source (1.0.0)
167
+ mini_magick (4.12.0)
164
168
  mini_mime (1.1.2)
165
169
  minitest (5.17.0)
166
170
  msgpack (1.6.0)
@@ -294,6 +298,8 @@ GEM
294
298
  rubocop (~> 1.33)
295
299
  rubocop-capybara (~> 2.17)
296
300
  ruby-progressbar (1.13.0)
301
+ ruby-vips (2.1.4)
302
+ ffi (~> 1.12)
297
303
  shellany (0.0.1)
298
304
  slim (4.1.0)
299
305
  temple (>= 0.7.6, < 0.9)
@@ -356,8 +362,10 @@ DEPENDENCIES
356
362
  dotenv-rails
357
363
  guard
358
364
  guard-rspec
365
+ image_processing
359
366
  jbuilder
360
367
  jsbundling-rails
368
+ mini_magick
361
369
  propshaft
362
370
  pry
363
371
  pry-byebug
@@ -383,4 +391,4 @@ DEPENDENCIES
383
391
  web-console
384
392
 
385
393
  BUNDLED WITH
386
- 2.3.26
394
+ 2.4.9
@@ -19,6 +19,8 @@ gem "dotenv"
19
19
  gem "slim-rails"
20
20
  gem "awesome_print"
21
21
  gem "dotenv-rails"
22
+ gem "image_processing"
23
+ gem "mini_magick"
22
24
 
23
25
  group :development, :test do
24
26
  gem "debug", platforms: %i[mri mingw x64_mingw]
@@ -20,7 +20,7 @@ module Shimmer
20
20
  width = options[:width]
21
21
  height = options[:height]
22
22
  source = image_file_path(source, width: width, height: height)
23
- options[:loading] = :lazy
23
+ options[:loading] ||= :lazy
24
24
  options[:srcset] = "#{source} 1x, #{image_file_path(attachment, width: width.to_i * 2, height: height ? height.to_i * 2 : nil)} 2x" if options[:width].present?
25
25
  end
26
26
  super source, options
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Shimmer
4
- VERSION = "0.0.30"
4
+ VERSION = "0.0.31"
5
5
  end
data/src/modal.ts CHANGED
@@ -66,7 +66,11 @@ export class Modal {
66
66
  closeButton.style.display = close ?? true ? "block" : "none";
67
67
  root.classList.add("modal--open");
68
68
  root.classList.add("modal--loading");
69
- root.classList.toggle("modal--small", size === "small");
69
+
70
+ if (size) {
71
+ root.classList.add(`modal--${size}`);
72
+ }
73
+
70
74
  frame.innerHTML = await getHTML(url);
71
75
  root.classList.remove("modal--loading");
72
76
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Ravens
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-23 00:00:00.000000000 Z
11
+ date: 2023-08-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: