isomorfeus-preact 22.9.0.rc4 → 22.9.0.rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus/preact/version.rb +1 -1
- data/lib/preact/component.rb +0 -15
- data/lib/preact/elements.rb +13 -0
- data/lib/route.rb +2 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a42f1660e1780885ea77e59545c00f5e6e88073f0f2de9576323ff0421d2b81
|
4
|
+
data.tar.gz: bb96257c15ccbdb6a3211a6a271c5a47128760c0c1a72b44936ad39f298fbd02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59e489c2b5ac028fa61daef05dcb006c895b10dab3494146be42618fcd8927eb4747863c272fea18af9cac09bcd44f0d35a8fb718c20f835ebbfd29dd51e58e4
|
7
|
+
data.tar.gz: ad20d418725934270727764e00abf22c7b84f83655b0753f1e8c753f45ef9ed0afbcf55c43ee89246220ec4805ec66b3cc7f94380b79403f185464e0d3c02983
|
data/lib/preact/component.rb
CHANGED
@@ -203,20 +203,5 @@ module Preact
|
|
203
203
|
Preact._enqueue_render(self)
|
204
204
|
end
|
205
205
|
end
|
206
|
-
|
207
|
-
def get_preact_element(arg, &block)
|
208
|
-
if block_given?
|
209
|
-
el = block.call
|
210
|
-
return el if el
|
211
|
-
end
|
212
|
-
Preact.render_buffer.last.pop
|
213
|
-
end
|
214
|
-
alias gpe get_preact_element
|
215
|
-
|
216
|
-
def render_preact_element(el)
|
217
|
-
Preact.render_buffer.last.push(el)
|
218
|
-
nil
|
219
|
-
end
|
220
|
-
alias rpe render_preact_element
|
221
206
|
end
|
222
207
|
end
|
data/lib/preact/elements.rb
CHANGED
@@ -50,4 +50,17 @@ module Preact::Elements
|
|
50
50
|
Preact._render_element(element, props, &block)
|
51
51
|
end
|
52
52
|
end
|
53
|
+
|
54
|
+
def GPE(arg, &block)
|
55
|
+
if block_given?
|
56
|
+
el = block.call
|
57
|
+
return el if el
|
58
|
+
end
|
59
|
+
Preact.render_buffer.last.pop
|
60
|
+
end
|
61
|
+
|
62
|
+
def RPE(el)
|
63
|
+
Preact.render_buffer.last.push(el)
|
64
|
+
nil
|
65
|
+
end
|
53
66
|
end
|
data/lib/route.rb
CHANGED
@@ -4,9 +4,10 @@ class Route < Preact::Component
|
|
4
4
|
matches, params = props[:match] || route_match
|
5
5
|
return unless matches
|
6
6
|
component = props[:component]
|
7
|
+
component_props = props[:component_props] || {}
|
7
8
|
if component
|
8
9
|
component = component.constantize if component.is_a?(String)
|
9
|
-
Preact.create_element(component, { params: params })
|
10
|
+
Preact.create_element(component, component_props.merge!({ params: params }))
|
10
11
|
else
|
11
12
|
props[:children]
|
12
13
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-preact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 22.9.0.
|
4
|
+
version: 22.9.0.rc5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
@@ -58,28 +58,28 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 22.9.0.
|
61
|
+
version: 22.9.0.rc5
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 22.9.0.
|
68
|
+
version: 22.9.0.rc5
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: isomorfeus-redux
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 22.9.0.
|
75
|
+
version: 22.9.0.rc5
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 22.9.0.
|
82
|
+
version: 22.9.0.rc5
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: isomorfeus-puppetmaster
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|