blacklight-gallery 4.9.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.
@@ -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 %>
@@ -1,5 +1,3 @@
1
- import Blacklight from 'blacklight-frontend'
2
-
3
1
  (function($){
4
2
  $.fn.BlacklightMasonry = function() {
5
3
  var container = this;
@@ -12,7 +10,3 @@ import Blacklight from 'blacklight-frontend'
12
10
 
13
11
  $.fn.BlacklightMasonry.options = { gutter: 8 };
14
12
  })(jQuery);
15
-
16
- Blacklight.onLoad(function() {
17
- $('.documents-masonry').BlacklightMasonry();
18
- });
@@ -1,5 +1,3 @@
1
- import Blacklight from 'blacklight-frontend'
2
-
3
1
  (function($){
4
2
  var Slideshow = function (element, options) {
5
3
  this.$element = $(element);
@@ -122,8 +120,3 @@ import Blacklight from 'blacklight-frontend'
122
120
  }
123
121
 
124
122
  })(jQuery);
125
-
126
-
127
- Blacklight.onLoad(function() {
128
- $('.documents-slideshow').slideshow();
129
- });
@@ -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 = '4.9.0'
3
+ VERSION = '6.0.0'
4
4
  end
5
5
  end
@@ -32,16 +32,58 @@ module BlacklightGallery
32
32
  generate 'openseadragon:install'
33
33
  end
34
34
 
35
- def assets
36
- copy_file "blacklight_gallery.css.scss", "app/assets/stylesheets/blacklight_gallery.css.scss"
35
+ def add_javascript
36
+ if defined?(Importmap)
37
+ say 'Installing assets for use with Importmaps', :green
38
+ append_to_file 'config/importmap.rb', "pin \"jquery\", to: \"https://code.jquery.com/jquery-3.7.1.min.js\"\n"
37
39
 
38
- return unless defined?(Sprockets)
40
+ append_to_file 'app/javascript/application.js', after: %r{import Blacklight .*$} do
41
+ <<~CONTENT
39
42
 
40
- append_to_file 'app/assets/config/manifest.js', "\n//= link blacklight_gallery/manifest.js\n"
43
+ import 'jquery'
44
+ import 'blacklight-gallery'
45
+ CONTENT
46
+ end
47
+
48
+ # Append plugin initialization code to main application.js file
49
+ append_to_file 'app/javascript/application.js' do
50
+ <<~CONTENT
51
+ Blacklight.onLoad(function() {
52
+ $('.documents-masonry').BlacklightMasonry();
53
+ $('.documents-slideshow').slideshow();
54
+ });
55
+ CONTENT
56
+ end
57
+ end
58
+ end
41
59
 
42
- insert_into_file "app/assets/javascripts/application.js", after: '//= require blacklight/blacklight' do
43
- "\n//= require blacklight_gallery/blacklight-gallery"
60
+ def add_stylesheet
61
+ # Indicates cssbundling-rails with bootstrap usage.
62
+ if File.exist? 'app/assets/stylesheets/application.bootstrap.scss'
63
+ append_to_file 'app/assets/stylesheets/application.bootstrap.scss' do
64
+ <<~CONTENT
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');
78
+ CONTENT
79
+ end
44
80
  end
45
81
  end
82
+
83
+ def add_sprockets_support
84
+ return unless defined?(Sprockets)
85
+
86
+ append_to_file 'app/assets/config/manifest.js', "\n//= link blacklight_gallery/manifest.js\n"
87
+ end
46
88
  end
47
89
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blacklight-gallery",
3
- "version": "4.9.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
  }
@@ -2,11 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  RSpec.describe 'Slideshow', js: true do
4
4
  it 'opens when one of the grid panes is clicked' do
5
- visit search_catalog_path( q: 'medicine', view: 'slideshow' )
6
- expect(page).to have_content 'You searched for:'
7
- within '.view-type' do
8
- click_link 'Slideshow'
9
- end
5
+ visit search_catalog_path(q: 'medicine', view: 'slideshow')
10
6
 
11
7
  find('.grid [data-slide-to="0"], .grid [data-bs-slide-to="0"]').click
12
8
  expect(page).to have_css('.slideshow-inner .item')
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: 4.9.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
- */