proscenium 0.11.0.pre.10-aarch64-linux → 0.11.0.pre.12-aarch64-linux
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 +4 -4
 - data/lib/proscenium/ext/proscenium +0 -0
 - data/lib/proscenium/helper.rb +6 -2
 - data/lib/proscenium/libs/react-manager/index.jsx +15 -6
 - data/lib/proscenium/railtie.rb +5 -10
 - data/lib/proscenium/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e5ea5bf8a9b40ac503861e9f76796872bbbee378df07abed6e1ba31d78e44d2a
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 00eb011c4c403cfa6d9aa120ec4714338b8cb6d575094f9f00700a93455315f7
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: dc2f730d0b005fbf987a17f779e3d380d7a66eff2e76971e46d3a903688f83494c4a202c42c10cd8dd30991b273c537ad6666db70ff8af20e6165b0259056dcf
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 9c864602d3c3acb2cf9f5d1149c5580bad6337590092c5106e0bb08a3a9104362f22295af55ecf9e0ef0c4d3d2e731b259f8e97b366a4c2885c7189fde0d9672
         
     | 
| 
         Binary file 
     | 
    
        data/lib/proscenium/helper.rb
    CHANGED
    
    | 
         @@ -77,10 +77,14 @@ module Proscenium 
     | 
|
| 
       77 
77 
     | 
    
         | 
| 
       78 
78 
     | 
    
         
             
                    if extract_lazy_scripts
         
     | 
| 
       79 
79 
     | 
    
         
             
                      content_for :proscenium_lazy_scripts do
         
     | 
| 
       80 
     | 
    
         
            -
                         
     | 
| 
      
 80 
     | 
    
         
            +
                        tag.script type: 'application/json', id: 'prosceniumLazyScripts' do
         
     | 
| 
      
 81 
     | 
    
         
            +
                          raw scripts.to_json
         
     | 
| 
      
 82 
     | 
    
         
            +
                        end
         
     | 
| 
       81 
83 
     | 
    
         
             
                      end
         
     | 
| 
       82 
84 
     | 
    
         
             
                    else
         
     | 
| 
       83 
     | 
    
         
            -
                      out <<  
     | 
| 
      
 85 
     | 
    
         
            +
                      out << tag.script(type: 'application/json', id: 'prosceniumLazyScripts') do
         
     | 
| 
      
 86 
     | 
    
         
            +
                        raw scripts.to_json
         
     | 
| 
      
 87 
     | 
    
         
            +
                      end
         
     | 
| 
       84 
88 
     | 
    
         
             
                    end
         
     | 
| 
       85 
89 
     | 
    
         
             
                  else
         
     | 
| 
       86 
90 
     | 
    
         
             
                    Importer.each_javascript(delete: true) do |path, _|
         
     | 
| 
         @@ -1,7 +1,16 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
      
 1 
     | 
    
         
            +
            window.Proscenium = window.Proscenium || { lazyScripts: {} };
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            const element = document.querySelector("#prosceniumLazyScripts");
         
     | 
| 
      
 4 
     | 
    
         
            +
            if (element) {
         
     | 
| 
      
 5 
     | 
    
         
            +
              const scripts = JSON.parse(element.text);
         
     | 
| 
      
 6 
     | 
    
         
            +
              window.Proscenium.lazyScripts = {
         
     | 
| 
      
 7 
     | 
    
         
            +
                ...window.Proscenium.lazyScripts,
         
     | 
| 
      
 8 
     | 
    
         
            +
                ...scripts,
         
     | 
| 
      
 9 
     | 
    
         
            +
              };
         
     | 
| 
      
 10 
     | 
    
         
            +
            }
         
     | 
| 
       2 
11 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            elements.length > 0 && init();
         
     | 
| 
      
 12 
     | 
    
         
            +
            const elements = document.querySelectorAll("[data-proscenium-component-path]");
         
     | 
| 
      
 13 
     | 
    
         
            +
            elements.length > 0 && init(elements);
         
     | 
| 
       5 
14 
     | 
    
         | 
| 
       6 
15 
     | 
    
         
             
            function init() {
         
     | 
| 
       7 
16 
     | 
    
         
             
              /**
         
     | 
| 
         @@ -20,12 +29,12 @@ function init() { 
     | 
|
| 
       20 
29 
     | 
    
         
             
                // For testing and simulation of slow connections.
         
     | 
| 
       21 
30 
     | 
    
         
             
                // const sim = new Promise((resolve) => setTimeout(resolve, 5000));
         
     | 
| 
       22 
31 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
                if (! 
     | 
| 
       24 
     | 
    
         
            -
                  throw `[proscenium/react/manager] Cannot load component ${path} (not found in  
     | 
| 
      
 32 
     | 
    
         
            +
                if (!window.Proscenium.lazyScripts[path]) {
         
     | 
| 
      
 33 
     | 
    
         
            +
                  throw `[proscenium/react/manager] Cannot load component ${path} (not found in Proscenium.lazyScripts)`;
         
     | 
| 
       25 
34 
     | 
    
         
             
                }
         
     | 
| 
       26 
35 
     | 
    
         | 
| 
       27 
36 
     | 
    
         
             
                const react = import("@proscenium/react-manager/react");
         
     | 
| 
       28 
     | 
    
         
            -
                const Component = import(window. 
     | 
| 
      
 37 
     | 
    
         
            +
                const Component = import(window.Proscenium.lazyScripts[path].outpath);
         
     | 
| 
       29 
38 
     | 
    
         | 
| 
       30 
39 
     | 
    
         
             
                const forwardChildren =
         
     | 
| 
       31 
40 
     | 
    
         
             
                  "prosceniumComponentForwardChildren" in element.dataset &&
         
     | 
    
        data/lib/proscenium/railtie.rb
    CHANGED
    
    | 
         @@ -45,6 +45,11 @@ module Proscenium 
     | 
|
| 
       45 
45 
     | 
    
         
             
                  'Proscenium::Builder::BuildError' => 'build_error'
         
     | 
| 
       46 
46 
     | 
    
         
             
                }
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
      
 48 
     | 
    
         
            +
                initializer 'proscenium.debugging' do
         
     | 
| 
      
 49 
     | 
    
         
            +
                  ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS << root.join('lib', 'proscenium',
         
     | 
| 
      
 50 
     | 
    
         
            +
                                                                                 'templates').to_s
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
       48 
53 
     | 
    
         
             
                initializer 'proscenium.middleware' do |app|
         
     | 
| 
       49 
54 
     | 
    
         
             
                  app.middleware.insert_after ActionDispatch::Static, Middleware
         
     | 
| 
       50 
55 
     | 
    
         
             
                  # app.middleware.insert_after ActionDispatch::Static, Rack::ETag, 'no-cache'
         
     | 
| 
         @@ -69,13 +74,3 @@ module Proscenium 
     | 
|
| 
       69 
74 
     | 
    
         
             
                end
         
     | 
| 
       70 
75 
     | 
    
         
             
              end
         
     | 
| 
       71 
76 
     | 
    
         
             
            end
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
            # Monkey path ActionDispatch::DebugView to use our custom error template on BuildError exceptions.
         
     | 
| 
       74 
     | 
    
         
            -
            class ActionDispatch::DebugView
         
     | 
| 
       75 
     | 
    
         
            -
              def initialize(assigns)
         
     | 
| 
       76 
     | 
    
         
            -
                paths = [RESCUES_TEMPLATE_PATH,
         
     | 
| 
       77 
     | 
    
         
            -
                         Proscenium::Railtie.root.join('lib', 'proscenium', 'templates').to_s]
         
     | 
| 
       78 
     | 
    
         
            -
                lookup_context = ActionView::LookupContext.new(paths)
         
     | 
| 
       79 
     | 
    
         
            -
                super(lookup_context, assigns, nil)
         
     | 
| 
       80 
     | 
    
         
            -
              end
         
     | 
| 
       81 
     | 
    
         
            -
            end
         
     | 
    
        data/lib/proscenium/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: proscenium
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.11.0.pre. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.11.0.pre.12
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: aarch64-linux
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Joel Moss
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2023-10- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-10-11 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activesupport
         
     |