isomorfeus-preact 22.9.0.rc4 → 22.9.0.rc6

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: 1ca8bdcd1a2bca5716034b22c785b72a1a5b41c7b62d54c625c445bbdadc8501
4
+ data.tar.gz: 5ad31495ae9a95af445ff563fd1975d297bbc6bf20113cef70b00397100c56e7
5
5
  SHA512:
6
- metadata.gz: d05800ff4b025c00ea0db26a8e0d463eadcf5811fa95b088b0485f18b311c97c6bdc8483d8af8163404c8326de2a24083b11d9b89cf4692c9d35bb103f4133c3
7
- data.tar.gz: f58cc4c176ead2e90b7ab0cdfc3af7080a55266b07fb128c796187ccb06b7000aa5be2fdb64d428fe3357d264ff987204616aaf8f368abe91319bc4efd0b7c1d
6
+ metadata.gz: f98ff1c4cfc2799c2560870a71b395990459dae4e931c336bdda23ea29cc2f587d9f64cd0541326bbaa5c389ed40e26c5d1add1f198242d46e1e06b6b887e24a
7
+ data.tar.gz: 813122cd579f3d5c68086559ac8c462b18e13039d6b4af99f7d6fa30f14e52be2bb25881e73f2d20e70713b5cc9005e85bc1f4f2c9800024a8b0fdf7b2c061ad
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Preact
3
- VERSION = '22.9.0.rc4'
3
+ VERSION = '22.9.0.rc6'
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,14 +1,14 @@
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.rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-25 00:00:00.000000000 Z
11
+ date: 2022-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -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.rc6
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.rc6
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.rc6
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.rc6
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: isomorfeus-puppetmaster
85
85
  requirement: !ruby/object:Gem::Requirement