blacklight-gallery 5.0.0 → 6.0.0

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: 13baf24ed76a1d17d236045a5c0cc02d58c9c6705f5d65b522931c3e195c6cb9
4
- data.tar.gz: f79f91f11e213e7faa9afbf8e482cb3e28dd128aac06febc89d9f6e949cbd568
3
+ metadata.gz: afc388305ae4f5c94d0db93b84263384c06fd63ceceb1fdb1ba1a6de3dd63df0
4
+ data.tar.gz: 07edb913bd3e3ef52416f195f2e931401da662ccdd290f183d0c56173fc1fc43
5
5
  SHA512:
6
- metadata.gz: a435ab07aea7fe74f4189523f5f3b5c1dd2dd6ccee5b11e9d58eab3cd618b0e5cef945cdb2ee59d8d44899dfe004463040c700cca6a6934f78c35bd5cbdf56b5
7
- data.tar.gz: 2337f6bb523acc96a45f9fe262a6774f125f8d29f5c6788d170cf877305f4971005ccb22d0fa90bd39d40473324ec9ddbc21d2a68a909faf41aa31665362a880
6
+ metadata.gz: 6d83d6abd455fe7816d959d6e77156090e9476440d6763e3d0ce0bd97eda0e0ed4e4b4fff90b61818dd2871bd835fddc1df0f1faf4792e70468fbffc3c2ac319
7
+ data.tar.gz: 88daf8b07b7433adb30ee28b36d25fabe2407003f768d48e9a6f2322e0bf826a14b0459884442e160e1d6bf50cc0bb4a8810f6be10bc5e4bf22209d81753e16c
@@ -15,23 +15,23 @@ jobs:
15
15
  matrix:
16
16
  ruby: ["3.2", "3.3", "3.4"]
17
17
  rails_version: ["8.0.1"]
18
- blacklight_version: ["~> 8.0"]
18
+ blacklight_version: ["~> 9.0.0beta1"]
19
19
  experimental: [false]
20
20
  additional_engine_cart_rails_options: [""] # default: propshaft, bootstrap, importmaps
21
21
  additional_name: [""]
22
22
  include:
23
23
  - ruby: "3.4"
24
24
  rails_version: "7.2.2.1"
25
- blacklight_version: "~> 7.0"
25
+ blacklight_version: "~> 9.0.0beta1"
26
26
  experimental: false
27
- additional_engine_cart_rails_options: "-a sprockets"
28
- additional_name: "/ sprockets"
27
+ additional_engine_cart_rails_options: ""
28
+ additional_name: ""
29
29
  - ruby: "3.2"
30
30
  rails_version: "7.1.5.1"
31
- blacklight_version: "~> 7.0"
31
+ blacklight_version: "~> 9.0.0beta1"
32
32
  experimental: false
33
- additional_engine_cart_rails_options: "-a sprockets"
34
- additional_name: "/ sprockets"
33
+ additional_engine_cart_rails_options: ""
34
+ additional_name: ""
35
35
  - ruby: "3.4"
36
36
  rails_version: "7.2.2.1"
37
37
  blacklight_version: "github"
data/Rakefile CHANGED
@@ -13,7 +13,6 @@ task :default => :ci
13
13
  rails_options = ENV.fetch('ENGINE_CART_RAILS_OPTIONS', '')
14
14
  rails_options = "#{rails_options} -a propshaft" unless rails_options.match?(/-a\s|--asset-pipeline/)
15
15
  rails_options = "#{rails_options} -j importmap" unless rails_options.match?(/-j\s|--javascript/)
16
- rails_options = "#{rails_options} --css bootstrap" unless rails_options.match?(/--css\s|sprockets/)
17
16
  ENV['ENGINE_CART_RAILS_OPTIONS'] = rails_options
18
17
 
19
18
  desc "Load fixtures"
@@ -1,2 +1,2 @@
1
- //= link_tree ../../javascripts .js
1
+ //= link_tree ../../../javascript .js
2
2
  //= link_tree ../../../../vendor/assets/javascripts .js
@@ -5,12 +5,8 @@
5
5
  min-height: 250px;
6
6
  }
7
7
 
8
- .caption {
9
- @extend .mt-2;
10
- }
11
-
12
8
  .index_title {
13
- @extend .h6;
9
+ font-size: 1.25rem;
14
10
  }
15
11
 
16
12
  .document-counter {
@@ -27,7 +23,8 @@
27
23
  }
28
24
 
29
25
  .document-metadata {
30
- dt, dd {
26
+ dt,
27
+ dd {
31
28
  flex: 0 0 100%;
32
29
  max-width: 100%;
33
30
  padding-left: 0;
@@ -41,7 +38,9 @@
41
38
  }
42
39
  }
43
40
 
44
- .documents-gallery, .documents-masonry, .documents-slideshow {
45
- padding-bottom: $spacer;
46
- border-bottom: $pagination-border-width solid $pagination-border-color
41
+ .documents-gallery,
42
+ .documents-masonry,
43
+ .documents-slideshow {
44
+ padding-bottom: 1rem;
45
+ border-bottom: var(--bs-border-width) solid var(--bs-border-color);
47
46
  }
@@ -4,7 +4,9 @@
4
4
  padding: 0;
5
5
  margin: 0;
6
6
 
7
- &:hover, &:focus, &:focus-within {
7
+ &:hover,
8
+ &:focus,
9
+ &:focus-within {
8
10
  .caption-area {
9
11
  left: auto;
10
12
  width: auto;
@@ -15,14 +17,14 @@
15
17
  }
16
18
  }
17
19
 
18
- margin-bottom: $spacer * 0.5;
20
+ margin-bottom: 0.5rem;
19
21
  position: relative;
20
22
  width: auto;
21
23
 
22
24
  .thumbnail-container {
23
25
  position: relative;
24
26
  min-height: 100px;
25
- background-color: $gray-300;
27
+ background-color: var(--bs-gray-300);
26
28
  }
27
29
 
28
30
  .img-thumbnail {
@@ -31,16 +33,17 @@
31
33
  }
32
34
 
33
35
  .caption-area {
34
- // styling for documents without thumbnails
36
+ /* styling for documents without thumbnails */
35
37
  &:first-child {
36
38
  display: block;
37
39
  max-height: 100%;
38
- background-color: rgba(0,0,0,0.7) !important;
40
+ background-color: rgba(0, 0, 0, 0.7) !important;
39
41
  }
40
- @extend .bg-dark;
41
- @extend .text-white;
42
+
43
+ background-color: var(--bs-gray-dark);
44
+ color: var(--bs-white);
42
45
  padding: 5px 7px;
43
- background-color: rgba(0,0,0,0.5) !important;
46
+ background-color: rgba(0, 0, 0, 0.5) !important;
44
47
  position: absolute;
45
48
  bottom: 0;
46
49
  width: 1px;
@@ -54,18 +57,32 @@
54
57
  }
55
58
 
56
59
  .index_title {
57
- @extend .h6;
58
- a, a:hover, a:visited, a:active {
59
- @extend .stretched-link;
60
- color: $gray-300
60
+ font-size: 1.25rem;
61
+ a,
62
+ a:hover,
63
+ a:visited,
64
+ a:active {
65
+ /* this is a replication of the Boostrap .stretched-link class */
66
+ /* moving them into this file allows to to avoid extending the Boostrap class with SASS */
67
+ &::after {
68
+ position: absolute;
69
+ top: 0;
70
+ right: 0;
71
+ bottom: 0;
72
+ left: 0;
73
+ z-index: 1;
74
+ content: "";
75
+ }
76
+ color: var(--bs-gray-300);
61
77
  }
62
78
  }
63
79
 
64
80
  .document-metadata {
65
81
  dt {
66
- color: $gray-300;
82
+ color: var(--bs-gray-300);
67
83
  }
68
- dt, dd {
84
+ dt,
85
+ dd {
69
86
  flex: 0 0 100%;
70
87
  max-width: 100%;
71
88
  padding-left: 0;
@@ -1,5 +1,4 @@
1
1
  .openseadragon-container {
2
-
3
2
  .osd-toolbar {
4
3
  padding: 5px 0;
5
4
 
@@ -22,8 +21,7 @@
22
21
  }
23
22
 
24
23
  .osd-image {
25
- border: 1px solid #ccc;
24
+ border: 1px solid var(--bs-gray-400);
26
25
  height: 400px;
27
-
28
26
  }
29
27
  }
@@ -1,13 +1,10 @@
1
- $gray-light: lightgray !default;
2
- $gray-dark: #343a40 !default;
3
-
4
1
  .slideshow-modal {
5
2
  .modal-dialog {
6
3
  width: 100%;
7
4
  margin: 1% auto;
8
5
 
9
6
  .modal-content {
10
- background-color: $gray-dark;
7
+ background-color: var(--bs-gray-dark);
11
8
  }
12
9
 
13
10
  .modal-header {
@@ -72,14 +69,14 @@ $gray-dark: #343a40 !default;
72
69
  svg {
73
70
  height: 3rem;
74
71
  width: 3rem;
75
- fill: $gray-light;
72
+ fill: var(--bs-gray-400);
76
73
  }
77
74
  }
78
75
  }
79
- .carousel-control.left {
76
+ .carousel-control.left {
80
77
  left: 0px;
81
78
  }
82
- .carousel-control.right {
79
+ .carousel-control.right {
83
80
  right: 0px;
84
81
  }
85
82
 
@@ -89,18 +86,19 @@ $gray-dark: #343a40 !default;
89
86
  min-width: 200px;
90
87
  max-width: 50%;
91
88
  a {
92
- color: $gray-light;
89
+ color: var(--bs-gray-400);
93
90
  text-decoration: underline;
94
- &:hover, &:focus {
95
- color: #ffffff;
91
+ &:hover,
92
+ &:focus {
93
+ color: var(--bs-white);
96
94
  }
97
95
  }
98
96
  }
99
97
 
100
98
  .counter {
101
99
  border-radius: 12px;
102
- border: 1px solid $gray-light;
103
- color: $gray-light;
100
+ border: 1px solid var(--bs-gray-400);
101
+ color: var(--bs-gray-400);
104
102
  font-size: 1rem;
105
103
  overflow: auto;
106
104
  padding: 4px 10px;
@@ -109,7 +107,7 @@ $gray-dark: #343a40 !default;
109
107
 
110
108
  .controls {
111
109
  svg {
112
- fill: $gray-light;
110
+ fill: var(--bs-gray-400);
113
111
  width: 32px;
114
112
  height: 32px;
115
113
  }
@@ -127,7 +125,7 @@ $gray-dark: #343a40 !default;
127
125
  .slideshow h3 {
128
126
  background-color: whitesmoke;
129
127
  border-radius: 3px;
130
- border: 1px solid #ddd;
128
+ border: 1px solid var(--bs-gray-400);
131
129
  display: inline-block;
132
130
  font-size: 16px;
133
131
  margin: 10px auto;
@@ -137,7 +135,7 @@ $gray-dark: #343a40 !default;
137
135
  .grid {
138
136
  display: flex;
139
137
  flex-wrap: wrap;
140
- $square-thumb-size: 100px;
138
+ --square-thumb-size: 100px;
141
139
 
142
140
  .document {
143
141
  display: flex;
@@ -148,22 +146,22 @@ $gray-dark: #343a40 !default;
148
146
  margin-bottom: 1rem;
149
147
 
150
148
  .thumbnail {
151
- border: 1px solid #999;
149
+ border: 1px solid var(--bs-gray-400);
152
150
  border-radius: 0;
153
- min-height: $square-thumb-size;
154
- min-width: $square-thumb-size;
151
+ min-height: var(--square-thumb-size);
152
+ min-width: var(--square-thumb-size);
155
153
  overflow: hidden;
156
154
  padding: 0px;
157
155
  position: relative;
158
- width: $square-thumb-size;
156
+ width: var(--square-thumb-size);
159
157
 
160
158
  img {
161
- height: $square-thumb-size;
159
+ height: var(--square-thumb-size);
162
160
  max-height: none;
163
161
  max-width: none;
164
162
  object-fit: cover;
165
163
  position: absolute;
166
- width: $square-thumb-size;
164
+ width: var(--square-thumb-size);
167
165
  }
168
166
  }
169
167
  }
@@ -8,7 +8,7 @@
8
8
  <%= thumbnail %>
9
9
 
10
10
  <div class="caption-area">
11
- <div class="caption container">
11
+ <div class="caption container mt-2">
12
12
  <%= title %>
13
13
  <%= content %>
14
14
  <%= metadata %>
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "rails", '>= 6.1', '< 9'
21
- spec.add_dependency 'blacklight', '>= 7.17', '< 9'
20
+ spec.add_dependency "rails", '>= 7.1', '< 9'
21
+ spec.add_dependency 'blacklight', '~> 9.0.0beta1'
22
22
 
23
23
  spec.add_development_dependency "rake"
24
24
  spec.add_development_dependency 'sqlite3'
@@ -1,5 +1,5 @@
1
1
  module Blacklight
2
2
  module Gallery
3
- VERSION = '5.0.0'
3
+ VERSION = '6.0.0'
4
4
  end
5
5
  end
@@ -60,19 +60,21 @@ module BlacklightGallery
60
60
  def add_stylesheet
61
61
  # Indicates cssbundling-rails with bootstrap usage.
62
62
  if File.exist? 'app/assets/stylesheets/application.bootstrap.scss'
63
- # Use local blacklight-gallery assets in CI and local test/development.
64
- if ENV['CI'] || Rails.application.class.name == "Internal::Application"
65
- run "yarn add file:#{Blacklight::Gallery::Engine.root}"
66
- else
67
- run "yarn add blacklight-gallery@#{Blacklight::Gallery::VERSION}"
68
- end
69
-
70
63
  append_to_file 'app/assets/stylesheets/application.bootstrap.scss' do
71
64
  <<~CONTENT
72
- @import "blacklight-gallery/app/assets/stylesheets/blacklight_gallery/_gallery";
73
- @import "blacklight-gallery/app/assets/stylesheets/blacklight_gallery/_masonry";
74
- @import "blacklight-gallery/app/assets/stylesheets/blacklight_gallery/_slideshow";
75
- @import "blacklight-gallery/app/assets/stylesheets/blacklight_gallery/_osd_viewer";
65
+ @import url('blacklight_gallery/gallery.css');
66
+ @import url('blacklight_gallery/masonry.css');
67
+ @import url('blacklight_gallery/osd_viewer.css');
68
+ @import url('blacklight_gallery/slideshow.css');
69
+ CONTENT
70
+ end
71
+ else
72
+ append_to_file 'app/assets/stylesheets/application.css' do
73
+ <<~CONTENT
74
+ @import url('blacklight_gallery/gallery.css');
75
+ @import url('blacklight_gallery/masonry.css');
76
+ @import url('blacklight_gallery/osd_viewer.css');
77
+ @import url('blacklight_gallery/slideshow.css');
76
78
  CONTENT
77
79
  end
78
80
  end
@@ -81,22 +83,7 @@ module BlacklightGallery
81
83
  def add_sprockets_support
82
84
  return unless defined?(Sprockets)
83
85
 
84
- copy_file "blacklight_gallery.css.scss", "app/assets/stylesheets/blacklight_gallery.css.scss"
85
-
86
86
  append_to_file 'app/assets/config/manifest.js', "\n//= link blacklight_gallery/manifest.js\n"
87
-
88
- insert_into_file "app/assets/javascripts/application.js", after: '//= require blacklight/blacklight' do
89
- "\n//= require blacklight_gallery/blacklight-gallery"
90
- end
91
-
92
- insert_into_file "app/assets/javascripts/application.js" do
93
- <<~CONTENT
94
- Blacklight.onLoad(function() {
95
- $('.documents-masonry').BlacklightMasonry();
96
- $('.documents-slideshow').slideshow();
97
- });
98
- CONTENT
99
- end
100
87
  end
101
88
  end
102
89
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blacklight-gallery",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "Gallery views for Blacklight search results",
5
5
  "exports": {
6
6
  "./blacklight-gallery.esm.js": "./app/assets/javascripts/blacklight_gallery/blacklight-gallery.esm.js",
@@ -16,7 +16,7 @@
16
16
  "app/assets/javascripts/blacklight_gallery/*.js",
17
17
  "app/javascript/blacklight-gallery/*.js",
18
18
  "vendor/assets/javascripts/*.js",
19
- "app/assets/stylesheets/blacklight_gallery/*.scss"
19
+ "app/assets/stylesheets/blacklight_gallery/*.css"
20
20
  ],
21
21
  "repository": {
22
22
  "type": "git",
@@ -33,7 +33,7 @@
33
33
  "rollup-plugin-includepaths": "^0.2.4"
34
34
  },
35
35
  "dependencies": {
36
- "blacklight-frontend": ">=7.1.0 <9",
36
+ "blacklight-frontend": ">=9.0.0-beta1",
37
37
  "openseadragon-rails": "^1.0.11",
38
38
  "jquery": ">=3.0"
39
39
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-gallery
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-22 00:00:00.000000000 Z
11
+ date: 2025-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '6.1'
19
+ version: '7.1'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '9'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '6.1'
29
+ version: '7.1'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '9'
@@ -34,22 +34,16 @@ dependencies:
34
34
  name: blacklight
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '7.17'
40
- - - "<"
37
+ - - "~>"
41
38
  - !ruby/object:Gem::Version
42
- version: '9'
39
+ version: 9.0.0beta1
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
46
43
  requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '7.17'
50
- - - "<"
44
+ - - "~>"
51
45
  - !ruby/object:Gem::Version
52
- version: '9'
46
+ version: 9.0.0beta1
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: rake
55
49
  requirement: !ruby/object:Gem::Requirement
@@ -221,11 +215,10 @@ files:
221
215
  - app/assets/javascripts/blacklight_gallery/blacklight-gallery.esm.js.map
222
216
  - app/assets/javascripts/blacklight_gallery/blacklight-gallery.js
223
217
  - app/assets/javascripts/blacklight_gallery/blacklight-gallery.js.map
224
- - app/assets/stylesheets/blacklight_gallery/_gallery.scss
225
- - app/assets/stylesheets/blacklight_gallery/_masonry.scss
226
- - app/assets/stylesheets/blacklight_gallery/_osd_viewer.scss
227
- - app/assets/stylesheets/blacklight_gallery/_slideshow.scss
228
- - app/assets/stylesheets/blacklight_gallery/default.scss
218
+ - app/assets/stylesheets/blacklight_gallery/gallery.css
219
+ - app/assets/stylesheets/blacklight_gallery/masonry.css
220
+ - app/assets/stylesheets/blacklight_gallery/osd_viewer.css
221
+ - app/assets/stylesheets/blacklight_gallery/slideshow.css
229
222
  - app/components/blacklight/gallery/document_component.html.erb
230
223
  - app/components/blacklight/gallery/document_component.rb
231
224
  - app/components/blacklight/gallery/icons/add_circle_component.rb
@@ -271,7 +264,6 @@ files:
271
264
  - lib/blacklight/gallery/engine.rb
272
265
  - lib/blacklight/gallery/version.rb
273
266
  - lib/generators/blacklight_gallery/install_generator.rb
274
- - lib/generators/blacklight_gallery/templates/blacklight_gallery.css.scss
275
267
  - package.json
276
268
  - rollup.config.js
277
269
  - solr/conf/_rest_managed.json
@@ -1,7 +0,0 @@
1
- @import "bootstrap";
2
- @import "bootstrap/variables";
3
-
4
- @import "gallery";
5
- @import "masonry";
6
- @import "slideshow";
7
- @import "osd_viewer";
@@ -1,3 +0,0 @@
1
- /*
2
- *= require blacklight_gallery/default
3
- */