proscenium 0.11.0.pre.5-x86_64-darwin → 0.11.0.pre.6-x86_64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/proscenium/libs/react-manager/index.jsx +23 -19
- data/lib/proscenium/react_componentable.rb +4 -3
- 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: d7bdebc2e48e6cd15114f0cc3612a7981e7337e60a14fc4dd2c162423d8d1a61
|
4
|
+
data.tar.gz: 158e265a98b24f5d54c7971206c8eaa23c329b65b9ce9704abb9f0c01df5632f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 408b44dfbd8b0aa542fbf2e0e2e589d0a59dc955fcbea4f79434f07f684b843f3efc1d01b98e317ee9e96154c195fdd40d9468eb79b5a060c189bb50f8b953a5
|
7
|
+
data.tar.gz: a051dce984ac8b34c74e816521e7282194fc32b248abcb9afb679c550228a35886a88934dbde302505f2a517fa20738b0cceda5dea9ec2cf6efe3042aae95d11
|
@@ -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: x86_64-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
|