phlex-stimulus 0.1.2 → 0.1.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9daeb0661e299cb12e012622f2fd879e1b0a5b0cb47f35f10fa0d7a306ef1f1
|
|
4
|
+
data.tar.gz: e104306fddb134fd3aab3e8c3e987b132e209b4f59ce0196d711cb5b0ec19539
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d89cc17fb9c9d6178adf2a52c5648a2cfce4b338b0b0e703d0ed62186958c1883e35c2597010cc584fc3f63dda930890a7c00b3215f984489bd3524f726182ee
|
|
7
|
+
data.tar.gz: 4ef495c9749504edff2fb5fd93e8027ba2ca9a739872078a66b52dbaea6880132101d905c481a594b1245ed1f168d9f5ddf9dd4b4c8d4058b5f3c8206e65faf4
|
data/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
Add changes in new features here. Do not change the gem's version in pull/merge requests.
|
|
11
11
|
|
|
12
|
+
## [0.1.3] - 28.07.2026
|
|
13
|
+
|
|
14
|
+
[Diff](https://github.com/espago/phlex-stimulus/compare/v0.1.2...v0.1.3)
|
|
15
|
+
|
|
16
|
+
- Fix tapioca compiler
|
|
17
|
+
|
|
12
18
|
## [0.1.2] - 27.07.2026
|
|
13
19
|
|
|
14
20
|
[Diff](https://github.com/espago/phlex-stimulus/compare/v0.1.1...v0.1.2)
|
|
@@ -59,6 +59,17 @@ module Phlex::Stimulus::Generators
|
|
|
59
59
|
|
|
60
60
|
copy_template 'app/javascript/utils/misc.ts'
|
|
61
61
|
copy_template 'app/javascript/utils/template.ts'
|
|
62
|
+
|
|
63
|
+
append_to_file File.join(destination_root, 'sorbet', 'tapioca', 'require.rb'), <<~RUBY
|
|
64
|
+
|
|
65
|
+
# monkey patch so that tapioca doesn't override
|
|
66
|
+
# the default `new` constructor
|
|
67
|
+
class Phlex::SGML
|
|
68
|
+
class << self
|
|
69
|
+
undef_method :new
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
RUBY
|
|
62
73
|
end
|
|
63
74
|
|
|
64
75
|
private
|
|
@@ -23,7 +23,7 @@ module Tapioca
|
|
|
23
23
|
def decorate
|
|
24
24
|
root.create_path(constant) do |klass|
|
|
25
25
|
klass.comments << RBI::Comment.new(
|
|
26
|
-
<<~DOC
|
|
26
|
+
<<~DOC,
|
|
27
27
|
A Phlex component that wraps the `#{constant.controller_name.inspect}` Stimulus controller.
|
|
28
28
|
|
|
29
29
|
LINK: #{constant.controller_path}
|
|
@@ -43,12 +43,12 @@ module Tapioca
|
|
|
43
43
|
|
|
44
44
|
Result: `#{action.full_name.inspect}`
|
|
45
45
|
DOC
|
|
46
|
-
)
|
|
46
|
+
),
|
|
47
47
|
]
|
|
48
48
|
mod.create_method(
|
|
49
49
|
action.ruby_action_method_name,
|
|
50
50
|
return_type: 'String',
|
|
51
|
-
comments:
|
|
51
|
+
comments: comments,
|
|
52
52
|
)
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -62,12 +62,12 @@ module Tapioca
|
|
|
62
62
|
|
|
63
63
|
Result: `#{target.target_name.inspect}`
|
|
64
64
|
DOC
|
|
65
|
-
)
|
|
65
|
+
),
|
|
66
66
|
]
|
|
67
67
|
mod.create_method(
|
|
68
68
|
target.ruby_target_method_name,
|
|
69
69
|
return_type: 'String',
|
|
70
|
-
comments:
|
|
70
|
+
comments: comments,
|
|
71
71
|
)
|
|
72
72
|
end
|
|
73
73
|
|
data/rbi/phlex.rbi
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
|
|
3
|
+
class Phlex::HTML < Phlex::SGML
|
|
4
|
+
include ActionView::Helpers::AssetUrlHelper
|
|
5
|
+
include ActionView::Helpers::FormHelper
|
|
6
|
+
include ActionView::Helpers::AssetTagHelper
|
|
7
|
+
include ActionView::Helpers::NumberHelper
|
|
8
|
+
|
|
9
|
+
sig { params(key: T.untyped, options: T.untyped).returns(String) }
|
|
10
|
+
def t(key, **options); end
|
|
11
|
+
|
|
12
|
+
def label(**attributes); end
|
|
13
|
+
|
|
14
|
+
def form_authenticity_token(*_arg0, **_arg1, &_arg2); end
|
|
15
|
+
|
|
16
|
+
sig { returns(ApplicationController::HelperProxy) }
|
|
17
|
+
def view_context; end
|
|
18
|
+
|
|
19
|
+
# Outputs an `<svg>` tag.
|
|
20
|
+
#
|
|
21
|
+
# [MDN Docs](https://developer.mozilla.org/docs/Web/SVG/Element/svg)
|
|
22
|
+
# [Spec](https://html.spec.whatwg.org/#the-svg-element)
|
|
23
|
+
#
|
|
24
|
+
# source://phlex//lib/phlex/html.rb#20
|
|
25
|
+
#
|
|
26
|
+
#: (*untyped, **String) ?{ (Phlex::SVG) -> void } -> void
|
|
27
|
+
def svg(*args, **attrs, &block); end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
class Phlex::SGML
|
|
31
|
+
#: (String?) -> void
|
|
32
|
+
def plain(content); end
|
|
33
|
+
|
|
34
|
+
#: (String?) -> void
|
|
35
|
+
def raw(content); end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
module Phlex::Rails::Helpers::Translate
|
|
39
|
+
sig { params(key: String, _arg1: T.anything).returns(String) }
|
|
40
|
+
def t(key, **_arg1); end
|
|
41
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phlex-stimulus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Espago
|
|
@@ -130,6 +130,8 @@ files:
|
|
|
130
130
|
- lib/phlex/stimulus/components/base.rb
|
|
131
131
|
- lib/phlex/stimulus/components/controller.rb
|
|
132
132
|
- lib/phlex/stimulus/version.rb
|
|
133
|
+
- lib/tapioca/dsl/compilers/phlex_controller.rb
|
|
134
|
+
- rbi/phlex.rbi
|
|
133
135
|
- sorbet/config
|
|
134
136
|
- sorbet/rbi/annotations/.gitattributes
|
|
135
137
|
- sorbet/rbi/annotations/actionmailer.rbi
|
|
@@ -234,7 +236,6 @@ files:
|
|
|
234
236
|
- sorbet/rbi/shims/gems/rails.rbi
|
|
235
237
|
- sorbet/rbi/shims/gems/refract.rbi
|
|
236
238
|
- sorbet/rbi/shims/gems/shoulda-context.rbi
|
|
237
|
-
- sorbet/tapioca/compilers/phlex_controller.rb
|
|
238
239
|
- sorbet/tapioca/config.yml
|
|
239
240
|
- sorbet/tapioca/extensions/load_gem.rb
|
|
240
241
|
- sorbet/tapioca/require.rb
|