rails_type_id 0.1.0

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.
Files changed (124) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +25 -0
  3. data/.ruby-version +1 -0
  4. data/README.md +46 -0
  5. data/Rakefile +16 -0
  6. data/lib/rails_type_id/concern.rb +129 -0
  7. data/lib/rails_type_id/require.rb +6 -0
  8. data/lib/rails_type_id/test_helper.rb +16 -0
  9. data/lib/rails_type_id/version.rb +6 -0
  10. data/lib/rails_type_id.rb +9 -0
  11. data/lib/tapioca/dsl/compilers/rails_type_id_compiler.rb +49 -0
  12. data/sig/rails_type_id.rbs +4 -0
  13. data/sorbet/config +4 -0
  14. data/sorbet/rbi/annotations/.gitattributes +1 -0
  15. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  16. data/sorbet/rbi/annotations/actionpack.rbi +430 -0
  17. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  18. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  19. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  20. data/sorbet/rbi/annotations/activerecord.rbi +98 -0
  21. data/sorbet/rbi/annotations/activesupport.rbi +468 -0
  22. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  23. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  24. data/sorbet/rbi/annotations/railties.rbi +61 -0
  25. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  26. data/sorbet/rbi/dsl/.gitattributes +1 -0
  27. data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +21 -0
  28. data/sorbet/rbi/dsl/active_model/validations.rbi +26 -0
  29. data/sorbet/rbi/dsl/active_support/callbacks.rbi +21 -0
  30. data/sorbet/rbi/dsl/rails_type_id/concern.rbi +22 -0
  31. data/sorbet/rbi/gems/.gitattributes +1 -0
  32. data/sorbet/rbi/gems/actioncable@8.0.2.rbi +3133 -0
  33. data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +991 -0
  34. data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +2775 -0
  35. data/sorbet/rbi/gems/actionpack@8.0.2.rbi +21167 -0
  36. data/sorbet/rbi/gems/actiontext@8.0.2.rbi +1449 -0
  37. data/sorbet/rbi/gems/actionview@8.0.2.rbi +15789 -0
  38. data/sorbet/rbi/gems/activejob@8.0.2.rbi +2864 -0
  39. data/sorbet/rbi/gems/activemodel@8.0.2.rbi +6946 -0
  40. data/sorbet/rbi/gems/activerecord@8.0.2.rbi +42458 -0
  41. data/sorbet/rbi/gems/activestorage@8.0.2.rbi +2156 -0
  42. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +21274 -0
  43. data/sorbet/rbi/gems/ast@2.4.3.rbi +586 -0
  44. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  45. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  46. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +275 -0
  47. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  48. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11734 -0
  49. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
  50. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  51. data/sorbet/rbi/gems/date@3.4.1.rbi +403 -0
  52. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  53. data/sorbet/rbi/gems/erb@5.0.2.rbi +878 -0
  54. data/sorbet/rbi/gems/erubi@1.13.1.rbi +157 -0
  55. data/sorbet/rbi/gems/globalid@1.2.1.rbi +742 -0
  56. data/sorbet/rbi/gems/i18n@1.14.7.rbi +2383 -0
  57. data/sorbet/rbi/gems/io-console@0.8.1.rbi +9 -0
  58. data/sorbet/rbi/gems/json@2.12.2.rbi +2287 -0
  59. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  60. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +323 -0
  61. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  62. data/sorbet/rbi/gems/loofah@2.24.1.rbi +1105 -0
  63. data/sorbet/rbi/gems/mail@2.8.1.rbi +8890 -0
  64. data/sorbet/rbi/gems/marcel@1.0.4.rbi +239 -0
  65. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +173 -0
  66. data/sorbet/rbi/gems/minitest@5.25.5.rbi +2231 -0
  67. data/sorbet/rbi/gems/net-imap@0.5.9.rbi +10285 -0
  68. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +927 -0
  69. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  70. data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +1240 -0
  71. data/sorbet/rbi/gems/netrc@0.11.0.rbi +177 -0
  72. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +388 -0
  73. data/sorbet/rbi/gems/nokogiri@1.18.9.rbi +8548 -0
  74. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  75. data/sorbet/rbi/gems/parser@3.3.9.0.rbi +5537 -0
  76. data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
  77. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  78. data/sorbet/rbi/gems/prism@1.4.0.rbi +41790 -0
  79. data/sorbet/rbi/gems/psych@5.2.6.rbi +2542 -0
  80. data/sorbet/rbi/gems/racc@1.8.1.rbi +168 -0
  81. data/sorbet/rbi/gems/rack-session@2.1.1.rbi +722 -0
  82. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +729 -0
  83. data/sorbet/rbi/gems/rack@3.2.0.rbi +5054 -0
  84. data/sorbet/rbi/gems/rackup@2.2.1.rbi +230 -0
  85. data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +790 -0
  86. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +645 -0
  87. data/sorbet/rbi/gems/rails@8.0.2.rbi +9 -0
  88. data/sorbet/rbi/gems/railties@8.0.2.rbi +4014 -0
  89. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  90. data/sorbet/rbi/gems/rake@13.3.0.rbi +3039 -0
  91. data/sorbet/rbi/gems/rbi@0.3.6.rbi +5162 -0
  92. data/sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi +7895 -0
  93. data/sorbet/rbi/gems/rdoc@6.14.2.rbi +12944 -0
  94. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3833 -0
  95. data/sorbet/rbi/gems/reline@0.6.2.rbi +9 -0
  96. data/sorbet/rbi/gems/require-hooks@0.2.2.rbi +110 -0
  97. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5205 -0
  98. data/sorbet/rbi/gems/rubocop-ast@1.46.0.rbi +7473 -0
  99. data/sorbet/rbi/gems/rubocop-sorbet@0.10.5.rbi +2386 -0
  100. data/sorbet/rbi/gems/rubocop@1.79.1.rbi +63674 -0
  101. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  102. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  103. data/sorbet/rbi/gems/spoom@1.7.5.rbi +5832 -0
  104. data/sorbet/rbi/gems/sqlite3@2.7.3.rbi +1989 -0
  105. data/sorbet/rbi/gems/stringio@3.1.7.rbi +9 -0
  106. data/sorbet/rbi/gems/tapioca@0.17.7.rbi +3692 -0
  107. data/sorbet/rbi/gems/thor@1.4.0.rbi +4399 -0
  108. data/sorbet/rbi/gems/timeout@0.4.3.rbi +157 -0
  109. data/sorbet/rbi/gems/typeid@0.2.2.rbi +239 -0
  110. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5919 -0
  111. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
  112. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
  113. data/sorbet/rbi/gems/uri@1.0.3.rbi +2354 -0
  114. data/sorbet/rbi/gems/useragent@0.16.11.rbi +9 -0
  115. data/sorbet/rbi/gems/uuid7@0.2.0.rbi +60 -0
  116. data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +1065 -0
  117. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +117 -0
  118. data/sorbet/rbi/gems/with_model@2.2.0.rbi +282 -0
  119. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +430 -0
  120. data/sorbet/rbi/gems/yard@0.9.37.rbi +18512 -0
  121. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +1196 -0
  122. data/sorbet/tapioca/config.yml +13 -0
  123. data/sorbet/tapioca/require.rb +13 -0
  124. metadata +208 -0
@@ -0,0 +1,1449 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `actiontext` gem.
5
+ # Please instead update this file by running `bin/tapioca gem actiontext`.
6
+
7
+
8
+ # :markup: markdown
9
+ # :include: ../README.md
10
+ #
11
+ # source://actiontext//lib/action_text/gem_version.rb#5
12
+ module ActionText
13
+ extend ::ActiveSupport::Autoload
14
+
15
+ class << self
16
+ # source://actiontext//lib/action_text/deprecator.rb#6
17
+ def deprecator; end
18
+
19
+ # Returns the currently loaded version of Action Text as a `Gem::Version`.
20
+ #
21
+ # source://actiontext//lib/action_text/gem_version.rb#7
22
+ def gem_version; end
23
+
24
+ # source://actiontext//lib/action_text.rb#47
25
+ def html_document_class; end
26
+
27
+ # source://actiontext//lib/action_text.rb#53
28
+ def html_document_fragment_class; end
29
+
30
+ # source://actiontext//lib/action_text/engine.rb#14
31
+ def railtie_helpers_paths; end
32
+
33
+ # source://actiontext//lib/action_text/engine.rb#14
34
+ def railtie_namespace; end
35
+
36
+ # source://actiontext//lib/action_text/engine.rb#14
37
+ def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end
38
+
39
+ # source://actiontext//lib/action_text/engine.rb#14
40
+ def table_name_prefix; end
41
+
42
+ # source://actiontext//lib/action_text/engine.rb#14
43
+ def use_relative_model_naming?; end
44
+
45
+ # Returns the currently loaded version of Action Text as a `Gem::Version`.
46
+ #
47
+ # source://actiontext//lib/action_text/version.rb#9
48
+ def version; end
49
+ end
50
+ end
51
+
52
+ # # Action Text Attachable
53
+ #
54
+ # Include this module to make a record attachable to an ActionText::Content.
55
+ #
56
+ # class Person < ApplicationRecord
57
+ # include ActionText::Attachable
58
+ # end
59
+ #
60
+ # person = Person.create! name: "Javan"
61
+ # html = %Q(<action-text-attachment sgid="#{person.attachable_sgid}"></action-text-attachment>)
62
+ # content = ActionText::Content.new(html)
63
+ # content.attachables # => [person]
64
+ #
65
+ # source://actiontext//lib/action_text/attachable.rb#18
66
+ module ActionText::Attachable
67
+ extend ::ActiveSupport::Concern
68
+
69
+ mixes_in_class_methods ::ActionText::Attachable::ClassMethods
70
+
71
+ # source://actiontext//lib/action_text/attachable.rb#83
72
+ def attachable_content_type; end
73
+
74
+ # source://actiontext//lib/action_text/attachable.rb#87
75
+ def attachable_filename; end
76
+
77
+ # source://actiontext//lib/action_text/attachable.rb#91
78
+ def attachable_filesize; end
79
+
80
+ # source://actiontext//lib/action_text/attachable.rb#95
81
+ def attachable_metadata; end
82
+
83
+ # Returns the Signed Global ID for the attachable. The purpose of the ID is set
84
+ # to 'attachable' so it can't be reused for other purposes.
85
+ #
86
+ # source://actiontext//lib/action_text/attachable.rb#79
87
+ def attachable_sgid; end
88
+
89
+ # @return [Boolean]
90
+ #
91
+ # source://actiontext//lib/action_text/attachable.rb#99
92
+ def previewable_attachable?; end
93
+
94
+ # Returns the path to the partial that is used for rendering the attachable.
95
+ # Defaults to `to_partial_path`.
96
+ #
97
+ # Override to render a different partial:
98
+ #
99
+ # class User < ApplicationRecord
100
+ # def to_attachable_partial_path
101
+ # "users/attachable"
102
+ # end
103
+ # end
104
+ #
105
+ # source://actiontext//lib/action_text/attachable.rb#127
106
+ def to_attachable_partial_path; end
107
+
108
+ # source://actiontext//lib/action_text/attachable.rb#131
109
+ def to_rich_text_attributes(attributes = T.unsafe(nil)); end
110
+
111
+ # Returns the path to the partial that is used for rendering the attachable in
112
+ # Trix. Defaults to `to_partial_path`.
113
+ #
114
+ # Override to render a different partial:
115
+ #
116
+ # class User < ApplicationRecord
117
+ # def to_trix_content_attachment_partial_path
118
+ # "users/trix_content_attachment"
119
+ # end
120
+ # end
121
+ #
122
+ # source://actiontext//lib/action_text/attachable.rb#113
123
+ def to_trix_content_attachment_partial_path; end
124
+
125
+ private
126
+
127
+ # source://actiontext//lib/action_text/attachable.rb#144
128
+ def attribute_names_for_serialization; end
129
+
130
+ # source://actiontext//lib/action_text/attachable.rb#148
131
+ def read_attribute_for_serialization(key); end
132
+
133
+ class << self
134
+ # source://actiontext//lib/action_text/attachable.rb#43
135
+ def from_attachable_sgid(sgid, options = T.unsafe(nil)); end
136
+
137
+ # Extracts the `ActionText::Attachable` from the attachment HTML node:
138
+ #
139
+ # person = Person.create! name: "Javan"
140
+ # html = %Q(<action-text-attachment sgid="#{person.attachable_sgid}"></action-text-attachment>)
141
+ # fragment = ActionText::Fragment.wrap(html)
142
+ # attachment_node = fragment.find_all(ActionText::Attachment.tag_name).first
143
+ # ActionText::Attachable.from_node(attachment_node) # => person
144
+ #
145
+ # source://actiontext//lib/action_text/attachable.rb#31
146
+ def from_node(node); end
147
+
148
+ private
149
+
150
+ # source://actiontext//lib/action_text/attachable.rb#50
151
+ def attachable_from_sgid(sgid); end
152
+ end
153
+ end
154
+
155
+ # source://actiontext//lib/action_text/attachable.rb#57
156
+ module ActionText::Attachable::ClassMethods
157
+ # source://actiontext//lib/action_text/attachable.rb#58
158
+ def from_attachable_sgid(sgid); end
159
+
160
+ # source://actiontext//lib/action_text/attachable.rb#72
161
+ def to_missing_attachable_partial_path; end
162
+ end
163
+
164
+ # source://actiontext//lib/action_text/attachable.rb#21
165
+ ActionText::Attachable::LOCATOR_NAME = T.let(T.unsafe(nil), String)
166
+
167
+ # source://actiontext//lib/action_text.rb#30
168
+ module ActionText::Attachables
169
+ extend ::ActiveSupport::Autoload
170
+ end
171
+
172
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#7
173
+ class ActionText::Attachables::ContentAttachment
174
+ include ::ActiveModel::Validations
175
+ include ::ActiveSupport::Callbacks
176
+ include ::ActiveModel::Validations::HelperMethods
177
+ include ::ActiveModel::Conversion
178
+ include ::ActiveModel::ForbiddenAttributesProtection
179
+ include ::ActiveModel::AttributeAssignment
180
+ include ::ActiveModel::API
181
+ include ::ActiveModel::Access
182
+ include ::ActiveModel::Model
183
+ extend ::ActiveModel::Validations::ClassMethods
184
+ extend ::ActiveModel::Naming
185
+ extend ::ActiveModel::Callbacks
186
+ extend ::ActiveSupport::Callbacks::ClassMethods
187
+ extend ::ActiveSupport::DescendantsTracker
188
+ extend ::ActiveModel::Translation
189
+ extend ::ActiveModel::Validations::HelperMethods
190
+ extend ::ActiveModel::Conversion::ClassMethods
191
+
192
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
193
+ def __callbacks; end
194
+
195
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
196
+ def _run_validate_callbacks(&block); end
197
+
198
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
199
+ def _validate_callbacks; end
200
+
201
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
202
+ def _validators; end
203
+
204
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
205
+ def _validators?; end
206
+
207
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#20
208
+ def attachable_plain_text_representation(caption); end
209
+
210
+ # Returns the value of attribute content.
211
+ #
212
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#15
213
+ def content; end
214
+
215
+ # Sets the attribute content
216
+ #
217
+ # @param value the value to set the attribute content to.
218
+ #
219
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#15
220
+ def content=(_arg0); end
221
+
222
+ # Returns the value of attribute content_type.
223
+ #
224
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#15
225
+ def content_type; end
226
+
227
+ # Sets the attribute content_type
228
+ #
229
+ # @param value the value to set the attribute content_type to.
230
+ #
231
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#15
232
+ def content_type=(_arg0); end
233
+
234
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
235
+ def model_name(&_arg0); end
236
+
237
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
238
+ def param_delimiter=(_arg0); end
239
+
240
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#24
241
+ def to_html; end
242
+
243
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#32
244
+ def to_partial_path; end
245
+
246
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#28
247
+ def to_s; end
248
+
249
+ private
250
+
251
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#37
252
+ def content_instance; end
253
+
254
+ class << self
255
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
256
+ def __callbacks; end
257
+
258
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
259
+ def __callbacks=(value); end
260
+
261
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
262
+ def _validate_callbacks; end
263
+
264
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
265
+ def _validate_callbacks=(value); end
266
+
267
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
268
+ def _validators; end
269
+
270
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
271
+ def _validators=(value); end
272
+
273
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
274
+ def _validators?; end
275
+
276
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#10
277
+ def from_node(node); end
278
+
279
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
280
+ def param_delimiter; end
281
+
282
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
283
+ def param_delimiter=(value); end
284
+
285
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
286
+ def param_delimiter?; end
287
+
288
+ private
289
+
290
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
291
+ def __class_attr___callbacks; end
292
+
293
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
294
+ def __class_attr___callbacks=(new_value); end
295
+
296
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
297
+ def __class_attr__validators; end
298
+
299
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
300
+ def __class_attr__validators=(new_value); end
301
+
302
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
303
+ def __class_attr_param_delimiter; end
304
+
305
+ # source://actiontext//lib/action_text/attachables/content_attachment.rb#8
306
+ def __class_attr_param_delimiter=(new_value); end
307
+ end
308
+ end
309
+
310
+ # source://actiontext//lib/action_text/attachables/missing_attachable.rb#7
311
+ class ActionText::Attachables::MissingAttachable
312
+ extend ::ActiveModel::Naming
313
+
314
+ # @return [MissingAttachable] a new instance of MissingAttachable
315
+ #
316
+ # source://actiontext//lib/action_text/attachables/missing_attachable.rb#12
317
+ def initialize(sgid); end
318
+
319
+ # source://actiontext//lib/action_text/attachables/missing_attachable.rb#24
320
+ def model; end
321
+
322
+ # source://actiontext//lib/action_text/attachables/missing_attachable.rb#8
323
+ def model_name(&_arg0); end
324
+
325
+ # source://actiontext//lib/action_text/attachables/missing_attachable.rb#16
326
+ def to_partial_path; end
327
+ end
328
+
329
+ # source://actiontext//lib/action_text/attachables/missing_attachable.rb#10
330
+ ActionText::Attachables::MissingAttachable::DEFAULT_PARTIAL_PATH = T.let(T.unsafe(nil), String)
331
+
332
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#7
333
+ class ActionText::Attachables::RemoteImage
334
+ extend ::ActiveModel::Naming
335
+
336
+ # @return [RemoteImage] a new instance of RemoteImage
337
+ #
338
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#32
339
+ def initialize(attributes = T.unsafe(nil)); end
340
+
341
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#39
342
+ def attachable_plain_text_representation(caption); end
343
+
344
+ # Returns the value of attribute content_type.
345
+ #
346
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#30
347
+ def content_type; end
348
+
349
+ # Returns the value of attribute height.
350
+ #
351
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#30
352
+ def height; end
353
+
354
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#8
355
+ def model_name(&_arg0); end
356
+
357
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#43
358
+ def to_partial_path; end
359
+
360
+ # Returns the value of attribute url.
361
+ #
362
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#30
363
+ def url; end
364
+
365
+ # Returns the value of attribute width.
366
+ #
367
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#30
368
+ def width; end
369
+
370
+ class << self
371
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#11
372
+ def from_node(node); end
373
+
374
+ private
375
+
376
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#22
377
+ def attributes_from_node(node); end
378
+
379
+ # @return [Boolean]
380
+ #
381
+ # source://actiontext//lib/action_text/attachables/remote_image.rb#18
382
+ def content_type_is_image?(content_type); end
383
+ end
384
+ end
385
+
386
+ # # Action Text Attachment
387
+ #
388
+ # Attachments serialize attachables to HTML or plain text.
389
+ #
390
+ # class Person < ApplicationRecord
391
+ # include ActionText::Attachable
392
+ # end
393
+ #
394
+ # attachable = Person.create! name: "Javan"
395
+ # attachment = ActionText::Attachment.from_attachable(attachable)
396
+ # attachment.to_html # => "<action-text-attachment sgid=\"BAh7CEk..."
397
+ #
398
+ # source://actiontext//lib/action_text/attachment.rb#19
399
+ class ActionText::Attachment
400
+ include ::ActionText::Attachments::Caching
401
+ include ::ActionText::Attachments::Minification
402
+ include ::ActionText::Attachments::TrixConversion
403
+ extend ::ActionText::Attachments::Minification::ClassMethods
404
+ extend ::ActionText::Attachments::TrixConversion::ClassMethods
405
+
406
+ # @return [Attachment] a new instance of Attachment
407
+ #
408
+ # source://actiontext//lib/action_text/attachment.rb#68
409
+ def initialize(node, attachable); end
410
+
411
+ # Returns the value of attribute attachable.
412
+ #
413
+ # source://actiontext//lib/action_text/attachment.rb#63
414
+ def attachable; end
415
+
416
+ # source://actiontext//lib/action_text/attachment.rb#73
417
+ def caption; end
418
+
419
+ # source://actiontext//lib/action_text/attachment.rb#77
420
+ def full_attributes; end
421
+
422
+ # source://actiontext//lib/action_text/attachment.rb#131
423
+ def inspect; end
424
+
425
+ # source://actiontext//lib/action_text/attachment.rb#66
426
+ def method_missing(method, *_arg1, **_arg2, &_arg3); end
427
+
428
+ # Returns the value of attribute node.
429
+ #
430
+ # source://actiontext//lib/action_text/attachment.rb#63
431
+ def node; end
432
+
433
+ # source://actiontext//lib/action_text/attachment.rb#22
434
+ def tag_name; end
435
+
436
+ # source://actiontext//lib/action_text/attachment.rb#22
437
+ def tag_name=(val); end
438
+
439
+ # Converts the attachment to HTML.
440
+ #
441
+ # attachable = Person.create! name: "Javan"
442
+ # attachment = ActionText::Attachment.from_attachable(attachable)
443
+ # attachment.to_html # => "<action-text-attachment sgid=\"BAh7CEk...
444
+ #
445
+ # source://actiontext//lib/action_text/attachment.rb#123
446
+ def to_html; end
447
+
448
+ # source://actiontext//lib/action_text/attachment.rb#65
449
+ def to_param(*_arg0, **_arg1, &_arg2); end
450
+
451
+ # Converts the attachment to plain text.
452
+ #
453
+ # attachable = ActiveStorage::Blob.find_by filename: "racecar.jpg"
454
+ # attachment = ActionText::Attachment.from_attachable(attachable)
455
+ # attachment.to_plain_text # => "[racecar.jpg]"
456
+ #
457
+ # Use the `caption` when set:
458
+ #
459
+ # attachment = ActionText::Attachment.from_attachable(attachable, caption: "Vroom vroom")
460
+ # attachment.to_plain_text # => "[Vroom vroom]"
461
+ #
462
+ # The presentation can be overridden by implementing the
463
+ # `attachable_plain_text_representation` method:
464
+ #
465
+ # class Person < ApplicationRecord
466
+ # include ActionText::Attachable
467
+ #
468
+ # def attachable_plain_text_representation
469
+ # "[#{name}]"
470
+ # end
471
+ # end
472
+ #
473
+ # attachable = Person.create! name: "Javan"
474
+ # attachment = ActionText::Attachment.from_attachable(attachable)
475
+ # attachment.to_plain_text # => "[Javan]"
476
+ #
477
+ # source://actiontext//lib/action_text/attachment.rb#110
478
+ def to_plain_text; end
479
+
480
+ # source://actiontext//lib/action_text/attachment.rb#127
481
+ def to_s; end
482
+
483
+ # source://actiontext//lib/action_text/attachment.rb#81
484
+ def with_full_attributes; end
485
+
486
+ private
487
+
488
+ # source://actiontext//lib/action_text/attachment.rb#140
489
+ def attachable_attributes; end
490
+
491
+ # source://actiontext//lib/action_text/attachment.rb#136
492
+ def node_attributes; end
493
+
494
+ # source://actiontext//lib/action_text/attachment.rb#66
495
+ def respond_to_missing?(name, include_private = T.unsafe(nil)); end
496
+
497
+ # source://actiontext//lib/action_text/attachment.rb#144
498
+ def sgid_attributes; end
499
+
500
+ class << self
501
+ # source://actiontext//lib/action_text/attachment.rb#27
502
+ def fragment_by_canonicalizing_attachments(content); end
503
+
504
+ # source://actiontext//lib/action_text/attachment.rb#39
505
+ def from_attachable(attachable, attributes = T.unsafe(nil)); end
506
+
507
+ # source://actiontext//lib/action_text/attachment.rb#35
508
+ def from_attachables(attachables); end
509
+
510
+ # source://actiontext//lib/action_text/attachment.rb#45
511
+ def from_attributes(attributes, attachable = T.unsafe(nil)); end
512
+
513
+ # source://actiontext//lib/action_text/attachment.rb#31
514
+ def from_node(node, attachable = T.unsafe(nil)); end
515
+
516
+ # source://actiontext//lib/action_text/attachment.rb#22
517
+ def tag_name; end
518
+
519
+ # source://actiontext//lib/action_text/attachment.rb#22
520
+ def tag_name=(val); end
521
+
522
+ private
523
+
524
+ # source://actiontext//lib/action_text/attachment.rb#52
525
+ def node_from_attributes(attributes); end
526
+
527
+ # source://actiontext//lib/action_text/attachment.rb#58
528
+ def process_attributes(attributes); end
529
+ end
530
+ end
531
+
532
+ # source://actiontext//lib/action_text/attachment.rb#24
533
+ ActionText::Attachment::ATTRIBUTES = T.let(T.unsafe(nil), Array)
534
+
535
+ # source://actiontext//lib/action_text/attachment_gallery.rb#6
536
+ class ActionText::AttachmentGallery
537
+ include ::ActiveModel::Validations
538
+ include ::ActiveSupport::Callbacks
539
+ include ::ActiveModel::Validations::HelperMethods
540
+ include ::ActiveModel::Conversion
541
+ include ::ActiveModel::ForbiddenAttributesProtection
542
+ include ::ActiveModel::AttributeAssignment
543
+ include ::ActiveModel::API
544
+ include ::ActiveModel::Access
545
+ include ::ActiveModel::Model
546
+ extend ::ActiveModel::Validations::ClassMethods
547
+ extend ::ActiveModel::Naming
548
+ extend ::ActiveModel::Callbacks
549
+ extend ::ActiveSupport::Callbacks::ClassMethods
550
+ extend ::ActiveSupport::DescendantsTracker
551
+ extend ::ActiveModel::Translation
552
+ extend ::ActiveModel::Validations::HelperMethods
553
+ extend ::ActiveModel::Conversion::ClassMethods
554
+
555
+ # @return [AttachmentGallery] a new instance of AttachmentGallery
556
+ #
557
+ # source://actiontext//lib/action_text/attachment_gallery.rb#54
558
+ def initialize(node); end
559
+
560
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
561
+ def __callbacks; end
562
+
563
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
564
+ def _run_validate_callbacks(&block); end
565
+
566
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
567
+ def _validate_callbacks; end
568
+
569
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
570
+ def _validators; end
571
+
572
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
573
+ def _validators?; end
574
+
575
+ # source://actiontext//lib/action_text/attachment_gallery.rb#58
576
+ def attachments; end
577
+
578
+ # source://actiontext//lib/action_text/attachment_gallery.rb#68
579
+ def inspect; end
580
+
581
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
582
+ def model_name(&_arg0); end
583
+
584
+ # Returns the value of attribute node.
585
+ #
586
+ # source://actiontext//lib/action_text/attachment_gallery.rb#52
587
+ def node; end
588
+
589
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
590
+ def param_delimiter=(_arg0); end
591
+
592
+ # source://actiontext//lib/action_text/attachment_gallery.rb#64
593
+ def size; end
594
+
595
+ class << self
596
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
597
+ def __callbacks; end
598
+
599
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
600
+ def __callbacks=(value); end
601
+
602
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
603
+ def _validate_callbacks; end
604
+
605
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
606
+ def _validate_callbacks=(value); end
607
+
608
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
609
+ def _validators; end
610
+
611
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
612
+ def _validators=(value); end
613
+
614
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
615
+ def _validators?; end
616
+
617
+ # source://actiontext//lib/action_text/attachment_gallery.rb#43
618
+ def attachment_selector; end
619
+
620
+ # source://actiontext//lib/action_text/attachment_gallery.rb#27
621
+ def find_attachment_gallery_nodes(content); end
622
+
623
+ # source://actiontext//lib/action_text/attachment_gallery.rb#13
624
+ def fragment_by_canonicalizing_attachment_galleries(content); end
625
+
626
+ # source://actiontext//lib/action_text/attachment_gallery.rb#19
627
+ def fragment_by_replacing_attachment_gallery_nodes(content); end
628
+
629
+ # source://actiontext//lib/action_text/attachment_gallery.rb#39
630
+ def from_node(node); end
631
+
632
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
633
+ def param_delimiter; end
634
+
635
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
636
+ def param_delimiter=(value); end
637
+
638
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
639
+ def param_delimiter?; end
640
+
641
+ # source://actiontext//lib/action_text/attachment_gallery.rb#47
642
+ def selector; end
643
+
644
+ private
645
+
646
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
647
+ def __class_attr___callbacks; end
648
+
649
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
650
+ def __class_attr___callbacks=(new_value); end
651
+
652
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
653
+ def __class_attr__validators; end
654
+
655
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
656
+ def __class_attr__validators=(new_value); end
657
+
658
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
659
+ def __class_attr_param_delimiter; end
660
+
661
+ # source://actiontext//lib/action_text/attachment_gallery.rb#7
662
+ def __class_attr_param_delimiter=(new_value); end
663
+ end
664
+ end
665
+
666
+ # source://actiontext//lib/action_text/attachment_gallery.rb#9
667
+ ActionText::AttachmentGallery::TAG_NAME = T.let(T.unsafe(nil), String)
668
+
669
+ # source://actiontext//lib/action_text.rb#38
670
+ module ActionText::Attachments
671
+ extend ::ActiveSupport::Autoload
672
+ end
673
+
674
+ # source://actiontext//lib/action_text/attachments/caching.rb#7
675
+ module ActionText::Attachments::Caching
676
+ # source://actiontext//lib/action_text/attachments/caching.rb#8
677
+ def cache_key(*args); end
678
+
679
+ private
680
+
681
+ # source://actiontext//lib/action_text/attachments/caching.rb#13
682
+ def cache_digest; end
683
+ end
684
+
685
+ # source://actiontext//lib/action_text/attachments/minification.rb#7
686
+ module ActionText::Attachments::Minification
687
+ extend ::ActiveSupport::Concern
688
+
689
+ mixes_in_class_methods ::ActionText::Attachments::Minification::ClassMethods
690
+ end
691
+
692
+ # source://actiontext//lib/action_text/attachments/minification.rb#10
693
+ module ActionText::Attachments::Minification::ClassMethods
694
+ # source://actiontext//lib/action_text/attachments/minification.rb#11
695
+ def fragment_by_minifying_attachments(content); end
696
+ end
697
+
698
+ # source://actiontext//lib/action_text/attachments/trix_conversion.rb#9
699
+ module ActionText::Attachments::TrixConversion
700
+ extend ::ActiveSupport::Concern
701
+
702
+ mixes_in_class_methods ::ActionText::Attachments::TrixConversion::ClassMethods
703
+
704
+ # source://actiontext//lib/action_text/attachments/trix_conversion.rb#24
705
+ def to_trix_attachment(content = T.unsafe(nil)); end
706
+
707
+ private
708
+
709
+ # source://actiontext//lib/action_text/attachments/trix_conversion.rb#31
710
+ def trix_attachment_content; end
711
+ end
712
+
713
+ # source://actiontext//lib/action_text/attachments/trix_conversion.rb#12
714
+ module ActionText::Attachments::TrixConversion::ClassMethods
715
+ # source://actiontext//lib/action_text/attachments/trix_conversion.rb#13
716
+ def fragment_by_converting_trix_attachments(content); end
717
+
718
+ # source://actiontext//lib/action_text/attachments/trix_conversion.rb#19
719
+ def from_trix_attachment(trix_attachment); end
720
+ end
721
+
722
+ # source://actiontext//lib/action_text/attribute.rb#6
723
+ module ActionText::Attribute
724
+ extend ::ActiveSupport::Concern
725
+
726
+ mixes_in_class_methods ::ActionText::Attribute::ClassMethods
727
+ end
728
+
729
+ # source://actiontext//lib/action_text/attribute.rb#9
730
+ module ActionText::Attribute::ClassMethods
731
+ # source://actiontext//lib/action_text/attribute.rb#53
732
+ def has_rich_text(name, encrypted: T.unsafe(nil), strict_loading: T.unsafe(nil), store_if_blank: T.unsafe(nil)); end
733
+
734
+ # source://actiontext//lib/action_text/attribute.rb#100
735
+ def rich_text_association_names; end
736
+
737
+ # source://actiontext//lib/action_text/attribute.rb#95
738
+ def with_all_rich_text; end
739
+ end
740
+
741
+ # # Action Text Content
742
+ #
743
+ # The `ActionText::Content` class wraps an HTML fragment to add support for
744
+ # parsing, rendering and serialization. It can be used to extract links and
745
+ # attachments, convert the fragment to plain text, or serialize the fragment to
746
+ # the database.
747
+ #
748
+ # The ActionText::RichText record serializes the `body` attribute as
749
+ # `ActionText::Content`.
750
+ #
751
+ # class Message < ActiveRecord::Base
752
+ # has_rich_text :content
753
+ # end
754
+ #
755
+ # message = Message.create!(content: "<h1>Funny times!</h1>")
756
+ # body = message.content.body # => #<ActionText::Content "<div class=\"trix-conte...">
757
+ # body.to_s # => "<h1>Funny times!</h1>"
758
+ # body.to_plain_text # => "Funny times!"
759
+ #
760
+ # source://actiontext//lib/action_text/content.rb#24
761
+ class ActionText::Content
762
+ include ::ActionText::ContentHelper
763
+ include ::ActionText::Serialization
764
+ include ::ActionText::Rendering
765
+ extend ::ActionText::Serialization::ClassMethods
766
+ extend ::ActionText::Rendering::ClassMethods
767
+
768
+ # @return [Content] a new instance of Content
769
+ #
770
+ # source://actiontext//lib/action_text/content.rb#40
771
+ def initialize(content = T.unsafe(nil), options = T.unsafe(nil)); end
772
+
773
+ # source://actiontext//lib/action_text/content.rb#169
774
+ def ==(other); end
775
+
776
+ # source://actiontext//lib/action_text/content.rb#93
777
+ def append_attachables(attachables); end
778
+
779
+ # source://actiontext//lib/action_text/content.rb#161
780
+ def as_json(*_arg0); end
781
+
782
+ # Extracts +ActionText::Attachable+s from the HTML fragment:
783
+ #
784
+ # attachable = ActiveStorage::Blob.first
785
+ # html = %Q(<action-text-attachment sgid="#{attachable.attachable_sgid}" caption="Captioned"></action-text-attachment>)
786
+ # content = ActionText::Content.new(html)
787
+ # content.attachables # => [attachable]
788
+ #
789
+ # source://actiontext//lib/action_text/content.rb#87
790
+ def attachables; end
791
+
792
+ # source://actiontext//lib/action_text/content.rb#71
793
+ def attachment_galleries; end
794
+
795
+ # Extracts +ActionText::Attachment+s from the HTML fragment:
796
+ #
797
+ # attachable = ActiveStorage::Blob.first
798
+ # html = %Q(<action-text-attachment sgid="#{attachable.attachable_sgid}" caption="Captioned"></action-text-attachment>)
799
+ # content = ActionText::Content.new(html)
800
+ # content.attachments # => [#<ActionText::Attachment attachable=#<ActiveStorage::Blob...
801
+ #
802
+ # source://actiontext//lib/action_text/content.rb#65
803
+ def attachments; end
804
+
805
+ # source://actiontext//lib/action_text/content.rb#30
806
+ def blank?(*_arg0, **_arg1, &_arg2); end
807
+
808
+ # source://actiontext//lib/action_text/content.rb#29
809
+ def deconstruct(*_arg0, **_arg1, &_arg2); end
810
+
811
+ # source://actiontext//lib/action_text/content.rb#30
812
+ def empty?(*_arg0, **_arg1, &_arg2); end
813
+
814
+ # Returns the value of attribute fragment.
815
+ #
816
+ # source://actiontext//lib/action_text/content.rb#27
817
+ def fragment; end
818
+
819
+ # source://actiontext//lib/action_text/content.rb#77
820
+ def gallery_attachments; end
821
+
822
+ # source://actiontext//lib/action_text/content.rb#30
823
+ def html_safe(*_arg0, **_arg1, &_arg2); end
824
+
825
+ # source://actiontext//lib/action_text/content.rb#165
826
+ def inspect; end
827
+
828
+ # Extracts links from the HTML fragment:
829
+ #
830
+ # html = '<a href="http://example.com/">Example</a>'
831
+ # content = ActionText::Content.new(html)
832
+ # content.links # => ["http://example.com/"]
833
+ #
834
+ # source://actiontext//lib/action_text/content.rb#55
835
+ def links; end
836
+
837
+ # source://actiontext//lib/action_text/content.rb#30
838
+ def present?(*_arg0, **_arg1, &_arg2); end
839
+
840
+ # source://actiontext//lib/action_text/content.rb#25
841
+ def render(*_arg0, **_arg1, &_arg2); end
842
+
843
+ # source://actiontext//lib/action_text/content.rb#109
844
+ def render_attachment_galleries(&block); end
845
+
846
+ # source://actiontext//lib/action_text/content.rb#98
847
+ def render_attachments(**options, &block); end
848
+
849
+ # source://actiontext//lib/action_text/content.rb#138
850
+ def to_html; end
851
+
852
+ # source://actiontext//lib/action_text/content.rb#146
853
+ def to_partial_path; end
854
+
855
+ # Returns a plain-text version of the markup contained by the content, with tags
856
+ # removed but HTML entities encoded.
857
+ #
858
+ # content = ActionText::Content.new("<h1>Funny times!</h1>")
859
+ # content.to_plain_text # => "Funny times!"
860
+ #
861
+ # content = ActionText::Content.new("<div onclick='action()'>safe<script>unsafe</script></div>")
862
+ # content.to_plain_text # => "safeunsafe"
863
+ #
864
+ # NOTE: that the returned string is not HTML safe and should not be rendered in
865
+ # browsers.
866
+ #
867
+ # content = ActionText::Content.new("&lt;script&gt;alert()&lt;/script&gt;")
868
+ # content.to_plain_text # => "<script>alert()</script>"
869
+ #
870
+ # source://actiontext//lib/action_text/content.rb#130
871
+ def to_plain_text; end
872
+
873
+ # source://actiontext//lib/action_text/content.rb#142
874
+ def to_rendered_html_with_layout; end
875
+
876
+ # Safely transforms Content into an HTML String.
877
+ #
878
+ # content = ActionText::Content.new(content: "<h1>Funny times!</h1>")
879
+ # content.to_s # => "<h1>Funny times!</h1>"
880
+ #
881
+ # content = ActionText::Content.new("<div onclick='action()'>safe<script>unsafe</script></div>")
882
+ # content.to_s # => "<div>safeunsafe</div>"
883
+ #
884
+ # source://actiontext//lib/action_text/content.rb#157
885
+ def to_s; end
886
+
887
+ # source://actiontext//lib/action_text/content.rb#134
888
+ def to_trix_html; end
889
+
890
+ private
891
+
892
+ # source://actiontext//lib/action_text/content.rb#186
893
+ def attachment_for_node(node, with_full_attributes: T.unsafe(nil)); end
894
+
895
+ # source://actiontext//lib/action_text/content.rb#191
896
+ def attachment_gallery_for_node(node); end
897
+
898
+ # source://actiontext//lib/action_text/content.rb#182
899
+ def attachment_gallery_nodes; end
900
+
901
+ # source://actiontext//lib/action_text/content.rb#178
902
+ def attachment_nodes; end
903
+
904
+ class << self
905
+ # source://actiontext//lib/action_text/content.rb#33
906
+ def fragment_by_canonicalizing_content(content); end
907
+
908
+ # source://actiontext//lib/action_text/content.rb#25
909
+ def renderer; end
910
+
911
+ # source://actiontext//lib/action_text/content.rb#25
912
+ def renderer=(obj); end
913
+ end
914
+ end
915
+
916
+ module ActionText::ContentHelper
917
+ def allowed_attributes; end
918
+ def allowed_attributes=(val); end
919
+ def allowed_tags; end
920
+ def allowed_tags=(val); end
921
+ def render_action_text_attachment(attachment, locals: T.unsafe(nil)); end
922
+ def render_action_text_attachments(content); end
923
+ def render_action_text_content(content); end
924
+ def sanitize_action_text_content(content); end
925
+ def sanitize_content_attachment(content_attachment); end
926
+ def sanitizer; end
927
+ def sanitizer=(val); end
928
+ def sanitizer_allowed_attributes; end
929
+ def sanitizer_allowed_tags; end
930
+ def scrubber; end
931
+ def scrubber=(val); end
932
+
933
+ class << self
934
+ def allowed_attributes; end
935
+ def allowed_attributes=(val); end
936
+ def allowed_tags; end
937
+ def allowed_tags=(val); end
938
+ def sanitizer; end
939
+ def sanitizer=(val); end
940
+ def scrubber; end
941
+ def scrubber=(val); end
942
+ end
943
+ end
944
+
945
+ class ActionText::EncryptedRichText < ::ActionText::RichText
946
+ include ::ActionText::EncryptedRichText::GeneratedAttributeMethods
947
+ include ::ActionText::EncryptedRichText::GeneratedAssociationMethods
948
+
949
+ class << self
950
+ private
951
+
952
+ def __class_attr__validators; end
953
+ def __class_attr__validators=(new_value); end
954
+ def __class_attr_defined_enums; end
955
+ def __class_attr_defined_enums=(new_value); end
956
+ def __class_attr_encrypted_attributes; end
957
+ def __class_attr_encrypted_attributes=(new_value); end
958
+ end
959
+ end
960
+
961
+ module ActionText::EncryptedRichText::GeneratedAssociationMethods; end
962
+ module ActionText::EncryptedRichText::GeneratedAttributeMethods; end
963
+
964
+ # source://actiontext//lib/action_text/encryption.rb#6
965
+ module ActionText::Encryption
966
+ # source://actiontext//lib/action_text/encryption.rb#14
967
+ def decrypt; end
968
+
969
+ # source://actiontext//lib/action_text/encryption.rb#7
970
+ def encrypt; end
971
+
972
+ private
973
+
974
+ # source://actiontext//lib/action_text/encryption.rb#26
975
+ def decrypt_rich_texts; end
976
+
977
+ # source://actiontext//lib/action_text/encryption.rb#22
978
+ def encrypt_rich_texts; end
979
+
980
+ # source://actiontext//lib/action_text/encryption.rb#34
981
+ def encryptable_rich_texts; end
982
+
983
+ # @return [Boolean]
984
+ #
985
+ # source://actiontext//lib/action_text/encryption.rb#30
986
+ def has_encrypted_rich_texts?; end
987
+ end
988
+
989
+ # source://actiontext//lib/action_text/engine.rb#13
990
+ class ActionText::Engine < ::Rails::Engine; end
991
+
992
+ # # Action Text FixtureSet
993
+ #
994
+ # Fixtures are a way of organizing data that you want to test against; in short,
995
+ # sample data.
996
+ #
997
+ # To learn more about fixtures, read the ActiveRecord::FixtureSet documentation.
998
+ #
999
+ # ### YAML
1000
+ #
1001
+ # Like other Active Record-backed models, ActionText::RichText records inherit
1002
+ # from ActiveRecord::Base instances and can therefore be populated by fixtures.
1003
+ #
1004
+ # Consider an `Article` class:
1005
+ #
1006
+ # class Article < ApplicationRecord
1007
+ # has_rich_text :content
1008
+ # end
1009
+ #
1010
+ # To declare fixture data for the related `content`, first declare fixture data
1011
+ # for `Article` instances in `test/fixtures/articles.yml`:
1012
+ #
1013
+ # first:
1014
+ # title: An Article
1015
+ #
1016
+ # Then declare the ActionText::RichText fixture data in
1017
+ # `test/fixtures/action_text/rich_texts.yml`, making sure to declare each
1018
+ # entry's `record:` key as a polymorphic relationship:
1019
+ #
1020
+ # first:
1021
+ # record: first (Article)
1022
+ # name: content
1023
+ # body: <div>Hello, world.</div>
1024
+ #
1025
+ # When processed, Active Record will insert database records for each fixture
1026
+ # entry and will ensure the Action Text relationship is intact.
1027
+ #
1028
+ # source://actiontext//lib/action_text/fixture_set.rb#41
1029
+ class ActionText::FixtureSet
1030
+ class << self
1031
+ # Fixtures support Action Text attachments as part of their `body` HTML.
1032
+ #
1033
+ # ### Examples
1034
+ #
1035
+ # For example, consider a second `Article` fixture declared in
1036
+ # `test/fixtures/articles.yml`:
1037
+ #
1038
+ # second:
1039
+ # title: Another Article
1040
+ #
1041
+ # You can attach a mention of `articles(:first)` to `second`'s `content` by
1042
+ # embedding a call to `ActionText::FixtureSet.attachment` in the `body:` value
1043
+ # in `test/fixtures/action_text/rich_texts.yml`:
1044
+ #
1045
+ # second:
1046
+ # record: second (Article)
1047
+ # name: content
1048
+ # body: <div>Hello, <%= ActionText::FixtureSet.attachment("articles", :first) %></div>
1049
+ #
1050
+ # source://actiontext//lib/action_text/fixture_set.rb#61
1051
+ def attachment(fixture_set_name, label, column_type: T.unsafe(nil)); end
1052
+ end
1053
+ end
1054
+
1055
+ # source://actiontext//lib/action_text/fragment.rb#6
1056
+ class ActionText::Fragment
1057
+ # @return [Fragment] a new instance of Fragment
1058
+ #
1059
+ # source://actiontext//lib/action_text/fragment.rb#28
1060
+ def initialize(source); end
1061
+
1062
+ # source://actiontext//lib/action_text/fragment.rb#26
1063
+ def deconstruct(*_arg0, **_arg1, &_arg2); end
1064
+
1065
+ # source://actiontext//lib/action_text/fragment.rb#32
1066
+ def find_all(selector); end
1067
+
1068
+ # source://actiontext//lib/action_text/fragment.rb#41
1069
+ def replace(selector); end
1070
+
1071
+ # Returns the value of attribute source.
1072
+ #
1073
+ # source://actiontext//lib/action_text/fragment.rb#24
1074
+ def source; end
1075
+
1076
+ # source://actiontext//lib/action_text/fragment.rb#54
1077
+ def to_html; end
1078
+
1079
+ # source://actiontext//lib/action_text/fragment.rb#50
1080
+ def to_plain_text; end
1081
+
1082
+ # source://actiontext//lib/action_text/fragment.rb#58
1083
+ def to_s; end
1084
+
1085
+ # @yield [source = self.source.dup]
1086
+ #
1087
+ # source://actiontext//lib/action_text/fragment.rb#36
1088
+ def update; end
1089
+
1090
+ class << self
1091
+ # source://actiontext//lib/action_text/fragment.rb#19
1092
+ def from_html(html); end
1093
+
1094
+ # source://actiontext//lib/action_text/fragment.rb#8
1095
+ def wrap(fragment_or_html); end
1096
+ end
1097
+ end
1098
+
1099
+ # source://actiontext//lib/action_text/html_conversion.rb#6
1100
+ module ActionText::HtmlConversion
1101
+ extend ::ActionText::HtmlConversion
1102
+
1103
+ # source://actiontext//lib/action_text/html_conversion.rb#17
1104
+ def create_element(tag_name, attributes = T.unsafe(nil)); end
1105
+
1106
+ # source://actiontext//lib/action_text/html_conversion.rb#13
1107
+ def fragment_for_html(html); end
1108
+
1109
+ # source://actiontext//lib/action_text/html_conversion.rb#9
1110
+ def node_to_html(node); end
1111
+
1112
+ private
1113
+
1114
+ # source://actiontext//lib/action_text/html_conversion.rb#22
1115
+ def document; end
1116
+ end
1117
+
1118
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#6
1119
+ module ActionText::PlainTextConversion
1120
+ extend ::ActionText::PlainTextConversion
1121
+
1122
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#9
1123
+ def node_to_plain_text(node); end
1124
+
1125
+ private
1126
+
1127
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#111
1128
+ def break_if_nested_list(node, text); end
1129
+
1130
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#88
1131
+ def bullet_for_li_node(node, index); end
1132
+
1133
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#100
1134
+ def indentation_for_li_node(node); end
1135
+
1136
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#107
1137
+ def list_node_depth_for_node(node); end
1138
+
1139
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#96
1140
+ def list_node_name_for_li_node(node); end
1141
+
1142
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#34
1143
+ def plain_text_for_block(node, index = T.unsafe(nil)); end
1144
+
1145
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#66
1146
+ def plain_text_for_blockquote_node(node, index); end
1147
+
1148
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#50
1149
+ def plain_text_for_br_node(node, index); end
1150
+
1151
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#58
1152
+ def plain_text_for_div_node(node, index); end
1153
+
1154
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#62
1155
+ def plain_text_for_figcaption_node(node, index); end
1156
+
1157
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#39
1158
+ def plain_text_for_h1_node(node, index = T.unsafe(nil)); end
1159
+
1160
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#76
1161
+ def plain_text_for_li_node(node, index); end
1162
+
1163
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#42
1164
+ def plain_text_for_list(node, index); end
1165
+
1166
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#14
1167
+ def plain_text_for_node(node, index = T.unsafe(nil)); end
1168
+
1169
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#22
1170
+ def plain_text_for_node_children(node); end
1171
+
1172
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#47
1173
+ def plain_text_for_ol_node(node, index); end
1174
+
1175
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#39
1176
+ def plain_text_for_p_node(node, index = T.unsafe(nil)); end
1177
+
1178
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#54
1179
+ def plain_text_for_text_node(node, index); end
1180
+
1181
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#47
1182
+ def plain_text_for_ul_node(node, index); end
1183
+
1184
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#30
1185
+ def plain_text_method_for_node(node); end
1186
+
1187
+ # source://actiontext//lib/action_text/plain_text_conversion.rb#84
1188
+ def remove_trailing_newlines(text); end
1189
+ end
1190
+
1191
+ class ActionText::Record < ::ActiveRecord::Base
1192
+ include ::ActionText::Record::GeneratedAttributeMethods
1193
+ include ::ActionText::Record::GeneratedAssociationMethods
1194
+
1195
+ class << self
1196
+ private
1197
+
1198
+ def __class_attr__validators; end
1199
+ def __class_attr__validators=(new_value); end
1200
+ def __class_attr_defined_enums; end
1201
+ def __class_attr_defined_enums=(new_value); end
1202
+ end
1203
+ end
1204
+
1205
+ module ActionText::Record::GeneratedAssociationMethods; end
1206
+ module ActionText::Record::GeneratedAttributeMethods; end
1207
+
1208
+ # source://actiontext//lib/action_text/rendering.rb#9
1209
+ module ActionText::Rendering
1210
+ extend ::ActiveSupport::Concern
1211
+
1212
+ mixes_in_class_methods ::ActionText::Rendering::ClassMethods
1213
+ end
1214
+
1215
+ # source://actiontext//lib/action_text/rendering.rb#17
1216
+ module ActionText::Rendering::ClassMethods
1217
+ # source://actiontext//lib/action_text/rendering.rb#18
1218
+ def action_controller_renderer; end
1219
+
1220
+ # source://actiontext//lib/action_text/rendering.rb#30
1221
+ def render(*args, &block); end
1222
+
1223
+ # source://actiontext//lib/action_text/rendering.rb#22
1224
+ def with_renderer(renderer); end
1225
+ end
1226
+
1227
+ class ActionText::RichText < ::ActionText::Record
1228
+ include ::ActionText::RichText::GeneratedAttributeMethods
1229
+ include ::ActionText::RichText::GeneratedAssociationMethods
1230
+
1231
+ def autosave_associated_records_for_embeds_attachments(*args); end
1232
+ def autosave_associated_records_for_embeds_blobs(*args); end
1233
+ def autosave_associated_records_for_record(*args); end
1234
+ def blank?(*_arg0, **_arg1, &_arg2); end
1235
+ def empty?(*_arg0, **_arg1, &_arg2); end
1236
+ def nil?(*_arg0, **_arg1, &_arg2); end
1237
+ def present?(*_arg0, **_arg1, &_arg2); end
1238
+ def to_plain_text; end
1239
+ def to_s(*_arg0, **_arg1, &_arg2); end
1240
+ def to_trix_html; end
1241
+ def validate_associated_records_for_embeds_attachments(*args); end
1242
+ def validate_associated_records_for_embeds_blobs(*args); end
1243
+
1244
+ class << self
1245
+ def with_attached_embeds(*args, **_arg1); end
1246
+
1247
+ private
1248
+
1249
+ def __class_attr___callbacks; end
1250
+ def __class_attr___callbacks=(new_value); end
1251
+ def __class_attr__reflections; end
1252
+ def __class_attr__reflections=(new_value); end
1253
+ def __class_attr__validators; end
1254
+ def __class_attr__validators=(new_value); end
1255
+ def __class_attr_attachment_reflections; end
1256
+ def __class_attr_attachment_reflections=(new_value); end
1257
+ def __class_attr_defined_enums; end
1258
+ def __class_attr_defined_enums=(new_value); end
1259
+ end
1260
+ end
1261
+
1262
+ module ActionText::RichText::GeneratedAssociationMethods
1263
+ def embeds; end
1264
+ def embeds=(attachables); end
1265
+ def embeds_attachment_ids; end
1266
+ def embeds_attachment_ids=(ids); end
1267
+ def embeds_attachments; end
1268
+ def embeds_attachments=(value); end
1269
+ def embeds_blob_ids; end
1270
+ def embeds_blob_ids=(ids); end
1271
+ def embeds_blobs; end
1272
+ def embeds_blobs=(value); end
1273
+ def record; end
1274
+ def record=(value); end
1275
+ def record_changed?; end
1276
+ def record_previously_changed?; end
1277
+ def reload_record; end
1278
+ def reset_record; end
1279
+ end
1280
+
1281
+ module ActionText::RichText::GeneratedAttributeMethods; end
1282
+
1283
+ # source://actiontext//lib/action_text/serialization.rb#6
1284
+ module ActionText::Serialization
1285
+ extend ::ActiveSupport::Concern
1286
+
1287
+ mixes_in_class_methods ::ActionText::Serialization::ClassMethods
1288
+
1289
+ # source://actiontext//lib/action_text/serialization.rb#34
1290
+ def _dump(*_arg0); end
1291
+ end
1292
+
1293
+ # source://actiontext//lib/action_text/serialization.rb#9
1294
+ module ActionText::Serialization::ClassMethods
1295
+ # source://actiontext//lib/action_text/serialization.rb#31
1296
+ def _load(content); end
1297
+
1298
+ # source://actiontext//lib/action_text/serialization.rb#14
1299
+ def dump(content); end
1300
+
1301
+ # source://actiontext//lib/action_text/serialization.rb#10
1302
+ def load(content); end
1303
+ end
1304
+
1305
+ module ActionText::TagHelper
1306
+ def rich_text_area_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end
1307
+ def rich_textarea_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end
1308
+
1309
+ class << self
1310
+ def id; end
1311
+ def id=(val); end
1312
+ end
1313
+ end
1314
+
1315
+ # source://actiontext//lib/action_text/trix_attachment.rb#6
1316
+ class ActionText::TrixAttachment
1317
+ # @return [TrixAttachment] a new instance of TrixAttachment
1318
+ #
1319
+ # source://actiontext//lib/action_text/trix_attachment.rb#53
1320
+ def initialize(node); end
1321
+
1322
+ # source://actiontext//lib/action_text/trix_attachment.rb#57
1323
+ def attributes; end
1324
+
1325
+ # Returns the value of attribute node.
1326
+ #
1327
+ # source://actiontext//lib/action_text/trix_attachment.rb#51
1328
+ def node; end
1329
+
1330
+ # source://actiontext//lib/action_text/trix_attachment.rb#61
1331
+ def to_html; end
1332
+
1333
+ # source://actiontext//lib/action_text/trix_attachment.rb#65
1334
+ def to_s; end
1335
+
1336
+ private
1337
+
1338
+ # source://actiontext//lib/action_text/trix_attachment.rb#70
1339
+ def attachment_attributes; end
1340
+
1341
+ # source://actiontext//lib/action_text/trix_attachment.rb#74
1342
+ def composed_attributes; end
1343
+
1344
+ # source://actiontext//lib/action_text/trix_attachment.rb#82
1345
+ def read_json_attribute(name); end
1346
+
1347
+ # source://actiontext//lib/action_text/trix_attachment.rb#78
1348
+ def read_json_object_attribute(name); end
1349
+
1350
+ class << self
1351
+ # source://actiontext//lib/action_text/trix_attachment.rb#21
1352
+ def from_attributes(attributes); end
1353
+
1354
+ private
1355
+
1356
+ # source://actiontext//lib/action_text/trix_attachment.rb#35
1357
+ def process_attributes(attributes); end
1358
+
1359
+ # source://actiontext//lib/action_text/trix_attachment.rb#39
1360
+ def transform_attribute_keys(attributes); end
1361
+
1362
+ # source://actiontext//lib/action_text/trix_attachment.rb#43
1363
+ def typecast_attribute_values(attributes); end
1364
+ end
1365
+ end
1366
+
1367
+ # source://actiontext//lib/action_text/trix_attachment.rb#11
1368
+ ActionText::TrixAttachment::ATTRIBUTES = T.let(T.unsafe(nil), Array)
1369
+
1370
+ # source://actiontext//lib/action_text/trix_attachment.rb#12
1371
+ ActionText::TrixAttachment::ATTRIBUTE_TYPES = T.let(T.unsafe(nil), Hash)
1372
+
1373
+ # source://actiontext//lib/action_text/trix_attachment.rb#10
1374
+ ActionText::TrixAttachment::COMPOSED_ATTRIBUTES = T.let(T.unsafe(nil), Array)
1375
+
1376
+ # source://actiontext//lib/action_text/trix_attachment.rb#8
1377
+ ActionText::TrixAttachment::SELECTOR = T.let(T.unsafe(nil), String)
1378
+
1379
+ # source://actiontext//lib/action_text/trix_attachment.rb#7
1380
+ ActionText::TrixAttachment::TAG_NAME = T.let(T.unsafe(nil), String)
1381
+
1382
+ # source://actiontext//lib/action_text/gem_version.rb#11
1383
+ module ActionText::VERSION; end
1384
+
1385
+ # source://actiontext//lib/action_text/gem_version.rb#12
1386
+ ActionText::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
1387
+
1388
+ # source://actiontext//lib/action_text/gem_version.rb#13
1389
+ ActionText::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
1390
+
1391
+ # source://actiontext//lib/action_text/gem_version.rb#15
1392
+ ActionText::VERSION::PRE = T.let(T.unsafe(nil), T.untyped)
1393
+
1394
+ # source://actiontext//lib/action_text/gem_version.rb#17
1395
+ ActionText::VERSION::STRING = T.let(T.unsafe(nil), String)
1396
+
1397
+ # source://actiontext//lib/action_text/gem_version.rb#14
1398
+ ActionText::VERSION::TINY = T.let(T.unsafe(nil), Integer)
1399
+
1400
+ module ActionView::Helpers
1401
+ include ::ActionView::Helpers::SanitizeHelper
1402
+ include ::ActionView::Helpers::TextHelper
1403
+ include ::ActionView::Helpers::UrlHelper
1404
+ include ::ActionView::Helpers::SanitizeHelper
1405
+ include ::ActionView::Helpers::TextHelper
1406
+ include ::ActionView::Helpers::FormTagHelper
1407
+ include ::ActionView::Helpers::FormHelper
1408
+ include ::ActionView::Helpers::TranslationHelper
1409
+
1410
+ mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods
1411
+ mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
1412
+ end
1413
+
1414
+ class ActionView::Helpers::FormBuilder
1415
+ def rich_text_area(method, options = T.unsafe(nil)); end
1416
+ def rich_textarea(method, options = T.unsafe(nil)); end
1417
+ end
1418
+
1419
+ module ActionView::Helpers::FormHelper
1420
+ include ::ActionView::Helpers::UrlHelper
1421
+ include ::ActionView::Helpers::SanitizeHelper
1422
+ include ::ActionView::Helpers::TextHelper
1423
+ include ::ActionView::Helpers::FormTagHelper
1424
+
1425
+ mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods
1426
+ mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
1427
+
1428
+ def rich_text_area(object_name, method, options = T.unsafe(nil)); end
1429
+ def rich_textarea(object_name, method, options = T.unsafe(nil)); end
1430
+ end
1431
+
1432
+ module ActionView::Helpers::Tags; end
1433
+
1434
+ class ActionView::Helpers::Tags::ActionText < ::ActionView::Helpers::Tags::Base
1435
+ include ::ActionView::Helpers::Tags::Placeholderable
1436
+
1437
+ def dom_id(*_arg0, **_arg1, &_arg2); end
1438
+ def render; end
1439
+ end
1440
+
1441
+ class ActiveRecord::Base
1442
+ include ::ActionText::Encryption
1443
+ include ::ActiveModel::ForbiddenAttributesProtection
1444
+ include ::ActiveModel::AttributeAssignment
1445
+ include ::ActiveModel::Access
1446
+ include ::ActiveModel::Serialization
1447
+ include ::ActionText::Attribute
1448
+ extend ::ActionText::Attribute::ClassMethods
1449
+ end