spina 2.1.1 → 2.3.2
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.
Potentially problematic release.
This version of spina might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/config/spina/manifest.js +1 -0
- data/app/assets/javascripts/spina/application.js +2 -0
- data/app/assets/javascripts/spina/controllers/attachment_picker_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/autofocus_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/button_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/confetti_controller.js +2 -2
- data/app/assets/javascripts/spina/controllers/confirm_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/delegate_click_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/exists_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/form_controller.js +2 -2
- data/app/assets/javascripts/spina/controllers/hotkeys_controller.js +2 -2
- data/app/assets/javascripts/spina/controllers/image_collection_controller.js +2 -2
- data/app/assets/javascripts/spina/controllers/image_fade_in_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/infinite_scroll_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/loading_button_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/media_picker_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/media_picker_modal_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/modal_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/navigation_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/parent_pages_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/repeater_controller.js +2 -2
- data/app/assets/javascripts/spina/controllers/select_placeholder_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/selectable_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/shortcuts_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/sortable_controller.js +3 -3
- data/app/assets/javascripts/spina/controllers/switch_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/tabs_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/toggle_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/trix_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/unique_id_controller.js +1 -1
- data/app/assets/javascripts/spina/libraries/stimulus-reveal@1.2.4.js +1 -1
- data/app/assets/stylesheets/spina/_tailwind.css +110078 -105581
- data/app/components/spina/media_picker/modal_component.html.erb +2 -2
- data/app/controllers/concerns/spina/api/paginable.rb +44 -0
- data/app/controllers/concerns/spina/current_account.rb +17 -0
- data/app/controllers/concerns/spina/current_theme.rb +17 -0
- data/app/controllers/spina/admin/admin_controller.rb +3 -10
- data/app/controllers/spina/admin/pages_controller.rb +2 -2
- data/app/controllers/spina/admin/password_resets_controller.rb +1 -1
- data/app/controllers/spina/admin/sessions_controller.rb +1 -1
- data/app/controllers/spina/admin/users_controller.rb +11 -1
- data/app/controllers/spina/api/api_controller.rb +29 -0
- data/app/controllers/spina/api/images_controller.rb +12 -0
- data/app/controllers/spina/api/navigations_controller.rb +20 -0
- data/app/controllers/spina/api/pages_controller.rb +26 -0
- data/app/controllers/spina/api/resources_controller.rb +19 -0
- data/app/controllers/spina/application_controller.rb +2 -1
- data/app/controllers/spina/pages_controller.rb +5 -5
- data/app/helpers/spina/attachments_helper.rb +1 -1
- data/app/helpers/spina/images_helper.rb +1 -5
- data/app/helpers/spina/spina_helper.rb +5 -8
- data/app/models/spina/page.rb +1 -1
- data/app/serializers/spina/api/base_serializer.rb +6 -0
- data/app/serializers/spina/api/image_serializer.rb +20 -0
- data/app/serializers/spina/api/navigation_serializer.rb +30 -0
- data/app/serializers/spina/api/page_serializer.rb +28 -0
- data/app/serializers/spina/api/resource_serializer.rb +12 -0
- data/app/views/layouts/spina/admin/application.html.erb +3 -7
- data/app/views/spina/admin/attachments/_attachment.html.erb +5 -0
- data/app/views/spina/admin/shared/_navigation.html.erb +15 -10
- data/config/locales/en.yml +1 -0
- data/config/locales/ru.yml +199 -177
- data/config/routes.rb +10 -0
- data/lib/generators/spina/templates/config/initializers/spina.rb +48 -13
- data/lib/spina.rb +35 -30
- data/lib/spina/authentication/basic.rb +24 -0
- data/lib/spina/authentication/sessions.rb +32 -0
- data/lib/spina/engine.rb +18 -7
- data/lib/spina/railtie.rb +1 -1
- data/lib/spina/version.rb +1 -1
- data/lib/tasks/spina_tasks.rake +1 -1
- metadata +65 -10
- data/app/assets/javascripts/spina/importmap.json.erb +0 -5
- data/app/controllers/concerns/spina/current_methods.rb +0 -34
- data/lib/spina/importmap_helper.rb +0 -37
    
        data/config/routes.rb
    CHANGED
    
    | @@ -11,6 +11,16 @@ Rails.application.routes.draw do | |
| 11 11 | 
             
            end
         | 
| 12 12 |  | 
| 13 13 | 
             
            Spina::Engine.routes.draw do
         | 
| 14 | 
            +
              
         | 
| 15 | 
            +
              # API
         | 
| 16 | 
            +
              namespace :api, path: Spina.config.api_path do
         | 
| 17 | 
            +
                resources :pages, only: [:index, :show]
         | 
| 18 | 
            +
                resources :navigations, only: [:index, :show]
         | 
| 19 | 
            +
                resources :resources, only: [:index, :show] do
         | 
| 20 | 
            +
                  resources :pages, only: [:index, :show]
         | 
| 21 | 
            +
                end
         | 
| 22 | 
            +
                resources :images, only: [:show]
         | 
| 23 | 
            +
              end
         | 
| 14 24 |  | 
| 15 25 | 
             
              # Backend
         | 
| 16 26 | 
             
              namespace :admin, path: Spina.config.backend_path do
         | 
| @@ -1,31 +1,59 @@ | |
| 1 | 
            -
            Spina.configure do |config|
         | 
| 2 | 
            -
              #  | 
| 3 | 
            -
               | 
| 4 | 
            -
              #  | 
| 5 | 
            -
             | 
| 6 | 
            -
              # Important Note
         | 
| 7 | 
            -
              # ==============
         | 
| 8 | 
            -
             | 
| 9 | 
            -
              # You MUST restart your server before changes to this file
         | 
| 10 | 
            -
              # will take effect.
         | 
| 1 | 
            +
            Spina.configure do |config|  
         | 
| 2 | 
            +
              # Locales
         | 
| 3 | 
            +
              # ===============
         | 
| 4 | 
            +
              # All locales your content should be available in.
         | 
| 5 | 
            +
              # config.locales = [I18n.default_locale]
         | 
| 11 6 |  | 
| 7 | 
            +
              # Backend path
         | 
| 8 | 
            +
              # ===============
         | 
| 12 9 | 
             
              # Specify a backend path. Defaults to /admin.
         | 
| 13 10 | 
             
              # config.backend_path = 'admin'
         | 
| 14 11 |  | 
| 12 | 
            +
              # Frontend routes
         | 
| 13 | 
            +
              # ===============
         | 
| 14 | 
            +
              # Uncomment the config below to disable all frontend routes.
         | 
| 15 | 
            +
              # You'll have to write your own.
         | 
| 16 | 
            +
              # config.disable_frontend_routes = true
         | 
| 17 | 
            +
              
         | 
| 18 | 
            +
              # Embedded image size
         | 
| 19 | 
            +
              # ===============
         | 
| 20 | 
            +
              # Images that are inserted in rich text fields are resized automatically.
         | 
| 21 | 
            +
              # You can define your desired dimensions here.
         | 
| 22 | 
            +
              # config.embedded_image_size = [2000, 2000]
         | 
| 23 | 
            +
              
         | 
| 24 | 
            +
              # Thumbnail image size
         | 
| 25 | 
            +
              # ===============
         | 
| 26 | 
            +
              # Thumbnail images for the API are generated using `resize_to_fill`.
         | 
| 27 | 
            +
              # config.thumbnail_image_size = [400, 400]
         | 
| 28 | 
            +
              
         | 
| 29 | 
            +
              # Parent controller
         | 
| 30 | 
            +
              # ===============
         | 
| 15 31 | 
             
              # The parent controller all frontend Spina controllers inherit from
         | 
| 16 32 | 
             
              # Defaults to ApplicationController
         | 
| 17 33 | 
             
              # config.frontend_parent_controller = "ApplicationController"
         | 
| 18 34 |  | 
| 35 | 
            +
              # Authentication
         | 
| 36 | 
            +
              # ===============
         | 
| 37 | 
            +
              # Specify the module that handles authentication
         | 
| 38 | 
            +
              # You can swap this out for something like Devise, or you can use your own authentication.
         | 
| 39 | 
            +
              # The default is Spina::Authentication::Sessions and includes basic user management
         | 
| 40 | 
            +
              # config.authentication = "Spina::Authentication::Sessions"
         | 
| 41 | 
            +
              
         | 
| 42 | 
            +
              # API
         | 
| 43 | 
            +
              # ===============
         | 
| 44 | 
            +
              # Set an API key to activate Spina's API. 
         | 
| 45 | 
            +
              # It's highly recommended to use Rails credentials to store this API key.
         | 
| 46 | 
            +
              # config.api_key = Rails.application.credentials.spina_api_key
         | 
| 47 | 
            +
              # config.api_path = 'api'
         | 
| 48 | 
            +
              
         | 
| 19 49 | 
             
              # Background jobs
         | 
| 20 50 | 
             
              # ===============
         | 
| 21 | 
            -
              # 
         | 
| 22 51 | 
             
              # By default, all background jobs are queued as :default
         | 
| 23 52 | 
             
              # config.queues.page_updates = :default
         | 
| 24 53 |  | 
| 25 54 | 
             
              # Confetti
         | 
| 26 55 | 
             
              # ===============
         | 
| 27 | 
            -
              # 
         | 
| 28 | 
            -
              # For people who don't appreciate confetti, you can disable that here 
         | 
| 56 | 
            +
              # For people who don't appreciate confetti, you can disable that here.
         | 
| 29 57 | 
             
              # config.party_pooper = true
         | 
| 30 58 |  | 
| 31 59 | 
             
              # Pages Options
         | 
| @@ -33,4 +61,11 @@ Spina.configure do |config| | |
| 33 61 |  | 
| 34 62 | 
             
              # Note that you might need to remove cached asset after changing this value
         | 
| 35 63 | 
             
              # config.max_page_depth = 5
         | 
| 64 | 
            +
             | 
| 65 | 
            +
              # Transliterations
         | 
| 66 | 
            +
              # ===============
         | 
| 67 | 
            +
              # Set provided transliterations for normalizing url slugs
         | 
| 68 | 
            +
              # %i( bulgarian cyrillic danish german greek latin macedonian norwegian 
         | 
| 69 | 
            +
              #     romanian russian serbian spanish swedish ukrainian vietnamese)
         | 
| 70 | 
            +
              # config.transliterations = %i(latin)
         | 
| 36 71 | 
             
            end
         | 
    
        data/lib/spina.rb
    CHANGED
    
    | @@ -1,4 +1,3 @@ | |
| 1 | 
            -
            require 'spina/importmap_helper'
         | 
| 2 1 | 
             
            require 'spina/engine'
         | 
| 3 2 | 
             
            require 'spina/admin_sectionable'
         | 
| 4 3 | 
             
            require 'spina/railtie'
         | 
| @@ -7,6 +6,8 @@ require 'spina/theme' | |
| 7 6 | 
             
            require 'spina/tailwind_purger'
         | 
| 8 7 | 
             
            require 'spina/attr_json_spina_parts_model'
         | 
| 9 8 | 
             
            require 'spina/attr_json_monkeypatch'
         | 
| 9 | 
            +
            require 'spina/authentication/sessions'
         | 
| 10 | 
            +
            require 'spina/authentication/basic'
         | 
| 10 11 |  | 
| 11 12 | 
             
            module Spina
         | 
| 12 13 | 
             
              include ActiveSupport::Configurable
         | 
| @@ -15,34 +16,52 @@ module Spina | |
| 15 16 | 
             
              PLUGINS = []
         | 
| 16 17 | 
             
              THEMES = []
         | 
| 17 18 |  | 
| 18 | 
            -
              config_accessor : | 
| 19 | 
            +
              config_accessor :api_key,
         | 
| 20 | 
            +
                              :api_path,
         | 
| 21 | 
            +
                              :authentication,
         | 
| 22 | 
            +
                              :backend_path, 
         | 
| 23 | 
            +
                              :importmap,
         | 
| 19 24 | 
             
                              :frontend_parent_controller,
         | 
| 20 25 | 
             
                              :disable_frontend_routes,
         | 
| 21 | 
            -
                              : | 
| 26 | 
            +
                              :disable_decorator_load,
         | 
| 22 27 | 
             
                              :locales, 
         | 
| 23 28 | 
             
                              :embedded_image_size,
         | 
| 29 | 
            +
                              :thumbnail_image_size,
         | 
| 24 30 | 
             
                              :party_pooper,
         | 
| 25 31 | 
             
                              :tailwind_purge_content,
         | 
| 26 | 
            -
                              :queues
         | 
| 32 | 
            +
                              :queues,
         | 
| 33 | 
            +
                              :transliterations
         | 
| 27 34 |  | 
| 28 | 
            -
              #  | 
| 35 | 
            +
              # Defaults
         | 
| 36 | 
            +
              self.api_key = nil
         | 
| 37 | 
            +
              self.api_path = "api"
         | 
| 38 | 
            +
              self.authentication = "Spina::Authentication::Sessions"
         | 
| 29 39 | 
             
              self.backend_path = 'admin'
         | 
| 30 | 
            -
              
         | 
| 31 | 
            -
              # The parent controller all frontend Spina controllers inherit from
         | 
| 32 | 
            -
              # Default is ApplicationController
         | 
| 33 | 
            -
              self.frontend_parent_controller = "ApplicationController"
         | 
| 34 | 
            -
             | 
| 35 40 | 
             
              self.disable_frontend_routes = false
         | 
| 36 | 
            -
             | 
| 37 | 
            -
              self. | 
| 38 | 
            -
             | 
| 41 | 
            +
              self.disable_decorator_load = false
         | 
| 42 | 
            +
              self.embedded_image_size = [2000, 2000]
         | 
| 43 | 
            +
              self.thumbnail_image_size = [400, 400]
         | 
| 44 | 
            +
              self.frontend_parent_controller = "ApplicationController"
         | 
| 39 45 | 
             
              self.locales = [I18n.default_locale]
         | 
| 46 | 
            +
              self.party_pooper = false
         | 
| 47 | 
            +
              self.transliterations = %i(latin)
         | 
| 40 48 |  | 
| 41 | 
            -
              # Queues
         | 
| 49 | 
            +
              # Queues for background jobs
         | 
| 50 | 
            +
              # - config.queues.page_updates
         | 
| 42 51 | 
             
              self.queues = ActiveSupport::InheritableOptions.new
         | 
| 43 52 |  | 
| 44 | 
            -
              #  | 
| 45 | 
            -
              self. | 
| 53 | 
            +
              # An importmap specifically meant for Spina
         | 
| 54 | 
            +
              self.importmap = Importmap::Map.new
         | 
| 55 | 
            +
                
         | 
| 56 | 
            +
              # Tailwind purging
         | 
| 57 | 
            +
              # Spina will by default purge all unused Tailwind classes by scanning
         | 
| 58 | 
            +
              # the files listed below. You probably don't want to override this in 
         | 
| 59 | 
            +
              # your main app. Spina Plugins can add files to this array.
         | 
| 60 | 
            +
              self.tailwind_purge_content = Spina::Engine.root.glob("app/views/**/*.*") + 
         | 
| 61 | 
            +
                                            Spina::Engine.root.glob("app/components/**/*.*") + 
         | 
| 62 | 
            +
                                            Spina::Engine.root.glob("app/helpers/**/*.*") + 
         | 
| 63 | 
            +
                                            Spina::Engine.root.glob("app/assets/javascripts/**/*.js") +
         | 
| 64 | 
            +
                                            Spina::Engine.root.glob("app/**/tailwind/custom.css")
         | 
| 46 65 |  | 
| 47 66 | 
             
              # Images that are embedded in the Trix editor are resized to fit
         | 
| 48 67 | 
             
              # You can optimize this for your website and go for a smaller (or larger) size
         | 
| @@ -64,18 +83,4 @@ module Spina | |
| 64 83 | 
             
                  config_obj
         | 
| 65 84 | 
             
                end
         | 
| 66 85 | 
             
              end
         | 
| 67 | 
            -
              
         | 
| 68 | 
            -
              self.embedded_image_size = [2000, 2000]
         | 
| 69 | 
            -
             | 
| 70 | 
            -
              
         | 
| 71 | 
            -
              # Tailwind purging
         | 
| 72 | 
            -
              # Spina will by default purge all unused Tailwind classes by scanning
         | 
| 73 | 
            -
              # the files listed below. You probably don't want to override this in 
         | 
| 74 | 
            -
              # your main app. Spina Plugins can add files to this array.
         | 
| 75 | 
            -
              self.tailwind_purge_content = Spina::Engine.root.glob("app/views/**/*.*") + 
         | 
| 76 | 
            -
                                            Spina::Engine.root.glob("app/components/**/*.*") + 
         | 
| 77 | 
            -
                                            Spina::Engine.root.glob("app/helpers/**/*.*") + 
         | 
| 78 | 
            -
                                            Spina::Engine.root.glob("app/assets/javascripts/**/*.js") +
         | 
| 79 | 
            -
                                            Spina::Engine.root.glob("app/**/tailwind/custom.css")
         | 
| 80 | 
            -
             | 
| 81 86 | 
             
            end
         | 
| @@ -0,0 +1,24 @@ | |
| 1 | 
            +
            module Spina
         | 
| 2 | 
            +
              module Authentication
         | 
| 3 | 
            +
                module Basic
         | 
| 4 | 
            +
                  extend ActiveSupport::Concern
         | 
| 5 | 
            +
                  
         | 
| 6 | 
            +
                  included do
         | 
| 7 | 
            +
                    helper_method :logged_in?
         | 
| 8 | 
            +
                  end
         | 
| 9 | 
            +
                  
         | 
| 10 | 
            +
                  def logged_in?
         | 
| 11 | 
            +
                    authenticate
         | 
| 12 | 
            +
                  end
         | 
| 13 | 
            +
                  
         | 
| 14 | 
            +
                  private
         | 
| 15 | 
            +
                  
         | 
| 16 | 
            +
                    def authenticate
         | 
| 17 | 
            +
                      authenticate_or_request_with_http_basic do |username, password|
         | 
| 18 | 
            +
                        username == Rails.application.credentials.dig(:spina, :username) && password == Rails.application.credentials.dig(:spina, :password)
         | 
| 19 | 
            +
                      end
         | 
| 20 | 
            +
                    end
         | 
| 21 | 
            +
                
         | 
| 22 | 
            +
                end
         | 
| 23 | 
            +
              end
         | 
| 24 | 
            +
            end
         | 
| @@ -0,0 +1,32 @@ | |
| 1 | 
            +
            module Spina
         | 
| 2 | 
            +
              module Authentication
         | 
| 3 | 
            +
                module Sessions
         | 
| 4 | 
            +
                  extend ActiveSupport::Concern
         | 
| 5 | 
            +
                  
         | 
| 6 | 
            +
                  included do
         | 
| 7 | 
            +
                    helper_method :current_spina_user
         | 
| 8 | 
            +
                    helper_method :logged_in?
         | 
| 9 | 
            +
                    helper_method :logout_path
         | 
| 10 | 
            +
                  end
         | 
| 11 | 
            +
                  
         | 
| 12 | 
            +
                  def current_spina_user
         | 
| 13 | 
            +
                    Spina::Current.user ||= User.find_by(id: session[:spina_user_id]) if session[:spina_user_id]
         | 
| 14 | 
            +
                  end
         | 
| 15 | 
            +
                  
         | 
| 16 | 
            +
                  def logged_in?
         | 
| 17 | 
            +
                    current_spina_user
         | 
| 18 | 
            +
                  end
         | 
| 19 | 
            +
                  
         | 
| 20 | 
            +
                  def logout_path
         | 
| 21 | 
            +
                    spina.admin_logout_path
         | 
| 22 | 
            +
                  end
         | 
| 23 | 
            +
                  
         | 
| 24 | 
            +
                  private
         | 
| 25 | 
            +
                  
         | 
| 26 | 
            +
                    def authenticate
         | 
| 27 | 
            +
                      redirect_to admin_login_path, flash: {information: I18n.t('spina.notifications.login')} unless logged_in?
         | 
| 28 | 
            +
                    end
         | 
| 29 | 
            +
                
         | 
| 30 | 
            +
                end
         | 
| 31 | 
            +
              end
         | 
| 32 | 
            +
            end
         | 
    
        data/lib/spina/engine.rb
    CHANGED
    
    | @@ -1,4 +1,5 @@ | |
| 1 1 | 
             
            require 'sass-rails'
         | 
| 2 | 
            +
            require 'importmap-rails'
         | 
| 2 3 | 
             
            require 'turbo-rails'
         | 
| 3 4 | 
             
            require 'stimulus-rails'
         | 
| 4 5 | 
             
            require 'ancestry'
         | 
| @@ -6,8 +7,10 @@ require 'breadcrumbs_on_rails' | |
| 6 7 | 
             
            require 'kaminari'
         | 
| 7 8 | 
             
            require 'mobility'
         | 
| 8 9 | 
             
            require 'rack-rewrite'
         | 
| 10 | 
            +
            require 'babosa'
         | 
| 9 11 | 
             
            require 'attr_json'
         | 
| 10 12 | 
             
            require 'view_component/engine'
         | 
| 13 | 
            +
            require 'jsonapi/serializer'
         | 
| 11 14 |  | 
| 12 15 | 
             
            module Spina
         | 
| 13 16 | 
             
              class Engine < ::Rails::Engine
         | 
| @@ -15,10 +18,12 @@ module Spina | |
| 15 18 |  | 
| 16 19 | 
             
                config.autoload_paths += %W( #{config.root}/lib )
         | 
| 17 20 |  | 
| 18 | 
            -
                config.to_prepare do | 
| 21 | 
            +
                config.to_prepare do
         | 
| 19 22 | 
             
                  # Require decorators from main application
         | 
| 20 | 
            -
                   | 
| 21 | 
            -
                    Rails. | 
| 23 | 
            +
                  unless Spina.config.disable_decorator_load
         | 
| 24 | 
            +
                    Dir.glob(Rails.root + "app/decorators/**/*_decorator.rb").each do |decorator|
         | 
| 25 | 
            +
                      require_dependency(decorator)
         | 
| 26 | 
            +
                    end
         | 
| 22 27 | 
             
                  end
         | 
| 23 28 |  | 
| 24 29 | 
             
                  # Register JSON part types for editing content
         | 
| @@ -33,11 +38,17 @@ module Spina | |
| 33 38 | 
             
                    Spina::Parts::Attachment
         | 
| 34 39 | 
             
                  )
         | 
| 35 40 | 
             
                end
         | 
| 36 | 
            -
             | 
| 37 | 
            -
                initializer "spina. | 
| 38 | 
            -
                   | 
| 39 | 
            -
                     | 
| 41 | 
            +
                
         | 
| 42 | 
            +
                initializer "spina.importmap" do
         | 
| 43 | 
            +
                  Spina.config.importmap.draw do
         | 
| 44 | 
            +
                    # Stimulus & Turbo
         | 
| 45 | 
            +
                    pin "@hotwired/stimulus", to: "stimulus.js"
         | 
| 46 | 
            +
                    pin "@hotwired/stimulus-autoloader", to: "stimulus-autoloader.js"
         | 
| 47 | 
            +
                    pin "@hotwired/turbo-rails", to: "turbo.js"
         | 
| 48 | 
            +
                    
         | 
| 49 | 
            +
                    pin_all_from Spina::Engine.root.join("app/assets/javascripts/spina"), append_base_path: true
         | 
| 40 50 | 
             
                  end
         | 
| 41 51 | 
             
                end
         | 
| 52 | 
            +
                
         | 
| 42 53 | 
             
              end
         | 
| 43 54 | 
             
            end
         | 
    
        data/lib/spina/railtie.rb
    CHANGED
    
    | @@ -2,7 +2,7 @@ module Spina | |
| 2 2 | 
             
              class Railtie < Rails::Railtie
         | 
| 3 3 |  | 
| 4 4 | 
             
                initializer "spina.assets.precompile" do |app|
         | 
| 5 | 
            -
                  app.config.assets.precompile += %w(spina/manifest | 
| 5 | 
            +
                  app.config.assets.precompile += %w(spina/manifest)
         | 
| 6 6 | 
             
                end
         | 
| 7 7 |  | 
| 8 8 | 
             
                ActiveSupport.on_load(:action_controller) do
         | 
    
        data/lib/spina/version.rb
    CHANGED
    
    
    
        data/lib/tasks/spina_tasks.rake
    CHANGED
    
    | @@ -25,7 +25,7 @@ namespace :spina do | |
| 25 25 | 
             
                desc "Compile Tailwind.css for Spina"
         | 
| 26 26 | 
             
                task :compile do
         | 
| 27 27 | 
             
                  Dir.chdir(File.join(__dir__, "../..")) do
         | 
| 28 | 
            -
                    system "npx tailwindcss-cli@latest build ./app/assets/stylesheets/spina/tailwind/custom.css -o ./app/assets/stylesheets/spina/_tailwind.css -c ./app/assets/config/spina/tailwind.config.js"
         | 
| 28 | 
            +
                    system "npx tailwindcss-cli@latest build -i ./app/assets/stylesheets/spina/tailwind/custom.css -o ./app/assets/stylesheets/spina/_tailwind.css -c ./app/assets/config/spina/tailwind.config.js"
         | 
| 29 29 | 
             
                  end
         | 
| 30 30 | 
             
                end
         | 
| 31 31 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: spina
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2. | 
| 4 | 
            +
              version: 2.3.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Bram Jetten
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021- | 
| 11 | 
            +
            date: 2021-08-16 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -126,16 +126,16 @@ dependencies: | |
| 126 126 | 
             
              name: mobility
         | 
| 127 127 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 128 128 | 
             
                requirements:
         | 
| 129 | 
            -
                - -  | 
| 129 | 
            +
                - - ">="
         | 
| 130 130 | 
             
                  - !ruby/object:Gem::Version
         | 
| 131 | 
            -
                    version: 1.1. | 
| 131 | 
            +
                    version: 1.1.3
         | 
| 132 132 | 
             
              type: :runtime
         | 
| 133 133 | 
             
              prerelease: false
         | 
| 134 134 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 135 135 | 
             
                requirements:
         | 
| 136 | 
            -
                - -  | 
| 136 | 
            +
                - - ">="
         | 
| 137 137 | 
             
                  - !ruby/object:Gem::Version
         | 
| 138 | 
            -
                    version: 1.1. | 
| 138 | 
            +
                    version: 1.1.3
         | 
| 139 139 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 140 140 | 
             
              name: rack-rewrite
         | 
| 141 141 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -178,8 +178,50 @@ dependencies: | |
| 178 178 | 
             
                - - "~>"
         | 
| 179 179 | 
             
                  - !ruby/object:Gem::Version
         | 
| 180 180 | 
             
                    version: '2.32'
         | 
| 181 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 182 | 
            +
              name: importmap-rails
         | 
| 183 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 184 | 
            +
                requirements:
         | 
| 185 | 
            +
                - - "~>"
         | 
| 186 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 187 | 
            +
                    version: 0.2.2
         | 
| 188 | 
            +
              type: :runtime
         | 
| 189 | 
            +
              prerelease: false
         | 
| 190 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 191 | 
            +
                requirements:
         | 
| 192 | 
            +
                - - "~>"
         | 
| 193 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 194 | 
            +
                    version: 0.2.2
         | 
| 181 195 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 182 196 | 
             
              name: turbo-rails
         | 
| 197 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 198 | 
            +
                requirements:
         | 
| 199 | 
            +
                - - "~>"
         | 
| 200 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 201 | 
            +
                    version: 0.7.2
         | 
| 202 | 
            +
              type: :runtime
         | 
| 203 | 
            +
              prerelease: false
         | 
| 204 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 205 | 
            +
                requirements:
         | 
| 206 | 
            +
                - - "~>"
         | 
| 207 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 208 | 
            +
                    version: 0.7.2
         | 
| 209 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 210 | 
            +
              name: stimulus-rails
         | 
| 211 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 212 | 
            +
                requirements:
         | 
| 213 | 
            +
                - - "~>"
         | 
| 214 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 215 | 
            +
                    version: 0.3.3
         | 
| 216 | 
            +
              type: :runtime
         | 
| 217 | 
            +
              prerelease: false
         | 
| 218 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 219 | 
            +
                requirements:
         | 
| 220 | 
            +
                - - "~>"
         | 
| 221 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 222 | 
            +
                    version: 0.3.3
         | 
| 223 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 224 | 
            +
              name: babosa
         | 
| 183 225 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 184 226 | 
             
                requirements:
         | 
| 185 227 | 
             
                - - ">="
         | 
| @@ -193,7 +235,7 @@ dependencies: | |
| 193 235 | 
             
                  - !ruby/object:Gem::Version
         | 
| 194 236 | 
             
                    version: '0'
         | 
| 195 237 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 196 | 
            -
              name:  | 
| 238 | 
            +
              name: jsonapi-serializer
         | 
| 197 239 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 198 240 | 
             
                requirements:
         | 
| 199 241 | 
             
                - - ">="
         | 
| @@ -758,6 +800,7 @@ files: | |
| 758 800 | 
             
            - app/assets/images/spina/favicon.png
         | 
| 759 801 | 
             
            - app/assets/images/spina/spina.png
         | 
| 760 802 | 
             
            - app/assets/images/spina/spina.svg
         | 
| 803 | 
            +
            - app/assets/javascripts/spina/application.js
         | 
| 761 804 | 
             
            - app/assets/javascripts/spina/controllers/attachment_picker_controller.js
         | 
| 762 805 | 
             
            - app/assets/javascripts/spina/controllers/autofocus_controller.js
         | 
| 763 806 | 
             
            - app/assets/javascripts/spina/controllers/button_controller.js
         | 
| @@ -787,7 +830,6 @@ files: | |
| 787 830 | 
             
            - app/assets/javascripts/spina/controllers/toggle_controller.js
         | 
| 788 831 | 
             
            - app/assets/javascripts/spina/controllers/trix_controller.js
         | 
| 789 832 | 
             
            - app/assets/javascripts/spina/controllers/unique_id_controller.js
         | 
| 790 | 
            -
            - app/assets/javascripts/spina/importmap.json.erb
         | 
| 791 833 | 
             
            - app/assets/javascripts/spina/libraries/canvas-confetti.js
         | 
| 792 834 | 
             
            - app/assets/javascripts/spina/libraries/canvas-confetti@1.3.2.js
         | 
| 793 835 | 
             
            - app/assets/javascripts/spina/libraries/form-request-submit-polyfill.js
         | 
| @@ -851,7 +893,9 @@ files: | |
| 851 893 | 
             
            - app/components/spina/user_interface/modal_component.rb
         | 
| 852 894 | 
             
            - app/components/spina/user_interface/tab_link_component.html.erb
         | 
| 853 895 | 
             
            - app/components/spina/user_interface/tab_link_component.rb
         | 
| 854 | 
            -
            - app/controllers/concerns/spina/ | 
| 896 | 
            +
            - app/controllers/concerns/spina/api/paginable.rb
         | 
| 897 | 
            +
            - app/controllers/concerns/spina/current_account.rb
         | 
| 898 | 
            +
            - app/controllers/concerns/spina/current_theme.rb
         | 
| 855 899 | 
             
            - app/controllers/concerns/spina/frontend.rb
         | 
| 856 900 | 
             
            - app/controllers/spina/admin/accounts_controller.rb
         | 
| 857 901 | 
             
            - app/controllers/spina/admin/admin_controller.rb
         | 
| @@ -871,6 +915,11 @@ files: | |
| 871 915 | 
             
            - app/controllers/spina/admin/settings_controller.rb
         | 
| 872 916 | 
             
            - app/controllers/spina/admin/theme_controller.rb
         | 
| 873 917 | 
             
            - app/controllers/spina/admin/users_controller.rb
         | 
| 918 | 
            +
            - app/controllers/spina/api/api_controller.rb
         | 
| 919 | 
            +
            - app/controllers/spina/api/images_controller.rb
         | 
| 920 | 
            +
            - app/controllers/spina/api/navigations_controller.rb
         | 
| 921 | 
            +
            - app/controllers/spina/api/pages_controller.rb
         | 
| 922 | 
            +
            - app/controllers/spina/api/resources_controller.rb
         | 
| 874 923 | 
             
            - app/controllers/spina/application_controller.rb
         | 
| 875 924 | 
             
            - app/controllers/spina/pages_controller.rb
         | 
| 876 925 | 
             
            - app/controllers/spina/sitemaps_controller.rb
         | 
| @@ -913,6 +962,11 @@ files: | |
| 913 962 | 
             
            - app/models/spina/user.rb
         | 
| 914 963 | 
             
            - app/presenters/spina/content_presenter.rb
         | 
| 915 964 | 
             
            - app/presenters/spina/menu_presenter.rb
         | 
| 965 | 
            +
            - app/serializers/spina/api/base_serializer.rb
         | 
| 966 | 
            +
            - app/serializers/spina/api/image_serializer.rb
         | 
| 967 | 
            +
            - app/serializers/spina/api/navigation_serializer.rb
         | 
| 968 | 
            +
            - app/serializers/spina/api/page_serializer.rb
         | 
| 969 | 
            +
            - app/serializers/spina/api/resource_serializer.rb
         | 
| 916 970 | 
             
            - app/views/layouts/spina/admin/admin.html.erb
         | 
| 917 971 | 
             
            - app/views/layouts/spina/admin/application.html.erb
         | 
| 918 972 | 
             
            - app/views/layouts/spina/admin/sessions.html.erb
         | 
| @@ -1035,8 +1089,9 @@ files: | |
| 1035 1089 | 
             
            - lib/spina/admin_sectionable.rb
         | 
| 1036 1090 | 
             
            - lib/spina/attr_json_monkeypatch.rb
         | 
| 1037 1091 | 
             
            - lib/spina/attr_json_spina_parts_model.rb
         | 
| 1092 | 
            +
            - lib/spina/authentication/basic.rb
         | 
| 1093 | 
            +
            - lib/spina/authentication/sessions.rb
         | 
| 1038 1094 | 
             
            - lib/spina/engine.rb
         | 
| 1039 | 
            -
            - lib/spina/importmap_helper.rb
         | 
| 1040 1095 | 
             
            - lib/spina/part.rb
         | 
| 1041 1096 | 
             
            - lib/spina/plugin.rb
         | 
| 1042 1097 | 
             
            - lib/spina/railtie.rb
         |