From 77c39ebd94b803ec1507073f7e440554a6bb5290 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Thu, 19 Dec 2024 12:42:52 -0600 Subject: [PATCH] Upgrade openseadragon --- Gemfile.lock | 52 +++++++++++++++---------- app/assets/config/manifest.js | 3 +- app/assets/javascripts/application.js | 1 + app/assets/javascripts/openseadragon.js | 2 - config/initializers/assets.rb | 2 + package.json | 1 + yarn.lock | 18 +++++++-- 7 files changed, 52 insertions(+), 27 deletions(-) delete mode 100644 app/assets/javascripts/openseadragon.js diff --git a/Gemfile.lock b/Gemfile.lock index 708d48c88..e95d9c32d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,7 +100,7 @@ GEM bibtex-ruby (6.1.0) latex-decode (~> 0.0) racc (~> 1.7) - bigdecimal (3.1.8) + bigdecimal (3.1.9) bindex (0.8.1) blacklight (8.7.0) globalid @@ -111,7 +111,7 @@ GEM rails (>= 6.1, < 9) view_component (>= 2.74, < 4) zeitwerk - blacklight-gallery (4.6.4) + blacklight-gallery (4.7.0) blacklight (>= 7.17, < 9) rails (>= 6.1, < 9) blacklight-oembed (1.2.0) @@ -228,7 +228,7 @@ GEM config (5.5.2) deep_merge (~> 1.2, >= 1.2.1) ostruct - connection_pool (2.4.1) + connection_pool (2.5.0) crack (1.0.0) bigdecimal rexml @@ -288,7 +288,7 @@ GEM ed25519 (1.3.0) edtf (3.2.0) activesupport (>= 3.0, < 9.0) - erubi (1.13.0) + erubi (1.13.1) execjs (2.10.0) factory_bot (6.5.0) activesupport (>= 5.0.0) @@ -437,7 +437,7 @@ GEM mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) io-console (0.8.0) - irb (1.14.2) + irb (1.14.3) rdoc (>= 4.0.0) reline (>= 0.4.2) iso-639 (0.3.8) @@ -482,8 +482,8 @@ GEM llhttp-ffi (0.5.0) ffi-compiler (~> 1.0) rake (~> 13.0) - logger (1.6.3) - loofah (2.23.1) + logger (1.6.4) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -506,6 +506,7 @@ GEM mime-types-data (3.2024.1203) mini_magick (4.13.2) mini_mime (1.1.5) + mini_portile2 (2.8.8) minitar (1.0.2) minitest (5.25.4) mods (3.0.5) @@ -529,7 +530,7 @@ GEM racc (~> 1.7) net-http (0.6.0) uri - net-imap (0.5.2) + net-imap (0.5.5) date net-protocol net-pop (0.1.2) @@ -545,17 +546,24 @@ GEM net-ssh (7.3.0) newrelic_rpm (9.16.1) nio4r (2.7.4) - nokogiri (1.17.2-aarch64-linux) + nokogiri (1.18.1) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.17.2-arm-linux) + nokogiri (1.18.1-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.17.2-arm64-darwin) + nokogiri (1.18.1-aarch64-linux-musl) racc (~> 1.4) - nokogiri (1.17.2-x86-linux) + nokogiri (1.18.1-arm-linux-gnu) racc (~> 1.4) - nokogiri (1.17.2-x86_64-darwin) + nokogiri (1.18.1-arm-linux-musl) racc (~> 1.4) - nokogiri (1.17.2-x86_64-linux) + nokogiri (1.18.1-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.1-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.1-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.1-x86_64-linux-musl) racc (~> 1.4) nom-xml (1.2.0) i18n @@ -569,7 +577,7 @@ GEM version_gem (~> 1.1) observer (0.1.2) okcomputer (1.18.5) - openseadragon (0.9.0) + openseadragon (1.0.16) rails (> 6.1.0) orm_adapter (0.5.0) os (1.1.4) @@ -583,7 +591,7 @@ GEM racc parslet (2.0.0) popper_js (2.11.8) - psych (5.2.1) + psych (5.2.2) date stringio public_suffix (6.0.1) @@ -601,9 +609,10 @@ GEM rack (>= 1.0, < 4) rack-mini-profiler (3.3.1) rack (>= 1.2.0) - rack-session (2.0.0) + rack-session (2.1.0) + base64 (>= 0.1.0) rack (>= 3.0.0) - rack-test (2.1.0) + rack-test (2.2.0) rack (>= 1.3) rack-timeout (0.7.0) rackup (2.2.1) @@ -650,7 +659,7 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rdoc (6.9.1) + rdoc (6.10.0) psych (>= 4.0.0) recaptcha (5.17.1) redcarpet (3.6.0) @@ -851,7 +860,7 @@ GEM uri (1.0.2) useragent (0.16.11) version_gem (1.1.4) - view_component (3.20.0) + view_component (3.21.0) activesupport (>= 5.2.0, < 8.1) concurrent-ruby (~> 1.0) method_source (~> 1.0) @@ -867,7 +876,8 @@ GEM crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) websocket (1.2.11) - websocket-driver (0.7.6) + websocket-driver (0.7.7) + base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 3081fd174..e56b72a2e 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,6 +1,7 @@ //= link_tree ../images +//= link application.css //= link application.js -//= link openseadragon-assets.js //= link spotlight/manifest.js //= link component_library_overrides.css //= link_tree ../builds +//= link_tree ../../../node_modules/openseadragon/build/openseadragon/images diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 2661203dc..e49202ac2 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -33,6 +33,7 @@ //= require exhibit_search_typeahead //= require nested_related_items //= require openseadragon +//= require openseadragon-rails/openseadragon-rails //= require spotlight //= require table_of_contents //= require site_search_type_toggle diff --git a/app/assets/javascripts/openseadragon.js b/app/assets/javascripts/openseadragon.js deleted file mode 100644 index 2ab91a9f1..000000000 --- a/app/assets/javascripts/openseadragon.js +++ /dev/null @@ -1,2 +0,0 @@ -//= require openseadragon/openseadragon -//= require openseadragon/rails \ No newline at end of file diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 5f2be6285..7cada359c 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -7,6 +7,8 @@ # Rails.application.config.assets.paths << Emoji.images_path Rails.application.config.assets.paths << Rails.root.join("node_modules/bootstrap-icons/font") +Rails.application.config.assets.paths << Rails.root.join('node_modules/openseadragon/build/openseadragon/images') +Rails.application.config.assets.paths << Rails.root.join('node_modules/openseadragon/build/openseadragon') # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. diff --git a/package.json b/package.json index 82156af3d..52cfdf297 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "leaflet": "^1.9.4", "leaflet-sidebar": "^0.2.4", "nodemon": "^3.1.7", + "openseadragon-rails": "^1.0.16", "postcss": "^8.4.49", "postcss-cli": "^11.0.0", "sass": "^1.82.0", diff --git a/yarn.lock b/yarn.lock index 12f58186c..48b73d91a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -172,9 +172,9 @@ binary-extensions@^2.0.0: bootstrap ">=4.3.1 <6.0.0" blacklight-gallery@^4.6.3: - version "4.6.3" - resolved "https://registry.yarnpkg.com/blacklight-gallery/-/blacklight-gallery-4.6.3.tgz#5e812928185f075afb89e7263834b8bc26765455" - integrity sha512-wfq46OyAzEhnRVw9/sd8leePXidDYnbxTzSo57drmIF+X/LbJYGzc8E2Ir20mKoTcsveq8PoaneZYFapHPYSAw== + version "4.7.0" + resolved "https://registry.yarnpkg.com/blacklight-gallery/-/blacklight-gallery-4.7.0.tgz#0f040fb39c3cada8b091a471143acfe3c8665fef" + integrity sha512-p4ad3SHYZnUtcnyfyHJey/ynTWhSgyBnn6fnz8iXS5tjJ1wbdyfN8KyPr0lRaBENX1QGlvI/Fkcccfw1gJTQfg== dependencies: blacklight-frontend ">=7.1.0 <9" jquery ">=3.0" @@ -526,6 +526,18 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== +openseadragon-rails@^1.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/openseadragon-rails/-/openseadragon-rails-1.0.16.tgz#343c061678ac1eda563210f1a8c6343a94c30c28" + integrity sha512-aia9ZhY9pdZSL4bcn93buUPw5pzjcgVaQls2Hnwq0DLCYLQpwFBu36jNPu+U2NCo9sGTEWB01xxGYJXAKHv44Q== + dependencies: + openseadragon "^5.0.1" + +openseadragon@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/openseadragon/-/openseadragon-5.0.1.tgz#ad3aaccc6c0f733c3153131e9af05bc2e17a1952" + integrity sha512-a/hjouW9i3UfWxRADVYN2MyRhXMGnE7x9VVL7/4jXCcDLFyO4UM5o4RStYtqa5BfaHw/wMNAaD2WbxQF8f1pJg== + path-type@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8"