hyalite 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/client/hyalite/component.rb +27 -3
- data/client/hyalite/short_hand.rb +0 -27
- data/lib/hyalite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 313aef2818fca410f8a5e8c2444ff9adb4e181f4
|
4
|
+
data.tar.gz: 96ed10c69f561a4a25bbb492fdd58208a0ecc683
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39495ec8dbf9169247f34e7e94bdd86675a9d2e9c4c3b28d66e2219dac66a54054b12fd6f9c002392423511d3425093443254bd2134c42f3eca323c01e037b9d
|
7
|
+
data.tar.gz: 397bd664105d77c4fbbd4cb29b36abfb1abbd8f499b39d255638a9dff075ec91af5040bceb1fe02e3858b56fa1f8392b07b59424d8ea7596a47d920f5ad9e74e
|
data/Gemfile.lock
CHANGED
data/client/hyalite/component.rb
CHANGED
@@ -2,7 +2,17 @@ require 'hyalite/short_hand'
|
|
2
2
|
|
3
3
|
module Hyalite
|
4
4
|
module Component
|
5
|
-
|
5
|
+
TAGS = %w(
|
6
|
+
a abbr address area article aside audio b base bdi bdo blockquote body br button button button button canvas caption
|
7
|
+
cite code col colgroup command datalist dd del details dfn div dl dt em embed fieldset figcaption figure footer form
|
8
|
+
h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link map mark menu meta
|
9
|
+
meter nav noscript object ol optgroup option output p param pre progress q rp rt ruby s samp script section select small
|
10
|
+
source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr
|
11
|
+
)
|
12
|
+
|
13
|
+
def pp(obj)
|
14
|
+
puts obj.inspect
|
15
|
+
end
|
6
16
|
|
7
17
|
attr_accessor :props, :context, :refs
|
8
18
|
|
@@ -14,14 +24,28 @@ module Hyalite
|
|
14
24
|
@refs = nil
|
15
25
|
end
|
16
26
|
|
17
|
-
def self.included(
|
18
|
-
|
27
|
+
def self.included(klass)
|
28
|
+
klass.instance_eval do
|
19
29
|
define_singleton_method(:state) do |key, initial_value|
|
20
30
|
(@initial_state ||= {})[key] = initial_value
|
21
31
|
end
|
22
32
|
|
23
33
|
define_singleton_method(:initial_state) { @initial_state || {} }
|
24
34
|
end
|
35
|
+
|
36
|
+
TAGS.each do |tag|
|
37
|
+
define_method(tag) do |props, *children|
|
38
|
+
Hyalite.create_element(tag, props, *children)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
klass.extend ClassMethods
|
43
|
+
end
|
44
|
+
|
45
|
+
module ClassMethods
|
46
|
+
def el(props, *children)
|
47
|
+
Hyalite.create_element(self, props, *children)
|
48
|
+
end
|
25
49
|
end
|
26
50
|
|
27
51
|
def initial_state
|
@@ -1,33 +1,6 @@
|
|
1
1
|
module Hyalite
|
2
2
|
module Component
|
3
3
|
module ShortHand
|
4
|
-
TAGS = %w(
|
5
|
-
a abbr address area article aside audio b base bdi bdo blockquote body br button button button button canvas caption
|
6
|
-
cite code col colgroup command datalist dd del details dfn div dl dt em embed fieldset figcaption figure footer form
|
7
|
-
h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link map mark menu meta
|
8
|
-
meter nav noscript object ol optgroup option output p param pre progress q rp rt ruby s samp script section select small
|
9
|
-
source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr
|
10
|
-
)
|
11
|
-
|
12
|
-
def self.included(klass)
|
13
|
-
TAGS.each do |tag|
|
14
|
-
define_method(tag) do |props, *children|
|
15
|
-
Hyalite.create_element(tag, props, *children)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
klass.extend ClassMethods
|
20
|
-
end
|
21
|
-
|
22
|
-
module ClassMethods
|
23
|
-
def el(props, *children)
|
24
|
-
Hyalite.create_element(self, props, *children)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def pp(obj)
|
29
|
-
puts obj.inspect
|
30
|
-
end
|
31
4
|
end
|
32
5
|
end
|
33
6
|
end
|
data/lib/hyalite/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyalite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- youchan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|