proscenium 0.11.0.pre.4-arm64-darwin → 0.11.0.pre.6-arm64-darwin
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e16c640f7e3f07a1a29698ba0da0788bc05b7da96f77b2dcb052c79cae0c2f6
|
4
|
+
data.tar.gz: cb366a06cd0bed0d24eb846a882a320aca309b3cddf3829678e42b1e80d78f9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fe0935ec4a1231e8bc85d2b5598b32f0276bd9bfe15fe027bc0481996eb1e43f3bff6915186f5b1af866562b037add10c671a871e0f3bc22e7bb389645473a6
|
7
|
+
data.tar.gz: dc36da2d9821fcd0590baa0c75e1ea2c0c24cf0c687581ab8f4e954e840f970310de303ce8edd0e2aa9848c0eb26ac9b61fbc73993bee2967cb1c1d48dfdac66
|
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])
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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
|
-
|
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
|
48
|
+
Importer.import manager
|
48
49
|
Importer.sideload source_path, lazy: true
|
49
50
|
end
|
50
51
|
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.6
|
5
5
|
platform: arm64-darwin
|
6
6
|
authors:
|
7
7
|
- Joel Moss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|