proscenium 0.11.0.pre.5-x86_64-linux → 0.11.0.pre.6-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55d308e705e5edc2a7157a05272334fd34dd1dfe97c6cf2d551345376f7b75ca
4
- data.tar.gz: 2d16c9ac5b15b63c252ad69eafccde16ee92c00e6efdf291a2944ec2cfcd8d92
3
+ metadata.gz: a7c4c3587d91fca2d7f7300e1e9e459e23bd6994bc5a1b5fd26082cb587aaab5
4
+ data.tar.gz: cc88859e91b00f94d1971c2a73e8993f00a7979ce3bf2cf535d764d3a2ca4451
5
5
  SHA512:
6
- metadata.gz: c3df7bed5a9a168db209e06fb18bd6aadf5028f8f5981c7a0ebb79524ee5dbf6c73300b01983a6ff929dda087f3733fd2bfcbe4604693a5a2221c81f07fe26a4
7
- data.tar.gz: d61ec92e1e760e5c2885cd656a1ea3b32f44d1cd91f6928f0c6e736d1327491b2b556456baea4d231dc16c7cd7ef854a11518963a65a371261d714ad7ca3d142
6
+ metadata.gz: 5c574ba7c71e93edfcebf6ddde384d710e382be2c03330e56052c90b17c6d0f5ffea47c8c2f5aadda7639a5da694ec653dfb4df948a8f3fa2bde01d52b2b49cc
7
+ data.tar.gz: 53d44c13043cfd41b780cb360884188702af5a809acf8b9abc11631e128f425578b32c5febe1eacc719e3e361cf272a56af65020c1b2d3b4ff722c43772eb6ec
Binary file
@@ -31,27 +31,31 @@ function init() {
31
31
  "prosceniumComponentForwardChildren" in element.dataset &&
32
32
  element.innerHTML !== "";
33
33
 
34
- Promise.all([react, Component]).then(([r, c]) => {
35
- if (proscenium.env.RAILS_ENV === "development") {
36
- console.groupCollapsed(
37
- `[proscenium/react/manager] 🔥 %o mounted!`,
38
- path
39
- );
40
- console.log("props: %o", props);
41
- console.groupEnd();
42
- }
34
+ Promise.all([react, Component])
35
+ .then(([r, c]) => {
36
+ if (proscenium.env.RAILS_ENV === "development") {
37
+ console.groupCollapsed(
38
+ `[proscenium/react/manager] 🔥 %o mounted!`,
39
+ path
40
+ );
41
+ console.log("props: %o", props);
42
+ console.groupEnd();
43
+ }
43
44
 
44
- let component;
45
- if (forwardChildren) {
46
- component = r.createElement(c.default, props, element.innerHTML);
47
- } else if (children) {
48
- component = r.createElement(c.default, props, children);
49
- } else {
50
- component = r.createElement(c.default, props);
51
- }
45
+ let component;
46
+ if (forwardChildren) {
47
+ component = r.createElement(c.default, props, element.innerHTML);
48
+ } else if (children) {
49
+ component = r.createElement(c.default, props, children);
50
+ } else {
51
+ component = r.createElement(c.default, props);
52
+ }
52
53
 
53
- r.createRoot(element).render(component);
54
- });
54
+ r.createRoot(element).render(component);
55
+ })
56
+ .catch((error) => {
57
+ console.error("[proscenium/react/manager] %o - %o", path, error);
58
+ });
55
59
  }
56
60
 
57
61
  Array.from(elements, (element) => {
@@ -38,13 +38,14 @@ module Proscenium
38
38
  class_attribute :lazy, default: false
39
39
 
40
40
  class_attribute :loader
41
+
42
+ # @return [String] the URL path to the component manager.
43
+ class_attribute :manager, default: '/@proscenium/react-manager/index.jsx'
41
44
  end
42
45
 
43
46
  class_methods do
44
- # Import only the component manager. The component itself is side loaded in the initializer,
45
- # so that it can be lazy loaded based on the value of the `lazy` instance variable.
46
47
  def sideload
47
- Importer.import resolve: '@proscenium/react-manager/index.jsx'
48
+ Importer.import manager
48
49
  Importer.sideload source_path, lazy: true
49
50
  end
50
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.11.0.pre.5'
4
+ VERSION = '0.11.0.pre.6'
5
5
  end
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.5
4
+ version: 0.11.0.pre.6
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-12 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport