isomorfeus-preact 22.11.0.rc1 → 23.1.0.rc1
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 +10 -1
- data/lib/isomorfeus/preact/version.rb +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e85fc4bc0d60fef17a258c8258cd5504d99b2858ee72accca8c8379eae111250
|
4
|
+
data.tar.gz: 6d536d46743e666dba8b065b8dc65bd341335abcbdf20f909b41d675f3c28341
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 223fd1527f4cde895a172c2e4316494d6c60ab44e9a82594004a87406429c80b9b4c9071f1a2159594f4c9204dbddd73672ba2f1901c45fb491d6e168e6916aa
|
7
|
+
data.tar.gz: 1bc4550c3bd80124883658451a13388e43aaea6cafc50dbcabd8eda1c7a821fc71e048aa65974f0e04d498f31160cbeac101e0c93f246c0947c5d933e6f0f117
|
@@ -20,6 +20,7 @@ static ID id_downcase;
|
|
20
20
|
static ID id_encode_entities;
|
21
21
|
static ID id_eqeq;
|
22
22
|
static ID id_for;
|
23
|
+
static ID id_freeze;
|
23
24
|
static ID id_get_child_context;
|
24
25
|
static ID id_get_derived_state_from_props;
|
25
26
|
static ID id_gsub;
|
@@ -155,6 +156,7 @@ VALUE render_class_component(VALUE vnode, VALUE context) {
|
|
155
156
|
|
156
157
|
VALUE node_type = v->type;
|
157
158
|
VALUE props = v->props;
|
159
|
+
VALUE state = rb_hash_new();
|
158
160
|
|
159
161
|
// get context
|
160
162
|
VALUE cctx = get_context(node_type, context);
|
@@ -166,13 +168,16 @@ VALUE render_class_component(VALUE vnode, VALUE context) {
|
|
166
168
|
if (rb_funcall(mIsomorfeus, id_development, 0) == Qtrue) { rb_funcall(node_type, id_validate_props, 1, props); }
|
167
169
|
}
|
168
170
|
|
171
|
+
// freeze props
|
172
|
+
rb_funcall(props, id_freeze, 0);
|
173
|
+
|
169
174
|
// instantiate component
|
170
175
|
VALUE c = rb_funcall(node_type, id_new, 2, props, cctx);
|
171
176
|
v->component = c;
|
172
177
|
|
173
178
|
// set state, props, context
|
174
179
|
rb_ivar_set(c, iv_props, props);
|
175
|
-
if (rb_funcall(c, id_state, 0) == Qnil) { rb_ivar_set(c, iv_state,
|
180
|
+
if (rb_funcall(c, id_state, 0) == Qnil) { rb_ivar_set(c, iv_state, state); }
|
176
181
|
if (rb_ivar_get(c, iv_next_state) == Qnil) { rb_ivar_set(c, iv_next_state, rb_funcall(c, id_state, 0)); }
|
177
182
|
rb_ivar_set(c, iv_context, cctx);
|
178
183
|
|
@@ -183,6 +188,9 @@ VALUE render_class_component(VALUE vnode, VALUE context) {
|
|
183
188
|
rb_ivar_set(c, iv_state, rb_funcall(state, id_merge, res));
|
184
189
|
}
|
185
190
|
|
191
|
+
// freeze state
|
192
|
+
rb_funcall(rb_funcall(c, id_state, 0), id_freeze, 0);
|
193
|
+
|
186
194
|
// render
|
187
195
|
return rb_funcall(c, id_render, 0);
|
188
196
|
}
|
@@ -460,6 +468,7 @@ void Init_Preact(void) {
|
|
460
468
|
id_gsub = rb_intern("gsub");
|
461
469
|
id_html_for = rb_intern("html_for");
|
462
470
|
id_for = rb_intern("for");
|
471
|
+
id_freeze = rb_intern("freeze");
|
463
472
|
id_include = rb_intern("include?");
|
464
473
|
id_is_a = rb_intern("is_a?");
|
465
474
|
id_is_renderable = rb_intern("is_renderable?");
|
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:
|
4
|
+
version: 23.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: opal
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.7.0.rc1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.7.0.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: opal-activesupport
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,56 +58,56 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.16.2
|
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: 0.
|
68
|
+
version: 0.16.2
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: isomorfeus-i18n
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 23.1.0.rc1
|
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:
|
82
|
+
version: 23.1.0.rc1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: isomorfeus-redux
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 23.1.0.rc1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 23.1.0.rc1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: isomorfeus-puppetmaster
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.8.
|
103
|
+
version: 0.8.4
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.8.
|
110
|
+
version: 0.8.4
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
231
|
- !ruby/object:Gem::Version
|
232
232
|
version: 1.3.1
|
233
233
|
requirements: []
|
234
|
-
rubygems_version: 3.4.
|
234
|
+
rubygems_version: 3.4.1
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
237
|
summary: Preact Components for Isomorfeus.
|