proscenium 0.18.0-aarch64-linux → 0.19.0-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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -174
  3. data/lib/proscenium/builder.rb +36 -100
  4. data/lib/proscenium/bundled_gems.rb +37 -0
  5. data/lib/proscenium/css_module/path.rb +2 -1
  6. data/lib/proscenium/css_module/transformer.rb +1 -1
  7. data/lib/proscenium/css_module.rb +16 -9
  8. data/lib/proscenium/ensure_loaded.rb +14 -10
  9. data/lib/proscenium/ext/proscenium +0 -0
  10. data/lib/proscenium/ext/proscenium.h +9 -36
  11. data/lib/proscenium/helper.rb +4 -22
  12. data/lib/proscenium/importer.rb +39 -21
  13. data/lib/proscenium/log_subscriber.rb +11 -10
  14. data/lib/proscenium/middleware/base.rb +11 -6
  15. data/lib/proscenium/middleware/esbuild.rb +8 -9
  16. data/lib/proscenium/middleware/ruby_gems.rb +23 -0
  17. data/lib/proscenium/middleware.rb +26 -24
  18. data/lib/proscenium/monkey.rb +5 -14
  19. data/lib/proscenium/railtie.rb +11 -53
  20. data/lib/proscenium/{libs/react-manager → react-manager}/index.jsx +3 -22
  21. data/lib/proscenium/react_componentable.rb +2 -3
  22. data/lib/proscenium/resolver.rb +14 -23
  23. data/lib/proscenium/side_load.rb +41 -74
  24. data/lib/proscenium/utils.rb +33 -0
  25. data/lib/proscenium/version.rb +1 -1
  26. data/lib/proscenium.rb +2 -12
  27. metadata +11 -99
  28. data/lib/proscenium/core_ext/object/css_module_ivars.rb +0 -19
  29. data/lib/proscenium/css_module/rewriter.rb +0 -44
  30. data/lib/proscenium/libs/custom_element.js +0 -54
  31. data/lib/proscenium/libs/stimulus-loading.js +0 -65
  32. data/lib/proscenium/libs/test.js +0 -1
  33. data/lib/proscenium/libs/ujs/class.js +0 -15
  34. data/lib/proscenium/libs/ujs/data_confirm.js +0 -23
  35. data/lib/proscenium/libs/ujs/data_disable_with.js +0 -68
  36. data/lib/proscenium/libs/ujs/index.js +0 -9
  37. data/lib/proscenium/middleware/engines.rb +0 -45
  38. data/lib/proscenium/middleware/runtime.rb +0 -18
  39. data/lib/proscenium/phlex/asset_inclusions.rb +0 -17
  40. data/lib/proscenium/phlex/css_modules.rb +0 -79
  41. data/lib/proscenium/phlex/react_component.rb +0 -32
  42. data/lib/proscenium/phlex.rb +0 -42
  43. data/lib/proscenium/ui/breadcrumbs/component.module.css +0 -14
  44. data/lib/proscenium/ui/breadcrumbs/component.rb +0 -73
  45. data/lib/proscenium/ui/breadcrumbs/computed_element.rb +0 -69
  46. data/lib/proscenium/ui/breadcrumbs/control.rb +0 -95
  47. data/lib/proscenium/ui/breadcrumbs/mixins.css +0 -83
  48. data/lib/proscenium/ui/breadcrumbs.rb +0 -72
  49. data/lib/proscenium/ui/component.rb +0 -7
  50. data/lib/proscenium/ui/test.js +0 -1
  51. data/lib/proscenium/ui.rb +0 -8
  52. data/lib/proscenium/view_component/css_modules.rb +0 -11
  53. data/lib/proscenium/view_component/react_component.rb +0 -22
  54. data/lib/proscenium/view_component/sideload.rb +0 -4
  55. data/lib/proscenium/view_component.rb +0 -38
  56. /data/lib/proscenium/{libs/react-manager → react-manager}/react.js +0 -0
@@ -1,72 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Proscenium::UI
4
- # Provides breadcrumb functionality for controllers and views. Breadcrumbs are a type of
5
- # navigation that show the user where they are in the application's hierarchy.
6
- # The `Proscenium::UI::Breadcrumbs::Control` module provides the `add_breadcrumb` and
7
- # `prepend_breadcrumb` class methods for adding breadcrumb elements, and is intended to be
8
- # included in your controllers.
9
- #
10
- # The `add_breadcrumb` method adds a new breadcrumb element to the end of the collection, while
11
- # the `prepend_breadcrumb` method adds a new breadcrumb element to the beginning of the
12
- # collection. Both methods take a name, and path as arguments. The name argument is the name or
13
- # content of the breadcrumb, while the path argument is the path (route) to use as the HREF for
14
- # the breadcrumb.
15
- #
16
- # class UsersController < ApplicationController
17
- # include Proscenium::UI::Breadcrumbs::Control
18
- # add_breadcrumb 'Users', :users_path
19
- # end
20
- #
21
- # Display the breadcrumbs in your views with the breadcrumbs component.
22
- # @see `Proscenium::UI::Breadcrumbs::Component`.
23
- #
24
- # At it's simplest, you can add a breadcrumb with a name of "User", and a path of "/users" like
25
- # this:
26
- #
27
- # add_breadcrumb 'Foo', '/foo'
28
- #
29
- # The value of the path is always passed to `url_for` before being rendered. It is also optional,
30
- # and if omitted, the breadcrumb will be rendered as plain text.
31
- #
32
- # Both name and path can be given a Symbol, which can be used to call a method of the same name on
33
- # the controller. If a Symbol is given as the path, and no method of the same name exists, then
34
- # `url_for` will be called with the Symbol as the argument. Likewise, if an Array is given as the
35
- # path, then `url_for` will be called with the Array as the argument.
36
- #
37
- # If a Symbol is given as the path or name, and it begins with `@` (eg. `:@foo`), then the
38
- # instance variable of the same name will be called.
39
- #
40
- # add_breadcrumb :@foo, :@bar
41
- #
42
- # A Proc can also be given as the name and/or path. The Proc will be called within the context of
43
- # the controller.
44
- #
45
- # add_breadcrumb -> { @foo }, -> { @bar }
46
- #
47
- # Passing an object that responds to `#for_breadcrumb` as the name will call that method on the
48
- # object to get the breadcrumb name.
49
- #
50
- module Breadcrumbs
51
- extend ActiveSupport::Autoload
52
-
53
- autoload :Control
54
- autoload :ComputedElement
55
- autoload :Component
56
-
57
- # Represents a navigation element in the breadcrumb collection.
58
- class Element
59
- attr_accessor :name, :path, :options
60
-
61
- # @param name [String] the element/link name
62
- # @param path [String] the element/link URL
63
- # @param options [Hash] the element/link options
64
- # @return [Element]
65
- def initialize(name, path = nil, options = {})
66
- self.name = name
67
- self.path = path
68
- self.options = options
69
- end
70
- end
71
- end
72
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Proscenium::UI
4
- class Component < Proscenium::Phlex
5
- self.abstract_class = true
6
- end
7
- end
@@ -1 +0,0 @@
1
- console.log("/proscenium/ui/test.js");
data/lib/proscenium/ui.rb DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Proscenium::UI
4
- extend ActiveSupport::Autoload
5
-
6
- autoload :Component
7
- autoload :Breadcrumbs
8
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Proscenium
4
- module ViewComponent::CssModules
5
- include Proscenium::CssModule
6
-
7
- def self.included(base)
8
- base.extend CssModule::Path
9
- end
10
- end
11
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Proscenium
4
- # Renders a <div> for use with React components, with data attributes specifying the component
5
- # path and props.
6
- #
7
- # If a content block is given, that content will be rendered inside the component, allowing for a
8
- # "loading" UI. If no block is given, then a "loading..." text will be rendered. It is intended
9
- # that the component is mounted to this div, and the loading UI will then be replaced with the
10
- # component's rendered output.
11
- class ViewComponent::ReactComponent < ViewComponent
12
- self.abstract_class = true
13
-
14
- include ReactComponentable
15
-
16
- def call
17
- tag.send root_tag, data: data_attributes do
18
- tag.div content || 'loading...'
19
- end
20
- end
21
- end
22
- end
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Proscenium::ViewComponent::Sideload
4
- end
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'view_component'
4
-
5
- class Proscenium::ViewComponent < ViewComponent::Base
6
- extend ActiveSupport::Autoload
7
-
8
- autoload :Sideload
9
- autoload :ReactComponent
10
- autoload :CssModules
11
-
12
- include Proscenium::SourcePath
13
- include CssModules
14
-
15
- module Sideload
16
- def before_render
17
- Proscenium::SideLoad.sideload_inheritance_chain self, controller.sideload_assets_options
18
-
19
- super
20
- end
21
- end
22
-
23
- class_attribute :sideload_assets_options
24
-
25
- class << self
26
- attr_accessor :abstract_class
27
-
28
- def inherited(child)
29
- child.prepend Sideload
30
-
31
- super
32
- end
33
-
34
- def sideload_assets(value)
35
- self.sideload_assets_options = value
36
- end
37
- end
38
- end