phlex 1.6.1 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of phlex might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.yardopts +1 -0
- data/CHANGELOG.md +32 -0
- data/Gemfile +1 -0
- data/README.md +3 -43
- data/lib/phlex/black_hole.rb +1 -0
- data/lib/phlex/callable.rb +1 -0
- data/lib/phlex/context.rb +1 -0
- data/lib/phlex/deferred_render.rb +24 -0
- data/lib/phlex/element_clobbering_guard.rb +7 -8
- data/lib/phlex/elements.rb +38 -11
- data/lib/phlex/helpers.rb +21 -4
- data/lib/phlex/html/standard_elements.rb +193 -103
- data/lib/phlex/html/void_elements.rb +13 -12
- data/lib/phlex/html.rb +4 -6
- data/lib/phlex/overrides/symbol/name.rb +1 -0
- data/lib/phlex/sgml.rb +175 -64
- data/lib/phlex/svg/standard_elements.rb +128 -64
- data/lib/phlex/svg.rb +0 -4
- data/lib/phlex/unbuffered.rb +1 -0
- data/lib/phlex/version.rb +1 -1
- data/lib/phlex.rb +19 -6
- metadata +9 -7
@@ -4,386 +4,450 @@ module Phlex::SVG::StandardElements
|
|
4
4
|
extend Phlex::Elements
|
5
5
|
|
6
6
|
# @!method a(**attributes, &content)
|
7
|
-
# Outputs an
|
7
|
+
# Outputs an `<a>` tag.
|
8
8
|
# @return [nil]
|
9
|
+
# @yieldparam component [self]
|
9
10
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/a
|
10
11
|
register_element :a, tag: "a"
|
11
12
|
|
12
13
|
# @!method animate(**attributes, &content)
|
13
|
-
# Outputs an
|
14
|
+
# Outputs an `<animate>` tag.
|
14
15
|
# @return [nil]
|
16
|
+
# @yieldparam component [self]
|
15
17
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/animate
|
16
18
|
register_element :animate, tag: "animate"
|
17
19
|
|
18
20
|
# @!method animateMotion(**attributes, &content)
|
19
|
-
# Outputs an
|
21
|
+
# Outputs an `<animateMotion>` tag.
|
20
22
|
# @return [nil]
|
23
|
+
# @yieldparam component [self]
|
21
24
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/animateMotion
|
22
25
|
register_element :animateMotion, tag: "animateMotion"
|
23
26
|
|
24
27
|
# @!method animateTransform(**attributes, &content)
|
25
|
-
# Outputs an
|
28
|
+
# Outputs an `<animateTransform>` tag.
|
26
29
|
# @return [nil]
|
30
|
+
# @yieldparam component [self]
|
27
31
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/animateTransform
|
28
32
|
register_element :animateTransform, tag: "animateTransform"
|
29
33
|
|
30
34
|
# @!method circle(**attributes, &content)
|
31
|
-
# Outputs
|
35
|
+
# Outputs a `<circle>` tag.
|
32
36
|
# @return [nil]
|
37
|
+
# @yieldparam component [self]
|
33
38
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/circle
|
34
39
|
register_element :circle, tag: "circle"
|
35
40
|
|
36
41
|
# @!method clipPath(**attributes, &content)
|
37
|
-
# Outputs
|
42
|
+
# Outputs a `<clipPath>` tag.
|
38
43
|
# @return [nil]
|
44
|
+
# @yieldparam component [self]
|
39
45
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/clipPath
|
40
46
|
register_element :clipPath, tag: "clipPath"
|
41
47
|
|
42
48
|
# @!method defs(**attributes, &content)
|
43
|
-
# Outputs
|
49
|
+
# Outputs a `<defs>` tag.
|
44
50
|
# @return [nil]
|
51
|
+
# @yieldparam component [self]
|
45
52
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/defs
|
46
53
|
register_element :defs, tag: "defs"
|
47
54
|
|
48
55
|
# @!method desc(**attributes, &content)
|
49
|
-
# Outputs
|
56
|
+
# Outputs a `<desc>` tag.
|
50
57
|
# @return [nil]
|
58
|
+
# @yieldparam component [self]
|
51
59
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/desc
|
52
60
|
register_element :desc, tag: "desc"
|
53
61
|
|
54
62
|
# @!method discard(**attributes, &content)
|
55
|
-
# Outputs
|
63
|
+
# Outputs a `<discard>` tag.
|
56
64
|
# @return [nil]
|
65
|
+
# @yieldparam component [self]
|
57
66
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/discard
|
58
67
|
register_element :discard, tag: "discard"
|
59
68
|
|
60
69
|
# @!method ellipse(**attributes, &content)
|
61
|
-
# Outputs an
|
70
|
+
# Outputs an `<ellipse>` tag.
|
62
71
|
# @return [nil]
|
72
|
+
# @yieldparam component [self]
|
63
73
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/ellipse
|
64
74
|
register_element :ellipse, tag: "ellipse"
|
65
75
|
|
66
76
|
# @!method feBlend(**attributes, &content)
|
67
|
-
# Outputs
|
77
|
+
# Outputs a `<feBlend>` tag.
|
68
78
|
# @return [nil]
|
79
|
+
# @yieldparam component [self]
|
69
80
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feBlend
|
70
81
|
register_element :feBlend, tag: "feBlend"
|
71
82
|
|
72
83
|
# @!method feColorMatrix(**attributes, &content)
|
73
|
-
# Outputs
|
84
|
+
# Outputs a `<feColorMatrix>` tag.
|
74
85
|
# @return [nil]
|
86
|
+
# @yieldparam component [self]
|
75
87
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feColorMatrix
|
76
88
|
register_element :feColorMatrix, tag: "feColorMatrix"
|
77
89
|
|
78
90
|
# @!method feComponentTransfer(**attributes, &content)
|
79
|
-
# Outputs
|
91
|
+
# Outputs a `<feComponentTransfer>` tag.
|
80
92
|
# @return [nil]
|
93
|
+
# @yieldparam component [self]
|
81
94
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feComponentTransfer
|
82
95
|
register_element :feComponentTransfer, tag: "feComponentTransfer"
|
83
96
|
|
84
97
|
# @!method feComposite(**attributes, &content)
|
85
|
-
# Outputs
|
98
|
+
# Outputs a `<feComposite>` tag.
|
86
99
|
# @return [nil]
|
100
|
+
# @yieldparam component [self]
|
87
101
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feComposite
|
88
102
|
register_element :feComposite, tag: "feComposite"
|
89
103
|
|
90
104
|
# @!method feConvolveMatrix(**attributes, &content)
|
91
|
-
# Outputs
|
105
|
+
# Outputs a `<feConvolveMatrix>` tag.
|
92
106
|
# @return [nil]
|
107
|
+
# @yieldparam component [self]
|
93
108
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feConvolveMatrix
|
94
109
|
register_element :feConvolveMatrix, tag: "feConvolveMatrix"
|
95
110
|
|
96
111
|
# @!method feDiffuseLighting(**attributes, &content)
|
97
|
-
# Outputs
|
112
|
+
# Outputs a `<feDiffuseLighting>` tag.
|
98
113
|
# @return [nil]
|
114
|
+
# @yieldparam component [self]
|
99
115
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feDiffuseLighting
|
100
116
|
register_element :feDiffuseLighting, tag: "feDiffuseLighting"
|
101
117
|
|
102
118
|
# @!method feDisplacementMap(**attributes, &content)
|
103
|
-
# Outputs
|
119
|
+
# Outputs a `<feDisplacementMap>` tag.
|
104
120
|
# @return [nil]
|
121
|
+
# @yieldparam component [self]
|
105
122
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feDisplacementMap
|
106
123
|
register_element :feDisplacementMap, tag: "feDisplacementMap"
|
107
124
|
|
108
125
|
# @!method feDistantLight(**attributes, &content)
|
109
|
-
# Outputs
|
126
|
+
# Outputs a `<feDistantLight>` tag.
|
110
127
|
# @return [nil]
|
128
|
+
# @yieldparam component [self]
|
111
129
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feDistantLight
|
112
130
|
register_element :feDistantLight, tag: "feDistantLight"
|
113
131
|
|
114
132
|
# @!method feDropShadow(**attributes, &content)
|
115
|
-
# Outputs
|
133
|
+
# Outputs a `<feDropShadow>` tag.
|
116
134
|
# @return [nil]
|
135
|
+
# @yieldparam component [self]
|
117
136
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feDropShadow
|
118
137
|
register_element :feDropShadow, tag: "feDropShadow"
|
119
138
|
|
120
139
|
# @!method feFlood(**attributes, &content)
|
121
|
-
# Outputs
|
140
|
+
# Outputs a `<feFlood>` tag.
|
122
141
|
# @return [nil]
|
142
|
+
# @yieldparam component [self]
|
123
143
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feFlood
|
124
144
|
register_element :feFlood, tag: "feFlood"
|
125
145
|
|
126
146
|
# @!method feFuncA(**attributes, &content)
|
127
|
-
# Outputs
|
147
|
+
# Outputs a `<feFuncA>` tag.
|
128
148
|
# @return [nil]
|
149
|
+
# @yieldparam component [self]
|
129
150
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feFuncA
|
130
151
|
register_element :feFuncA, tag: "feFuncA"
|
131
152
|
|
132
153
|
# @!method feFuncB(**attributes, &content)
|
133
|
-
# Outputs
|
154
|
+
# Outputs a `<feFuncB>` tag.
|
134
155
|
# @return [nil]
|
156
|
+
# @yieldparam component [self]
|
135
157
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feFuncB
|
136
158
|
register_element :feFuncB, tag: "feFuncB"
|
137
159
|
|
138
160
|
# @!method feFuncG(**attributes, &content)
|
139
|
-
# Outputs
|
161
|
+
# Outputs a `<feFuncG>` tag.
|
140
162
|
# @return [nil]
|
163
|
+
# @yieldparam component [self]
|
141
164
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feFuncG
|
142
165
|
register_element :feFuncG, tag: "feFuncG"
|
143
166
|
|
144
167
|
# @!method feFuncR(**attributes, &content)
|
145
|
-
# Outputs
|
168
|
+
# Outputs a `<feFuncR>` tag.
|
146
169
|
# @return [nil]
|
170
|
+
# @yieldparam component [self]
|
147
171
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feFuncR
|
148
172
|
register_element :feFuncR, tag: "feFuncR"
|
149
173
|
|
150
174
|
# @!method feGaussianBlur(**attributes, &content)
|
151
|
-
# Outputs
|
175
|
+
# Outputs a `<feGaussianBlur>` tag.
|
152
176
|
# @return [nil]
|
177
|
+
# @yieldparam component [self]
|
153
178
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feGaussianBlur
|
154
179
|
register_element :feGaussianBlur, tag: "feGaussianBlur"
|
155
180
|
|
156
181
|
# @!method feImage(**attributes, &content)
|
157
|
-
# Outputs
|
182
|
+
# Outputs a `<feImage>` tag.
|
158
183
|
# @return [nil]
|
184
|
+
# @yieldparam component [self]
|
159
185
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feImage
|
160
186
|
register_element :feImage, tag: "feImage"
|
161
187
|
|
162
188
|
# @!method feMerge(**attributes, &content)
|
163
|
-
# Outputs
|
189
|
+
# Outputs a `<feMerge>` tag.
|
164
190
|
# @return [nil]
|
191
|
+
# @yieldparam component [self]
|
165
192
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feMerge
|
166
193
|
register_element :feMerge, tag: "feMerge"
|
167
194
|
|
168
195
|
# @!method feMergeNode(**attributes, &content)
|
169
|
-
# Outputs
|
196
|
+
# Outputs a `<feMergeNode>` tag.
|
170
197
|
# @return [nil]
|
198
|
+
# @yieldparam component [self]
|
171
199
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feMergeNode
|
172
200
|
register_element :feMergeNode, tag: "feMergeNode"
|
173
201
|
|
174
202
|
# @!method feMorphology(**attributes, &content)
|
175
|
-
# Outputs
|
203
|
+
# Outputs a `<feMorphology>` tag.
|
176
204
|
# @return [nil]
|
205
|
+
# @yieldparam component [self]
|
177
206
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feMorphology
|
178
207
|
register_element :feMorphology, tag: "feMorphology"
|
179
208
|
|
180
209
|
# @!method feOffset(**attributes, &content)
|
181
|
-
# Outputs
|
210
|
+
# Outputs a `<feOffset>` tag.
|
182
211
|
# @return [nil]
|
212
|
+
# @yieldparam component [self]
|
183
213
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feOffset
|
184
214
|
register_element :feOffset, tag: "feOffset"
|
185
215
|
|
186
216
|
# @!method fePointLight(**attributes, &content)
|
187
|
-
# Outputs
|
217
|
+
# Outputs a `<fePointLight>` tag.
|
188
218
|
# @return [nil]
|
219
|
+
# @yieldparam component [self]
|
189
220
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/fePointLight
|
190
221
|
register_element :fePointLight, tag: "fePointLight"
|
191
222
|
|
192
223
|
# @!method feSpecularLighting(**attributes, &content)
|
193
|
-
# Outputs
|
224
|
+
# Outputs a `<feSpecularLighting>` tag.
|
194
225
|
# @return [nil]
|
226
|
+
# @yieldparam component [self]
|
195
227
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feSpecularLighting
|
196
228
|
register_element :feSpecularLighting, tag: "feSpecularLighting"
|
197
229
|
|
198
230
|
# @!method feSpotLight(**attributes, &content)
|
199
|
-
# Outputs
|
231
|
+
# Outputs a `<feSpotLight>` tag.
|
200
232
|
# @return [nil]
|
233
|
+
# @yieldparam component [self]
|
201
234
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feSpotLight
|
202
235
|
register_element :feSpotLight, tag: "feSpotLight"
|
203
236
|
|
204
237
|
# @!method feTile(**attributes, &content)
|
205
|
-
# Outputs
|
238
|
+
# Outputs a `<feTile>` tag.
|
206
239
|
# @return [nil]
|
240
|
+
# @yieldparam component [self]
|
207
241
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feTile
|
208
242
|
register_element :feTile, tag: "feTile"
|
209
243
|
|
210
244
|
# @!method feTurbulence(**attributes, &content)
|
211
|
-
# Outputs
|
245
|
+
# Outputs a `<feTurbulence>` tag.
|
212
246
|
# @return [nil]
|
247
|
+
# @yieldparam component [self]
|
213
248
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/feTurbulence
|
214
249
|
register_element :feTurbulence, tag: "feTurbulence"
|
215
250
|
|
216
251
|
# @!method filter(**attributes, &content)
|
217
|
-
# Outputs
|
252
|
+
# Outputs a `<filter>` tag.
|
218
253
|
# @return [nil]
|
254
|
+
# @yieldparam component [self]
|
219
255
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/filter
|
220
256
|
register_element :filter, tag: "filter"
|
221
257
|
|
222
258
|
# @!method foreignObject(**attributes, &content)
|
223
|
-
# Outputs
|
259
|
+
# Outputs a `<foreignObject>` tag.
|
224
260
|
# @return [nil]
|
261
|
+
# @yieldparam component [self]
|
225
262
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/foreignObject
|
226
263
|
register_element :foreignObject, tag: "foreignObject"
|
227
264
|
|
228
265
|
# @!method g(**attributes, &content)
|
229
|
-
# Outputs
|
266
|
+
# Outputs a `<g>` tag.
|
230
267
|
# @return [nil]
|
268
|
+
# @yieldparam component [self]
|
231
269
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/g
|
232
270
|
register_element :g, tag: "g"
|
233
271
|
|
234
272
|
# @!method image(**attributes, &content)
|
235
|
-
# Outputs an
|
273
|
+
# Outputs an `<image>` tag.
|
236
274
|
# @return [nil]
|
275
|
+
# @yieldparam component [self]
|
237
276
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/image
|
238
277
|
register_element :image, tag: "image"
|
239
278
|
|
240
279
|
# @!method line(**attributes, &content)
|
241
|
-
# Outputs
|
280
|
+
# Outputs a `<line>` tag.
|
242
281
|
# @return [nil]
|
282
|
+
# @yieldparam component [self]
|
243
283
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/line
|
244
284
|
register_element :line, tag: "line"
|
245
285
|
|
246
286
|
# @!method linearGradient(**attributes, &content)
|
247
|
-
# Outputs
|
287
|
+
# Outputs a `<linearGradient>` tag.
|
248
288
|
# @return [nil]
|
289
|
+
# @yieldparam component [self]
|
249
290
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/linearGradient
|
250
291
|
register_element :linearGradient, tag: "linearGradient"
|
251
292
|
|
252
293
|
# @!method marker(**attributes, &content)
|
253
|
-
# Outputs
|
294
|
+
# Outputs a `<marker>` tag.
|
254
295
|
# @return [nil]
|
296
|
+
# @yieldparam component [self]
|
255
297
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/marker
|
256
298
|
register_element :marker, tag: "marker"
|
257
299
|
|
258
300
|
# @!method mask(**attributes, &content)
|
259
|
-
# Outputs
|
301
|
+
# Outputs a `<mask>` tag.
|
260
302
|
# @return [nil]
|
303
|
+
# @yieldparam component [self]
|
261
304
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/mask
|
262
305
|
register_element :mask, tag: "mask"
|
263
306
|
|
264
307
|
# @!method metadata(**attributes, &content)
|
265
|
-
# Outputs
|
308
|
+
# Outputs a `<metadata>` tag.
|
266
309
|
# @return [nil]
|
310
|
+
# @yieldparam component [self]
|
267
311
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/metadata
|
268
312
|
register_element :metadata, tag: "metadata"
|
269
313
|
|
270
314
|
# @!method mpath(**attributes, &content)
|
271
|
-
# Outputs an
|
315
|
+
# Outputs an `<mpath>` tag.
|
272
316
|
# @return [nil]
|
317
|
+
# @yieldparam component [self]
|
273
318
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/mpath
|
274
319
|
register_element :mpath, tag: "mpath"
|
275
320
|
|
276
321
|
# @!method path(**attributes, &content)
|
277
|
-
# Outputs
|
322
|
+
# Outputs a `<path>` tag.
|
278
323
|
# @return [nil]
|
324
|
+
# @yieldparam component [self]
|
279
325
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/path
|
280
326
|
register_element :path, tag: "path"
|
281
327
|
|
282
328
|
# @!method pattern(**attributes, &content)
|
283
|
-
# Outputs
|
329
|
+
# Outputs a `<pattern>` tag.
|
284
330
|
# @return [nil]
|
331
|
+
# @yieldparam component [self]
|
285
332
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/pattern
|
286
333
|
register_element :pattern, tag: "pattern"
|
287
334
|
|
288
335
|
# @!method polygon(**attributes, &content)
|
289
|
-
# Outputs
|
336
|
+
# Outputs a `<polygon>` tag.
|
290
337
|
# @return [nil]
|
338
|
+
# @yieldparam component [self]
|
291
339
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/polygon
|
292
340
|
register_element :polygon, tag: "polygon"
|
293
341
|
|
294
342
|
# @!method polyline(**attributes, &content)
|
295
|
-
# Outputs
|
343
|
+
# Outputs a `<polyline>` tag.
|
296
344
|
# @return [nil]
|
345
|
+
# @yieldparam component [self]
|
297
346
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/polyline
|
298
347
|
register_element :polyline, tag: "polyline"
|
299
348
|
|
300
349
|
# @!method radialGradient(**attributes, &content)
|
301
|
-
# Outputs
|
350
|
+
# Outputs a `<radialGradient>` tag.
|
302
351
|
# @return [nil]
|
352
|
+
# @yieldparam component [self]
|
303
353
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/radialGradient
|
304
354
|
register_element :radialGradient, tag: "radialGradient"
|
305
355
|
|
306
356
|
# @!method rect(**attributes, &content)
|
307
|
-
# Outputs
|
357
|
+
# Outputs a `<rect>` tag.
|
308
358
|
# @return [nil]
|
359
|
+
# @yieldparam component [self]
|
309
360
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/rect
|
310
361
|
register_element :rect, tag: "rect"
|
311
362
|
|
312
363
|
# @!method script(**attributes, &content)
|
313
|
-
# Outputs
|
364
|
+
# Outputs a `<script>` tag.
|
314
365
|
# @return [nil]
|
366
|
+
# @yieldparam component [self]
|
315
367
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/script
|
316
368
|
register_element :script, tag: "script"
|
317
369
|
|
318
370
|
# @!method set(**attributes, &content)
|
319
|
-
# Outputs
|
371
|
+
# Outputs a `<set>` tag.
|
320
372
|
# @return [nil]
|
373
|
+
# @yieldparam component [self]
|
321
374
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/set
|
322
375
|
register_element :set, tag: "set"
|
323
376
|
|
324
377
|
# @!method stop(**attributes, &content)
|
325
|
-
# Outputs
|
378
|
+
# Outputs a `<stop>` tag.
|
326
379
|
# @return [nil]
|
380
|
+
# @yieldparam component [self]
|
327
381
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/stop
|
328
382
|
register_element :stop, tag: "stop"
|
329
383
|
|
330
384
|
# @!method style(**attributes, &content)
|
331
|
-
# Outputs
|
385
|
+
# Outputs a `<style>` tag.
|
332
386
|
# @return [nil]
|
387
|
+
# @yieldparam component [self]
|
333
388
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/style
|
334
389
|
register_element :style, tag: "style"
|
335
390
|
|
336
391
|
# @!method svg(**attributes, &content)
|
337
|
-
# Outputs an
|
392
|
+
# Outputs an `<svg>` tag.
|
338
393
|
# @return [nil]
|
394
|
+
# @yieldparam component [self]
|
339
395
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/svg
|
340
396
|
register_element :svg, tag: "svg"
|
341
397
|
|
342
398
|
# @!method switch(**attributes, &content)
|
343
|
-
# Outputs
|
399
|
+
# Outputs a `<switch>` tag.
|
344
400
|
# @return [nil]
|
401
|
+
# @yieldparam component [self]
|
345
402
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/switch
|
346
403
|
register_element :switch, tag: "switch"
|
347
404
|
|
348
405
|
# @!method symbol(**attributes, &content)
|
349
|
-
# Outputs
|
406
|
+
# Outputs a `<symbol>` tag.
|
350
407
|
# @return [nil]
|
408
|
+
# @yieldparam component [self]
|
351
409
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/symbol
|
352
410
|
register_element :symbol, tag: "symbol"
|
353
411
|
|
354
412
|
# @!method text(**attributes, &content)
|
355
|
-
# Outputs
|
413
|
+
# Outputs a `<text>` tag.
|
356
414
|
# @return [nil]
|
415
|
+
# @yieldparam component [self]
|
357
416
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/text
|
358
417
|
register_element :text, tag: "text"
|
359
418
|
|
360
419
|
# @!method textPath(**attributes, &content)
|
361
|
-
# Outputs
|
420
|
+
# Outputs a `<textPath>` tag.
|
362
421
|
# @return [nil]
|
422
|
+
# @yieldparam component [self]
|
363
423
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/textPath
|
364
424
|
register_element :textPath, tag: "textPath"
|
365
425
|
|
366
426
|
# @!method title(**attributes, &content)
|
367
|
-
# Outputs
|
427
|
+
# Outputs a `<title>` tag.
|
368
428
|
# @return [nil]
|
429
|
+
# @yieldparam component [self]
|
369
430
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/title
|
370
431
|
register_element :title, tag: "title"
|
371
432
|
|
372
433
|
# @!method tspan(**attributes, &content)
|
373
|
-
# Outputs
|
434
|
+
# Outputs a `<tspan>` tag.
|
374
435
|
# @return [nil]
|
436
|
+
# @yieldparam component [self]
|
375
437
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/tspan
|
376
438
|
register_element :tspan, tag: "tspan"
|
377
439
|
|
378
440
|
# @!method use(**attributes, &content)
|
379
|
-
# Outputs
|
441
|
+
# Outputs a `<use>` tag.
|
380
442
|
# @return [nil]
|
443
|
+
# @yieldparam component [self]
|
381
444
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/use
|
382
445
|
register_element :use, tag: "use"
|
383
446
|
|
384
447
|
# @!method view(**attributes, &content)
|
385
|
-
# Outputs
|
448
|
+
# Outputs a `<view>` tag.
|
386
449
|
# @return [nil]
|
450
|
+
# @yieldparam component [self]
|
387
451
|
# @see https://developer.mozilla.org/docs/Web/SVG/Element/view
|
388
452
|
register_element :view, tag: "view"
|
389
453
|
end
|
data/lib/phlex/svg.rb
CHANGED
data/lib/phlex/unbuffered.rb
CHANGED
data/lib/phlex/version.rb
CHANGED
data/lib/phlex.rb
CHANGED
@@ -5,19 +5,32 @@ require "zeitwerk"
|
|
5
5
|
require "concurrent"
|
6
6
|
|
7
7
|
module Phlex
|
8
|
+
# Included in all Phlex exceptions allowing you to match any Phlex error.
|
9
|
+
# @example Rescue any Phlex error:
|
10
|
+
# rescue Phlex::Error
|
11
|
+
module Error; end
|
12
|
+
|
13
|
+
# A specialised ArgumentError for Phlex.
|
14
|
+
class ArgumentError < ::ArgumentError
|
15
|
+
include Error
|
16
|
+
end
|
17
|
+
|
18
|
+
# A specialised NameError for Phlex.
|
19
|
+
class NameError < ::NameError
|
20
|
+
include Error
|
21
|
+
end
|
22
|
+
|
23
|
+
# @api private
|
8
24
|
Loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false).tap do |loader|
|
9
25
|
loader.inflector.inflect(
|
10
26
|
"html" => "HTML",
|
11
|
-
|
12
|
-
|
27
|
+
"svg" => "SVG",
|
28
|
+
"sgml" => "SGML"
|
13
29
|
)
|
14
30
|
loader.ignore("#{__dir__}/phlex/testing")
|
15
31
|
loader.setup
|
16
32
|
end
|
17
33
|
|
18
|
-
|
19
|
-
ArgumentError = Class.new(ArgumentError) { include Error }
|
20
|
-
NameError = Class.new(NameError) { include Error }
|
21
|
-
|
34
|
+
# @api private
|
22
35
|
ATTRIBUTE_CACHE = Concurrent::Map.new
|
23
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phlex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Drapper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.6'
|
55
|
-
description: A high-performance view framework optimised for
|
55
|
+
description: A high-performance view framework optimised for fun.
|
56
56
|
email:
|
57
57
|
- joel@drapper.me
|
58
58
|
executables: []
|
@@ -62,6 +62,8 @@ files:
|
|
62
62
|
- ".editorconfig"
|
63
63
|
- ".rubocop.yml"
|
64
64
|
- ".ruby-version"
|
65
|
+
- ".yardopts"
|
66
|
+
- CHANGELOG.md
|
65
67
|
- CODE_OF_CONDUCT.md
|
66
68
|
- CONTRIBUTING.md
|
67
69
|
- Gemfile
|
@@ -98,8 +100,8 @@ licenses:
|
|
98
100
|
- MIT
|
99
101
|
metadata:
|
100
102
|
homepage_uri: https://www.phlex.fun
|
101
|
-
source_code_uri: https://github.com/
|
102
|
-
changelog_uri: https://github.com/
|
103
|
+
source_code_uri: https://github.com/phlex-ruby/phlex
|
104
|
+
changelog_uri: https://github.com/phlex-ruby/phlex/blob/main/CHANGELOG.md
|
103
105
|
funding_uri: https://github.com/sponsors/joeldrapper
|
104
106
|
rubygems_mfa_required: 'true'
|
105
107
|
post_install_message:
|
@@ -117,8 +119,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
119
|
- !ruby/object:Gem::Version
|
118
120
|
version: '0'
|
119
121
|
requirements: []
|
120
|
-
rubygems_version: 3.4.
|
122
|
+
rubygems_version: 3.4.10
|
121
123
|
signing_key:
|
122
124
|
specification_version: 4
|
123
|
-
summary: A framework for building views in Ruby.
|
125
|
+
summary: A fun framework for building views in Ruby.
|
124
126
|
test_files: []
|