phlex 0.5.3 → 1.0.0.rc1
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/Gemfile +1 -20
- data/config/sus.rb +0 -5
- data/lib/phlex/buffered.rb +2 -0
- data/lib/phlex/collection.rb +2 -0
- data/lib/phlex/elements.rb +1 -5
- data/lib/phlex/experimental.rb +10 -0
- data/lib/phlex/helpers.rb +2 -0
- data/lib/phlex/html.rb +73 -86
- data/lib/phlex/table.rb +1 -0
- data/lib/phlex/turbo/frame.rb +2 -0
- data/lib/phlex/turbo/stream.rb +2 -0
- data/lib/phlex/version.rb +1 -1
- data/lib/phlex.rb +2 -19
- metadata +6 -166
- data/Procfile.dev +0 -3
- data/Rakefile +0 -8
- data/config.ru +0 -9
- data/docs/assets/application.css +0 -32
- data/docs/assets/logo.png +0 -0
- data/docs/build.rb +0 -30
- data/docs/components/callout.rb +0 -9
- data/docs/components/code_block.rb +0 -26
- data/docs/components/code_span.rb +0 -9
- data/docs/components/example.rb +0 -32
- data/docs/components/heading.rb +0 -9
- data/docs/components/layout.rb +0 -91
- data/docs/components/markdown.rb +0 -25
- data/docs/components/nav/item.rb +0 -33
- data/docs/components/nav.rb +0 -6
- data/docs/components/tabs/tab.rb +0 -28
- data/docs/components/tabs.rb +0 -30
- data/docs/components/title.rb +0 -9
- data/docs/page_builder.rb +0 -39
- data/docs/pages/application_page.rb +0 -7
- data/docs/pages/helpers.rb +0 -97
- data/docs/pages/index.rb +0 -27
- data/docs/pages/library/collections.rb +0 -83
- data/docs/pages/rails/getting_started.rb +0 -57
- data/docs/pages/rails/helpers.rb +0 -55
- data/docs/pages/rails/layouts.rb +0 -61
- data/docs/pages/rails/migrating.rb +0 -37
- data/docs/pages/rails/rendering_views.rb +0 -35
- data/docs/pages/rails_integration.rb +0 -58
- data/docs/pages/templates.rb +0 -144
- data/docs/pages/testing/capybara.rb +0 -48
- data/docs/pages/testing/getting_started.rb +0 -44
- data/docs/pages/testing/nokogiri.rb +0 -83
- data/docs/pages/testing/rails.rb +0 -17
- data/docs/pages/translations.rb +0 -81
- data/docs/pages/views.rb +0 -184
- data/fixtures/compiler_test_helpers.rb +0 -19
- data/fixtures/content.rb +0 -60
- data/fixtures/dummy/app/assets/config/manifest.js +0 -0
- data/fixtures/dummy/app/components/comment_component.html.erb +0 -14
- data/fixtures/dummy/app/components/comment_component.rb +0 -8
- data/fixtures/dummy/app/components/reaction_component.html.erb +0 -3
- data/fixtures/dummy/app/components/reaction_component.rb +0 -7
- data/fixtures/dummy/app/controllers/articles_controller.rb +0 -4
- data/fixtures/dummy/app/controllers/comments_controller.rb +0 -4
- data/fixtures/dummy/app/views/application_view.rb +0 -8
- data/fixtures/dummy/app/views/articles/form.rb +0 -15
- data/fixtures/dummy/app/views/articles/index.html.erb +0 -14
- data/fixtures/dummy/app/views/articles/new.html.erb +0 -1
- data/fixtures/dummy/app/views/card.rb +0 -15
- data/fixtures/dummy/app/views/comments/comment.rb +0 -25
- data/fixtures/dummy/app/views/comments/index.html.erb +0 -3
- data/fixtures/dummy/app/views/comments/reaction.rb +0 -17
- data/fixtures/dummy/app/views/comments/show.html.erb +0 -3
- data/fixtures/dummy/app/views/heading.rb +0 -9
- data/fixtures/dummy/config/database.yml +0 -3
- data/fixtures/dummy/config/routes.rb +0 -5
- data/fixtures/dummy/config/storage.yml +0 -3
- data/fixtures/dummy/db/schema.rb +0 -6
- data/fixtures/dummy/log/.gitignore +0 -1
- data/fixtures/dummy/public/favicon.ico +0 -0
- data/fixtures/rails_helper.rb +0 -11
- data/fixtures/standard_element.rb +0 -87
- data/fixtures/void_element.rb +0 -31
- data/lib/generators/phlex/collection/USAGE +0 -8
- data/lib/generators/phlex/collection/collection_generator.rb +0 -13
- data/lib/generators/phlex/collection/templates/collection.rb.erb +0 -16
- data/lib/generators/phlex/controller/USAGE +0 -10
- data/lib/generators/phlex/controller/controller_generator.rb +0 -54
- data/lib/generators/phlex/controller/templates/controller.rb.erb +0 -10
- data/lib/generators/phlex/controller/templates/view.rb.erb +0 -14
- data/lib/generators/phlex/layout/USAGE +0 -8
- data/lib/generators/phlex/layout/layout_generator.rb +0 -13
- data/lib/generators/phlex/layout/templates/layout.rb.erb +0 -31
- data/lib/generators/phlex/page/USAGE +0 -8
- data/lib/generators/phlex/page/page_generator.rb +0 -13
- data/lib/generators/phlex/page/templates/page.rb.erb +0 -13
- data/lib/generators/phlex/table/USAGE +0 -8
- data/lib/generators/phlex/table/table_generator.rb +0 -14
- data/lib/generators/phlex/table/templates/table.rb.erb +0 -11
- data/lib/generators/phlex/view/USAGE +0 -8
- data/lib/generators/phlex/view/templates/view.rb.erb +0 -14
- data/lib/generators/phlex/view/view_generator.rb +0 -21
- data/lib/install/phlex.rb +0 -39
- data/lib/phlex/block.rb +0 -16
- data/lib/phlex/compiler/elements.rb +0 -49
- data/lib/phlex/compiler/formatter.rb +0 -91
- data/lib/phlex/compiler/generators/content.rb +0 -103
- data/lib/phlex/compiler/generators/element.rb +0 -61
- data/lib/phlex/compiler/nodes/base.rb +0 -19
- data/lib/phlex/compiler/nodes/call.rb +0 -9
- data/lib/phlex/compiler/nodes/command.rb +0 -13
- data/lib/phlex/compiler/nodes/fcall.rb +0 -18
- data/lib/phlex/compiler/nodes/method_add_block.rb +0 -33
- data/lib/phlex/compiler/nodes/vcall.rb +0 -9
- data/lib/phlex/compiler/optimizer.rb +0 -66
- data/lib/phlex/compiler/visitors/base.rb +0 -15
- data/lib/phlex/compiler/visitors/file.rb +0 -29
- data/lib/phlex/compiler/visitors/stable_scope.rb +0 -28
- data/lib/phlex/compiler/visitors/statements.rb +0 -36
- data/lib/phlex/compiler/visitors/view.rb +0 -19
- data/lib/phlex/compiler/visitors/view_method.rb +0 -59
- data/lib/phlex/compiler.rb +0 -70
- data/lib/phlex/html/callbacks.rb +0 -11
- data/lib/phlex/markdown.rb +0 -76
- data/lib/phlex/rails/engine.rb +0 -10
- data/lib/phlex/rails/form.rb +0 -67
- data/lib/phlex/rails/helpers.rb +0 -118
- data/lib/phlex/rails/layout.rb +0 -15
- data/lib/phlex/rails.rb +0 -11
- data/lib/phlex/renderable.rb +0 -47
- data/lib/phlex/testing/capybara.rb +0 -25
- data/lib/phlex/testing/nokogiri.rb +0 -24
- data/lib/phlex/testing/rails.rb +0 -19
- data/lib/phlex/translation.rb +0 -23
- data/lib/tasks/phlex_tasks.rake +0 -11
- data/package-lock.json +0 -1195
- data/package.json +0 -5
- data/tailwind.config.js +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d4cbcb774d4dca95d1cb9740c0a002fd394c6887dec1e1cabe543c87f94308b
|
4
|
+
data.tar.gz: 1df41572816aefd255defc3ceace6e4c5eaeb5f462d26e2605fc751a4ea3d3d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 589006a44bc566ce1e1dfc90f1e05e9b3f6c7871c9686ba3670fd36b68b1318449b05cc2268c865b89779126092065a7d69cde793d753ea8d7dcaf268d8e1e9e
|
7
|
+
data.tar.gz: c7a960b66cd78bb9605cb37408bc6a044167ec912a249b40e46e58dd07e398e5a122737a28246e3eac2945a65156b72e57fb35096069719be3c4faa72b007ef7
|
data/Gemfile
CHANGED
@@ -5,32 +5,13 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
5
5
|
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem "benchmark-ips"
|
9
|
-
gem "benchmark-memory"
|
10
|
-
gem "capybara"
|
11
|
-
gem "rails"
|
12
8
|
gem "rubocop"
|
13
|
-
gem "solargraph"
|
14
9
|
gem "sus"
|
15
10
|
gem "syntax_suggest"
|
16
11
|
gem "zeitwerk"
|
12
|
+
gem "benchmark-ips"
|
17
13
|
|
18
14
|
group :test do
|
19
15
|
gem "i18n"
|
20
16
|
gem "memory_profiler"
|
21
|
-
gem "covered"
|
22
|
-
end
|
23
|
-
|
24
|
-
group :rails do
|
25
|
-
gem "combustion"
|
26
|
-
end
|
27
|
-
|
28
|
-
group :docs do
|
29
|
-
gem "filewatcher"
|
30
|
-
gem "htmlbeautifier"
|
31
|
-
gem "redcarpet"
|
32
|
-
gem "markly"
|
33
|
-
gem "webrick"
|
34
|
-
gem "rouge"
|
35
|
-
gem "kramdown"
|
36
17
|
end
|
data/config/sus.rb
CHANGED
@@ -1,15 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "covered/sus"
|
4
|
-
include Covered::Sus
|
5
|
-
|
6
3
|
require "phlex"
|
7
4
|
require "bundler"
|
8
|
-
require "view_component"
|
9
5
|
|
10
6
|
Bundler.require :test
|
11
7
|
|
12
8
|
require_relative "../fixtures/view_helper"
|
13
|
-
require_relative "../fixtures/compiler_test_helpers"
|
14
9
|
|
15
10
|
Zeitwerk::Loader.eager_load_all
|
data/lib/phlex/buffered.rb
CHANGED
data/lib/phlex/collection.rb
CHANGED
data/lib/phlex/elements.rb
CHANGED
@@ -10,11 +10,7 @@ module Phlex
|
|
10
10
|
class_eval(<<-RUBY, __FILE__, __LINE__ + 1)
|
11
11
|
# frozen_string_literal: true
|
12
12
|
|
13
|
-
def #{element}(
|
14
|
-
if content
|
15
|
-
raise ArgumentError, %(👋 You can no longer pass content to #{element} as a positional argument.\n Instead, you can pass it as a block, e.g. #{element} { "Hello" })
|
16
|
-
end
|
17
|
-
|
13
|
+
def #{element}(**attributes, &block)
|
18
14
|
if attributes.length > 0
|
19
15
|
if block_given?
|
20
16
|
@_target << "<#{tag}" << (Phlex::ATTRIBUTE_CACHE[attributes.hash] || _attributes(**attributes)) << ">"
|
data/lib/phlex/helpers.rb
CHANGED
data/lib/phlex/html.rb
CHANGED
@@ -128,25 +128,9 @@ module Phlex
|
|
128
128
|
|
129
129
|
extend Elements
|
130
130
|
include Helpers
|
131
|
-
include Callable
|
132
|
-
include Renderable
|
133
131
|
|
134
132
|
class << self
|
135
133
|
attr_accessor :rendered_at_least_once
|
136
|
-
|
137
|
-
# def compile
|
138
|
-
# return if @compiled
|
139
|
-
# return unless name
|
140
|
-
# return if name.start_with? "#"
|
141
|
-
#
|
142
|
-
# Compiler.new(self).call
|
143
|
-
#
|
144
|
-
# @compiled = true
|
145
|
-
# end
|
146
|
-
#
|
147
|
-
# def compiled?
|
148
|
-
# !!@compiled
|
149
|
-
# end
|
150
134
|
end
|
151
135
|
|
152
136
|
def call(buffer = +"", view_context: nil, parent: nil, &block)
|
@@ -158,15 +142,30 @@ module Phlex
|
|
158
142
|
@_target = buffer
|
159
143
|
@_view_context = view_context
|
160
144
|
@_parent = parent
|
161
|
-
@output_buffer = self
|
162
145
|
|
163
|
-
template(&block)
|
146
|
+
around_template { template { yield_content(&block) } }
|
164
147
|
|
165
148
|
self.class.rendered_at_least_once ||= true
|
166
149
|
|
167
150
|
buffer
|
168
151
|
end
|
169
152
|
|
153
|
+
def render(renderable, *args, **kwargs, &block)
|
154
|
+
if renderable.is_a?(Phlex::HTML)
|
155
|
+
renderable.call(@_target, view_context: @_view_context, parent: self, &block)
|
156
|
+
elsif renderable.is_a?(Class) && renderable < Phlex::HTML
|
157
|
+
raise ArgumentError, "You tried to render the Phlex view class: #{renderable.name} but you probably meant to render an instance of that class instead."
|
158
|
+
else
|
159
|
+
raise ArgumentError, "You can't render a #{renderable}."
|
160
|
+
end
|
161
|
+
|
162
|
+
nil
|
163
|
+
end
|
164
|
+
|
165
|
+
def format
|
166
|
+
:html
|
167
|
+
end
|
168
|
+
|
170
169
|
def rendered?
|
171
170
|
@_rendered ||= false
|
172
171
|
end
|
@@ -183,35 +182,17 @@ module Phlex
|
|
183
182
|
register_void_element(method_name, tag: tag)
|
184
183
|
end
|
185
184
|
|
186
|
-
def yield_content(&block)
|
187
|
-
return unless block_given?
|
188
|
-
|
189
|
-
original_length = @_target.length
|
190
|
-
output = yield(self)
|
191
|
-
unchanged = (original_length == @_target.length)
|
192
|
-
|
193
|
-
if unchanged
|
194
|
-
case output
|
195
|
-
when String, Symbol, Integer, Float
|
196
|
-
text(output)
|
197
|
-
end
|
198
|
-
end
|
199
|
-
|
200
|
-
nil
|
201
|
-
end
|
202
|
-
|
203
185
|
def text(content)
|
204
|
-
@_target << _output(content)
|
205
|
-
|
206
|
-
nil
|
207
|
-
end
|
208
|
-
|
209
|
-
def _output(content)
|
210
186
|
case content
|
211
|
-
when String
|
212
|
-
|
213
|
-
|
187
|
+
when String
|
188
|
+
@_target << CGI.escape_html(content)
|
189
|
+
when Symbol
|
190
|
+
@_target << CGI.escape_html(content.name)
|
191
|
+
when Integer, Float
|
192
|
+
@_target << CGI.escape_html(content.to_s)
|
214
193
|
end
|
194
|
+
|
195
|
+
nil
|
215
196
|
end
|
216
197
|
|
217
198
|
def whitespace
|
@@ -225,8 +206,11 @@ module Phlex
|
|
225
206
|
nil
|
226
207
|
end
|
227
208
|
|
228
|
-
def comment(
|
229
|
-
@_target << "<!-- "
|
209
|
+
def comment(&block)
|
210
|
+
@_target << "<!-- "
|
211
|
+
yield_content(&block)
|
212
|
+
@_target << " -->"
|
213
|
+
|
230
214
|
nil
|
231
215
|
end
|
232
216
|
|
@@ -240,34 +224,6 @@ module Phlex
|
|
240
224
|
nil
|
241
225
|
end
|
242
226
|
|
243
|
-
def html_safe?
|
244
|
-
true
|
245
|
-
end
|
246
|
-
|
247
|
-
def safe_append=(value)
|
248
|
-
return unless value
|
249
|
-
|
250
|
-
@_target << case value
|
251
|
-
when String then value
|
252
|
-
when Symbol then value.name
|
253
|
-
else value.to_s
|
254
|
-
end
|
255
|
-
end
|
256
|
-
|
257
|
-
def append=(value)
|
258
|
-
return unless value
|
259
|
-
|
260
|
-
if value.html_safe?
|
261
|
-
self.safe_append = value
|
262
|
-
else
|
263
|
-
@_target << case value
|
264
|
-
when String then Hescape.escape_html(value)
|
265
|
-
when Symbol then Hescape.escape_html(value.name)
|
266
|
-
else Hescape.escape_html(value.to_s)
|
267
|
-
end
|
268
|
-
end
|
269
|
-
end
|
270
|
-
|
271
227
|
def capture(&block)
|
272
228
|
return unless block_given?
|
273
229
|
|
@@ -279,11 +235,44 @@ module Phlex
|
|
279
235
|
|
280
236
|
@_target = original_buffer
|
281
237
|
|
282
|
-
new_buffer
|
238
|
+
new_buffer
|
239
|
+
end
|
240
|
+
|
241
|
+
private
|
242
|
+
|
243
|
+
def around_template
|
244
|
+
before_template
|
245
|
+
yield
|
246
|
+
after_template
|
247
|
+
end
|
248
|
+
|
249
|
+
def before_template
|
250
|
+
nil
|
251
|
+
end
|
252
|
+
|
253
|
+
def after_template
|
254
|
+
nil
|
283
255
|
end
|
284
256
|
|
285
|
-
def
|
286
|
-
|
257
|
+
def yield_content(&block)
|
258
|
+
return unless block_given?
|
259
|
+
|
260
|
+
original_length = @_target.length
|
261
|
+
content = yield(self)
|
262
|
+
unchanged = (original_length == @_target.length)
|
263
|
+
|
264
|
+
if unchanged
|
265
|
+
case content
|
266
|
+
when String
|
267
|
+
@_target << CGI.escape_html(content)
|
268
|
+
when Symbol
|
269
|
+
@_target << CGI.escape_html(content.name)
|
270
|
+
when Integer, Float
|
271
|
+
@_target << CGI.escape_html(content.to_s)
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
nil
|
287
276
|
end
|
288
277
|
|
289
278
|
def _attributes(**attributes)
|
@@ -306,14 +295,12 @@ module Phlex
|
|
306
295
|
next unless v
|
307
296
|
|
308
297
|
name = case k
|
309
|
-
|
310
|
-
k
|
311
|
-
|
312
|
-
k.name.tr("_", "-")
|
313
|
-
else
|
314
|
-
k.to_s
|
298
|
+
when String then k
|
299
|
+
when Symbol then k.name.tr("_", "-")
|
300
|
+
else k.to_s
|
315
301
|
end
|
316
302
|
|
303
|
+
# Detect unsafe attribute names. Attribute names are considered unsafe if they match an event attribute or include unsafe characters.
|
317
304
|
if HTML::EVENT_ATTRIBUTES[name] || name.match?(/[<>&"']/)
|
318
305
|
raise ArgumentError, "Unsafe attribute name detected: #{k}."
|
319
306
|
end
|
@@ -322,13 +309,13 @@ module Phlex
|
|
322
309
|
when true
|
323
310
|
buffer << " " << name
|
324
311
|
when String
|
325
|
-
buffer << " " << name << '="' <<
|
312
|
+
buffer << " " << name << '="' << CGI.escape_html(v) << '"'
|
326
313
|
when Symbol
|
327
|
-
buffer << " " << name << '="' <<
|
314
|
+
buffer << " " << name << '="' << CGI.escape_html(v.name) << '"'
|
328
315
|
when Hash
|
329
316
|
_build_attributes(v.transform_keys { "#{k}-#{_1.name.tr('_', '-')}" }, buffer: buffer)
|
330
317
|
else
|
331
|
-
buffer << " " << name << '="' <<
|
318
|
+
buffer << " " << name << '="' << CGI.escape_html(v.to_s) << '"'
|
332
319
|
end
|
333
320
|
end
|
334
321
|
|
data/lib/phlex/table.rb
CHANGED
data/lib/phlex/turbo/frame.rb
CHANGED
data/lib/phlex/turbo/stream.rb
CHANGED
data/lib/phlex/version.rb
CHANGED
data/lib/phlex.rb
CHANGED
@@ -1,23 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "cgi"
|
4
4
|
require "zeitwerk"
|
5
|
-
require "syntax_tree"
|
6
5
|
|
7
6
|
module Phlex
|
8
7
|
Loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false).tap do |loader|
|
9
|
-
loader.ignore("#{__dir__}/generators")
|
10
|
-
loader.ignore("#{__dir__}/install")
|
11
|
-
|
12
|
-
loader.ignore("#{__dir__}/phlex/testing")
|
13
|
-
loader.ignore("#{__dir__}/phlex/markdown.rb")
|
14
|
-
|
15
|
-
loader.ignore("#{__dir__}/phlex/rails.rb")
|
16
|
-
loader.ignore("#{__dir__}/phlex/rails")
|
17
|
-
|
18
8
|
loader.inflector.inflect("html" => "HTML")
|
19
|
-
loader.
|
20
|
-
loader.inflector.inflect("fcall" => "FCall")
|
9
|
+
loader.ignore("#{__dir__}/phlex/testing")
|
21
10
|
loader.setup
|
22
11
|
end
|
23
12
|
|
@@ -25,12 +14,6 @@ module Phlex
|
|
25
14
|
ArgumentError = Class.new(ArgumentError) { include Error }
|
26
15
|
NameError = Class.new(NameError) { include Error }
|
27
16
|
|
28
|
-
def self.const_missing(name)
|
29
|
-
if name == :View
|
30
|
-
raise NameError, "👋 Phlex::View has been renamed (again 🙄) to Phlex::HTML."
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
17
|
extend self
|
35
18
|
|
36
19
|
ATTRIBUTE_CACHE = {}
|
metadata
CHANGED
@@ -1,43 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phlex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Drapper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: hescape
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: syntax_tree
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '3.6'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '3.6'
|
41
13
|
- !ruby/object:Gem::Dependency
|
42
14
|
name: zeitwerk
|
43
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,20 +24,6 @@ dependencies:
|
|
52
24
|
- - "~>"
|
53
25
|
- !ruby/object:Gem::Version
|
54
26
|
version: '2.6'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: view_component
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2.7'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '2.7'
|
69
27
|
description: A high-performance view framework optimised for developer happiness.
|
70
28
|
email:
|
71
29
|
- joel@drapper.me
|
@@ -79,148 +37,30 @@ files:
|
|
79
37
|
- CONTRIBUTING.md
|
80
38
|
- Gemfile
|
81
39
|
- LICENSE.txt
|
82
|
-
- Procfile.dev
|
83
40
|
- README.md
|
84
|
-
- Rakefile
|
85
41
|
- SECURITY.md
|
86
42
|
- bench.rb
|
87
|
-
- config.ru
|
88
43
|
- config/sus.rb
|
89
|
-
- docs/assets/application.css
|
90
|
-
- docs/assets/logo.png
|
91
|
-
- docs/build.rb
|
92
|
-
- docs/components/callout.rb
|
93
|
-
- docs/components/code_block.rb
|
94
|
-
- docs/components/code_span.rb
|
95
|
-
- docs/components/example.rb
|
96
|
-
- docs/components/heading.rb
|
97
|
-
- docs/components/layout.rb
|
98
|
-
- docs/components/markdown.rb
|
99
|
-
- docs/components/nav.rb
|
100
|
-
- docs/components/nav/item.rb
|
101
|
-
- docs/components/tabs.rb
|
102
|
-
- docs/components/tabs/tab.rb
|
103
|
-
- docs/components/title.rb
|
104
|
-
- docs/page_builder.rb
|
105
|
-
- docs/pages/application_page.rb
|
106
|
-
- docs/pages/helpers.rb
|
107
|
-
- docs/pages/index.rb
|
108
|
-
- docs/pages/library/collections.rb
|
109
|
-
- docs/pages/rails/getting_started.rb
|
110
|
-
- docs/pages/rails/helpers.rb
|
111
|
-
- docs/pages/rails/layouts.rb
|
112
|
-
- docs/pages/rails/migrating.rb
|
113
|
-
- docs/pages/rails/rendering_views.rb
|
114
|
-
- docs/pages/rails_integration.rb
|
115
|
-
- docs/pages/templates.rb
|
116
|
-
- docs/pages/testing/capybara.rb
|
117
|
-
- docs/pages/testing/getting_started.rb
|
118
|
-
- docs/pages/testing/nokogiri.rb
|
119
|
-
- docs/pages/testing/rails.rb
|
120
|
-
- docs/pages/translations.rb
|
121
|
-
- docs/pages/views.rb
|
122
|
-
- fixtures/compiler_test_helpers.rb
|
123
|
-
- fixtures/content.rb
|
124
|
-
- fixtures/dummy/app/assets/config/manifest.js
|
125
|
-
- fixtures/dummy/app/components/comment_component.html.erb
|
126
|
-
- fixtures/dummy/app/components/comment_component.rb
|
127
|
-
- fixtures/dummy/app/components/reaction_component.html.erb
|
128
|
-
- fixtures/dummy/app/components/reaction_component.rb
|
129
|
-
- fixtures/dummy/app/controllers/articles_controller.rb
|
130
|
-
- fixtures/dummy/app/controllers/comments_controller.rb
|
131
|
-
- fixtures/dummy/app/views/application_view.rb
|
132
|
-
- fixtures/dummy/app/views/articles/form.rb
|
133
|
-
- fixtures/dummy/app/views/articles/index.html.erb
|
134
|
-
- fixtures/dummy/app/views/articles/new.html.erb
|
135
|
-
- fixtures/dummy/app/views/card.rb
|
136
|
-
- fixtures/dummy/app/views/comments/comment.rb
|
137
|
-
- fixtures/dummy/app/views/comments/index.html.erb
|
138
|
-
- fixtures/dummy/app/views/comments/reaction.rb
|
139
|
-
- fixtures/dummy/app/views/comments/show.html.erb
|
140
|
-
- fixtures/dummy/app/views/heading.rb
|
141
|
-
- fixtures/dummy/config/database.yml
|
142
|
-
- fixtures/dummy/config/routes.rb
|
143
|
-
- fixtures/dummy/config/storage.yml
|
144
|
-
- fixtures/dummy/db/schema.rb
|
145
|
-
- fixtures/dummy/log/.gitignore
|
146
|
-
- fixtures/dummy/public/favicon.ico
|
147
44
|
- fixtures/layout.rb
|
148
45
|
- fixtures/page.rb
|
149
|
-
- fixtures/rails_helper.rb
|
150
|
-
- fixtures/standard_element.rb
|
151
46
|
- fixtures/view_helper.rb
|
152
|
-
- fixtures/void_element.rb
|
153
|
-
- lib/generators/phlex/collection/USAGE
|
154
|
-
- lib/generators/phlex/collection/collection_generator.rb
|
155
|
-
- lib/generators/phlex/collection/templates/collection.rb.erb
|
156
|
-
- lib/generators/phlex/controller/USAGE
|
157
|
-
- lib/generators/phlex/controller/controller_generator.rb
|
158
|
-
- lib/generators/phlex/controller/templates/controller.rb.erb
|
159
|
-
- lib/generators/phlex/controller/templates/view.rb.erb
|
160
|
-
- lib/generators/phlex/layout/USAGE
|
161
|
-
- lib/generators/phlex/layout/layout_generator.rb
|
162
|
-
- lib/generators/phlex/layout/templates/layout.rb.erb
|
163
|
-
- lib/generators/phlex/page/USAGE
|
164
|
-
- lib/generators/phlex/page/page_generator.rb
|
165
|
-
- lib/generators/phlex/page/templates/page.rb.erb
|
166
|
-
- lib/generators/phlex/table/USAGE
|
167
|
-
- lib/generators/phlex/table/table_generator.rb
|
168
|
-
- lib/generators/phlex/table/templates/table.rb.erb
|
169
|
-
- lib/generators/phlex/view/USAGE
|
170
|
-
- lib/generators/phlex/view/templates/view.rb.erb
|
171
|
-
- lib/generators/phlex/view/view_generator.rb
|
172
|
-
- lib/install/phlex.rb
|
173
47
|
- lib/overrides/symbol/name.rb
|
174
48
|
- lib/phlex.rb
|
175
|
-
- lib/phlex/block.rb
|
176
49
|
- lib/phlex/buffered.rb
|
177
50
|
- lib/phlex/callable.rb
|
178
51
|
- lib/phlex/collection.rb
|
179
|
-
- lib/phlex/compiler.rb
|
180
|
-
- lib/phlex/compiler/elements.rb
|
181
|
-
- lib/phlex/compiler/formatter.rb
|
182
|
-
- lib/phlex/compiler/generators/content.rb
|
183
|
-
- lib/phlex/compiler/generators/element.rb
|
184
|
-
- lib/phlex/compiler/nodes/base.rb
|
185
|
-
- lib/phlex/compiler/nodes/call.rb
|
186
|
-
- lib/phlex/compiler/nodes/command.rb
|
187
|
-
- lib/phlex/compiler/nodes/fcall.rb
|
188
|
-
- lib/phlex/compiler/nodes/method_add_block.rb
|
189
|
-
- lib/phlex/compiler/nodes/vcall.rb
|
190
|
-
- lib/phlex/compiler/optimizer.rb
|
191
|
-
- lib/phlex/compiler/visitors/base.rb
|
192
|
-
- lib/phlex/compiler/visitors/file.rb
|
193
|
-
- lib/phlex/compiler/visitors/stable_scope.rb
|
194
|
-
- lib/phlex/compiler/visitors/statements.rb
|
195
|
-
- lib/phlex/compiler/visitors/view.rb
|
196
|
-
- lib/phlex/compiler/visitors/view_method.rb
|
197
52
|
- lib/phlex/configuration.rb
|
198
53
|
- lib/phlex/elements.rb
|
54
|
+
- lib/phlex/experimental.rb
|
199
55
|
- lib/phlex/helpers.rb
|
200
56
|
- lib/phlex/html.rb
|
201
|
-
- lib/phlex/html/callbacks.rb
|
202
|
-
- lib/phlex/markdown.rb
|
203
|
-
- lib/phlex/rails.rb
|
204
|
-
- lib/phlex/rails/engine.rb
|
205
|
-
- lib/phlex/rails/form.rb
|
206
|
-
- lib/phlex/rails/helpers.rb
|
207
|
-
- lib/phlex/rails/layout.rb
|
208
|
-
- lib/phlex/renderable.rb
|
209
57
|
- lib/phlex/table.rb
|
210
|
-
- lib/phlex/testing/capybara.rb
|
211
|
-
- lib/phlex/testing/nokogiri.rb
|
212
|
-
- lib/phlex/testing/rails.rb
|
213
58
|
- lib/phlex/testing/view_helper.rb
|
214
|
-
- lib/phlex/translation.rb
|
215
59
|
- lib/phlex/turbo/frame.rb
|
216
60
|
- lib/phlex/turbo/stream.rb
|
217
61
|
- lib/phlex/version.rb
|
218
|
-
- lib/tasks/phlex_tasks.rake
|
219
|
-
- package-lock.json
|
220
|
-
- package.json
|
221
62
|
- phlex_logo.png
|
222
63
|
- sig/phlex.rbs
|
223
|
-
- tailwind.config.js
|
224
64
|
homepage: https://www.phlex.fun
|
225
65
|
licenses:
|
226
66
|
- MIT
|
@@ -241,12 +81,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
241
81
|
version: '2.7'
|
242
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
83
|
requirements:
|
244
|
-
- - "
|
84
|
+
- - ">"
|
245
85
|
- !ruby/object:Gem::Version
|
246
|
-
version:
|
86
|
+
version: 1.3.1
|
247
87
|
requirements: []
|
248
88
|
rubygems_version: 3.3.25
|
249
89
|
signing_key:
|
250
90
|
specification_version: 4
|
251
|
-
summary: A framework for building views
|
91
|
+
summary: A framework for building views in Ruby.
|
252
92
|
test_files: []
|
data/Procfile.dev
DELETED
data/Rakefile
DELETED