isomorfeus-preact 23.7.0.rc2 → 23.7.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/isomorfeus_preact_ext/preact.c +3 -12
- data/lib/isomorfeus/preact/ssr.rb +1 -0
- data/lib/isomorfeus/preact/version.rb +1 -1
- data/lib/preact.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a716fa5db31975a9ad530fd668fa4f44e429411b2cdf64ff38a3ba087004a2d
|
4
|
+
data.tar.gz: 531dd5efc835cd3945c585cfce5c06ed1763344d36c4de489befc23e69af95b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b45462a5083ae7d2f7ee7ec853b48e921bd97d6cc6a436d03ab383c291790054e80dcfddbe2a6f37d2923f7ed6d4ae8d560ca8f94b5b3f41c26799505cba5862
|
7
|
+
data.tar.gz: f74e88b8369067509ac1b0588251e0575563f7079c244ff84d47f6df6d79d0499a159cbac5ac5c28356e3cb6cce78cd4852bd176d7440b5ec2f4fe1bfcc15c1d
|
@@ -155,16 +155,7 @@ static VALUE get_context(VALUE node_type, VALUE context) {
|
|
155
155
|
}
|
156
156
|
|
157
157
|
static VALUE is_renderable_q(VALUE self, VALUE block_result) {
|
158
|
-
|
159
|
-
case T_BIGNUM:
|
160
|
-
case T_FIXNUM:
|
161
|
-
case T_FLOAT:
|
162
|
-
case T_STRING:
|
163
|
-
return Qtrue;
|
164
|
-
default:
|
165
|
-
return Qfalse;
|
166
|
-
}
|
167
|
-
return Qfalse;
|
158
|
+
return (TYPE(block_result) == T_STRING) ? Qtrue : Qfalse;
|
168
159
|
}
|
169
160
|
|
170
161
|
static VALUE render_class_component(VALUE vnode, VALUE context, VNode *v) {
|
@@ -214,7 +205,7 @@ static VALUE render_class_component(VALUE vnode, VALUE context, VNode *v) {
|
|
214
205
|
rb_ary_push(pr, rb_ary_new());
|
215
206
|
VALUE block_result = rb_funcall(c, id_render, 0);
|
216
207
|
VALUE render_result = rb_ary_pop(pr);
|
217
|
-
if (
|
208
|
+
if (TYPE(block_result) == T_STRING) // is_renderable_q
|
218
209
|
rb_ary_push(render_result, block_result);
|
219
210
|
return render_result;
|
220
211
|
}
|
@@ -462,7 +453,7 @@ static VALUE create_element(int argc, VALUE *argv, VALUE self) {
|
|
462
453
|
rb_ary_push(pr, rb_ary_new());
|
463
454
|
VALUE block_result = rb_yield(Qnil);
|
464
455
|
VALUE c = rb_ary_pop(pr);
|
465
|
-
if (
|
456
|
+
if (TYPE(block_result) == T_STRING) // is_renderable_q
|
466
457
|
rb_ary_push(c, block_result);
|
467
458
|
if (RARRAY_LEN(c) > 0)
|
468
459
|
children = c;
|
@@ -10,6 +10,7 @@ module Isomorfeus
|
|
10
10
|
def render(skip_ssr)
|
11
11
|
Isomorfeus.browser_location = Browser::Location.new(@location)
|
12
12
|
Isomorfeus.current_locale = @locale if @locale
|
13
|
+
Isomorfeus.ssr_response_status = 200
|
13
14
|
NanoCSS.instance = NanoCSS.new(given_renderer: NanoCSS.global_instance.renderer.deep_dup)
|
14
15
|
Isomorfeus.init_store
|
15
16
|
Isomorfeus.store.clear!
|
data/lib/preact.rb
CHANGED
@@ -1188,7 +1188,7 @@ module Preact
|
|
1188
1188
|
attr_accessor :rerender_queue
|
1189
1189
|
|
1190
1190
|
def is_renderable?(res)
|
1191
|
-
`(res !== null && res !== undefined && res !== nil &&
|
1191
|
+
`(res !== null && res !== undefined && res !== nil && res.$$is_string)`
|
1192
1192
|
end
|
1193
1193
|
|
1194
1194
|
def create_element(type, props = nil, children = nil)
|
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: 23.7.0.
|
4
|
+
version: 23.7.0.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -78,28 +78,28 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - '='
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 23.7.0.
|
81
|
+
version: 23.7.0.rc4
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - '='
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 23.7.0.
|
88
|
+
version: 23.7.0.rc4
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: isomorfeus-redux
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 23.7.0.
|
95
|
+
version: 23.7.0.rc4
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - '='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 23.7.0.
|
102
|
+
version: 23.7.0.rc4
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: benchmark-ips
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|