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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bba88069414d8ed45e76c087c9f6bb20006fdea62ac0b4769a7a0838d32a037
4
- data.tar.gz: 9336d12827cea1fad40fdb178cfe8323758bb4fee4d88c767d7f2249a1e52e13
3
+ metadata.gz: 4a42f1660e1780885ea77e59545c00f5e6e88073f0f2de9576323ff0421d2b81
4
+ data.tar.gz: bb96257c15ccbdb6a3211a6a271c5a47128760c0c1a72b44936ad39f298fbd02
5
5
  SHA512:
6
- metadata.gz: d05800ff4b025c00ea0db26a8e0d463eadcf5811fa95b088b0485f18b311c97c6bdc8483d8af8163404c8326de2a24083b11d9b89cf4692c9d35bb103f4133c3
7
- data.tar.gz: f58cc4c176ead2e90b7ab0cdfc3af7080a55266b07fb128c796187ccb06b7000aa5be2fdb64d428fe3357d264ff987204616aaf8f368abe91319bc4efd0b7c1d
6
+ metadata.gz: 59e489c2b5ac028fa61daef05dcb006c895b10dab3494146be42618fcd8927eb4747863c272fea18af9cac09bcd44f0d35a8fb718c20f835ebbfd29dd51e58e4
7
+ data.tar.gz: ad20d418725934270727764e00abf22c7b84f83655b0753f1e8c753f45ef9ed0afbcf55c43ee89246220ec4805ec66b3cc7f94380b79403f185464e0d3c02983
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Preact
3
- VERSION = '22.9.0.rc4'
3
+ VERSION = '22.9.0.rc5'
4
4
  end
5
5
  end
@@ -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
@@ -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.rc4
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.rc4
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.rc4
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.rc4
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.rc4
82
+ version: 22.9.0.rc5
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: isomorfeus-puppetmaster
85
85
  requirement: !ruby/object:Gem::Requirement