proscenium 0.19.0.beta12-x86_64-darwin → 0.19.0.beta14-x86_64-darwin

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: dfc68f54b4be7efcabe0783b147b1bb6466d6dea8c689711940dd5ae6277b22c
4
- data.tar.gz: 2feb21a07aded62add9489b02c2884ca7350bdd879799b19084b4335deb84c77
3
+ metadata.gz: 94da05dd4f0d4e288189aef775e7a78404fe19905962ce178abf2e68448a5fd7
4
+ data.tar.gz: dc2b2907f484a2a5054fc82109c7fca15e7b77ce12b782628afed87d62cf7a28
5
5
  SHA512:
6
- metadata.gz: df41e6a5821b3f255122cb10d957af988c2e6f1da774a66483d6a33e2050553b67f41bf58a775755ee074a5a5ac95bc497af73770a67aa4d18265a8db0102f99
7
- data.tar.gz: ad427a15f665fc700c9050760a287305d4f80d806ac0d2b41b2281169a5dfd71fdcc3648e36517869de8c9ed9448665d784ccb8494e96a77212f216195a40460
6
+ metadata.gz: 80bd77731186797ac9993d3580280231ec025e4df64df43b4675523b9ce4ca69ca3bc2832c99a14aba69e93f4786d5fca24031f2d93863d53162c365e1d5638b
7
+ data.tar.gz: 40d1e1a0b9607009803d573e74bd6e514f9758568dcb2713b1943e8b25ec77d79e397fd61088f71a9d763be83e4337c65f01db5f768751ccf1ba7b4fb5558fd2
@@ -13,7 +13,7 @@ module Proscenium
13
13
  bundle = {}
14
14
  specs.each do |s|
15
15
  bundle[s.name] = if s.name == 'proscenium'
16
- Pathname(s.full_gem_path).join('lib/proscenium').to_s
16
+ Pathname(s.full_gem_path).join('lib/proscenium/ui').to_s
17
17
  else
18
18
  s.full_gem_path
19
19
  end
@@ -1,6 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium::CssModule
4
+ extend ActiveSupport::Autoload
5
+
6
+ autoload :Path
7
+ autoload :Transformer
8
+
4
9
  class TransformError < StandardError
5
10
  def initialize(name, additional_msg = nil)
6
11
  msg = "Failed to transform CSS module `#{name}`"
@@ -2,9 +2,15 @@
2
2
 
3
3
  module Proscenium
4
4
  class Middleware
5
+ extend ActiveSupport::Autoload
6
+
5
7
  # Error when the build command fails.
6
8
  class BuildError < StandardError; end
7
9
 
10
+ autoload :Base
11
+ autoload :Esbuild
12
+ autoload :RubyGems
13
+
8
14
  def initialize(app)
9
15
  @app = app
10
16
 
@@ -4,6 +4,12 @@ require 'phlex-rails'
4
4
 
5
5
  module Proscenium
6
6
  class Phlex < ::Phlex::HTML
7
+ extend ActiveSupport::Autoload
8
+
9
+ autoload :CssModules
10
+ autoload :ReactComponent
11
+ autoload :AssetInclusions
12
+
7
13
  include Proscenium::SourcePath
8
14
  include CssModules
9
15
  include AssetInclusions
@@ -33,6 +33,11 @@ module Proscenium
33
33
  end
34
34
  end
35
35
 
36
+ initializer 'proscenium.debugging' do
37
+ tpl_path = root.join('lib', 'proscenium', 'templates').to_s
38
+ ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS << tpl_path
39
+ end
40
+
36
41
  initializer 'proscenium.middleware' do |app|
37
42
  app.middleware.insert_after ActionDispatch::Static, Proscenium::Middleware
38
43
  end
@@ -50,5 +55,15 @@ module Proscenium
50
55
  ActionView::PartialRenderer.prepend Monkey::PartialRenderer
51
56
  end
52
57
  end
58
+
59
+ initializer 'proscenium.public_path' do |app|
60
+ if app.config.public_file_server.enabled
61
+ headers = app.config.public_file_server.headers || {}
62
+ index = app.config.public_file_server.index_name || 'index'
63
+
64
+ app.middleware.insert_after(ActionDispatch::Static, ActionDispatch::Static,
65
+ root.join('public').to_s, index:, headers:)
66
+ end
67
+ end
53
68
  end
54
69
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.19.0.beta12'
4
+ VERSION = '0.19.0.beta14'
5
5
  end
data/lib/proscenium.rb CHANGED
@@ -1,13 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'zeitwerk'
4
- require 'proscenium/railtie'
5
-
6
- loader = Zeitwerk::Loader.for_gem
7
- loader.ignore "#{__dir__}/proscenium/core_ext/object/css_module_ivars.rb"
8
- loader.setup
3
+ require 'active_support'
9
4
 
10
5
  module Proscenium
6
+ extend ActiveSupport::Autoload
7
+
11
8
  FILE_EXTENSIONS = ['js', 'mjs', 'ts', 'jsx', 'tsx', 'css', 'js.map', 'mjs.map', 'jsx.map',
12
9
  'ts.map', 'tsx.map', 'css.map'].freeze
13
10
 
@@ -23,6 +20,22 @@ module Proscenium
23
20
  # Environment variables that should always be passed to the builder.
24
21
  DEFAULT_ENV_VARS = Set['RAILS_ENV', 'NODE_ENV'].freeze
25
22
 
23
+ autoload :SourcePath
24
+ autoload :Utils
25
+ autoload :Monkey
26
+ autoload :Middleware
27
+ autoload :EnsureLoaded
28
+ autoload :SideLoad
29
+ autoload :CssModule
30
+ autoload :ReactComponentable
31
+ autoload :ViewComponent
32
+ autoload :Phlex
33
+ autoload :Helper
34
+ autoload :Builder
35
+ autoload :Importer
36
+ autoload :Resolver
37
+ autoload :BundledGems
38
+
26
39
  class Deprecator
27
40
  def deprecation_warning(name, message, _caller_backtrace = nil)
28
41
  msg = "`#{name}` is deprecated and will be removed in a near future release of Proscenium"
@@ -52,3 +65,5 @@ module Proscenium
52
65
  end
53
66
  end
54
67
  end
68
+
69
+ require 'proscenium/railtie'
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.19.0.beta12
4
+ version: 0.19.0.beta14
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-22 00:00:00.000000000 Z
11
+ date: 2025-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -72,20 +72,6 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: 1.1.1
75
- - !ruby/object:Gem::Dependency
76
- name: zeitwerk
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: 2.7.2
82
- type: :runtime
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: 2.7.2
89
75
  description:
90
76
  email:
91
77
  - joel@developwithstyle.com