actionview-svelte-handler 0.5.7 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/package.json CHANGED
@@ -2,6 +2,7 @@
2
2
  "name": "actionview-svelte-handler",
3
3
  "type": "module",
4
4
  "private": true,
5
+ "main": "lib/svelte/js/builder.js",
5
6
  "types": "lib/ts/types/builder.d.ts",
6
7
  "typescript": {
7
8
  "definition": "lib/ts/types/builder.d.ts"
@@ -16,10 +17,17 @@
16
17
  "dependencies": {
17
18
  "@babel/core": "^7.25.2",
18
19
  "@babel/preset-env": "^7.25.3",
19
- "esbuild-svelte": "^0.8.1",
20
+ "@rollup/plugin-alias": "^5.1.1",
21
+ "@rollup/plugin-commonjs": "^26.0.2",
22
+ "@rollup/plugin-node-resolve": "^15.2.4",
23
+ "@rollup/plugin-swc": "^0.4.0",
24
+ "@rollup/plugin-virtual": "^3.0.2",
25
+ "@swc/core": "^1.7.26",
20
26
  "module-from-string": "^3.3.1",
21
27
  "recast": "^0.23.9",
22
- "svelte": "^4.2.18",
28
+ "rollup": "^4.22.4",
29
+ "rollup-plugin-svelte": "^7.2.2",
30
+ "svelte": "^4.2.19",
23
31
  "svelte-preprocess": "^6.0.2"
24
32
  },
25
33
  "engines": {
@@ -36,7 +44,7 @@
36
44
  "docs:deploy": "vitepress build docs && surge docs/.vitepress/dist"
37
45
  },
38
46
  "devDependencies": {
39
- "esbuild": "0.23.0",
47
+ "@types/convert-source-map": "^2.0.3",
40
48
  "surge": "^0.23.1",
41
49
  "ts-standard": "^12.0.2",
42
50
  "typescript": "^5.5.4",
@@ -6,7 +6,7 @@ gems:
6
6
  source:
7
7
  type: git
8
8
  name: ruby/gem_rbs_collection
9
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
9
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
10
10
  remote: https://github.com/ruby/gem_rbs_collection.git
11
11
  repo_dir: gems
12
12
  - name: actionmailer
@@ -14,7 +14,7 @@ gems:
14
14
  source:
15
15
  type: git
16
16
  name: ruby/gem_rbs_collection
17
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
17
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
18
18
  remote: https://github.com/ruby/gem_rbs_collection.git
19
19
  repo_dir: gems
20
20
  - name: actionpack
@@ -22,7 +22,7 @@ gems:
22
22
  source:
23
23
  type: git
24
24
  name: ruby/gem_rbs_collection
25
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
25
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
26
26
  remote: https://github.com/ruby/gem_rbs_collection.git
27
27
  repo_dir: gems
28
28
  - name: actionview
@@ -30,7 +30,7 @@ gems:
30
30
  source:
31
31
  type: git
32
32
  name: ruby/gem_rbs_collection
33
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
33
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
34
34
  remote: https://github.com/ruby/gem_rbs_collection.git
35
35
  repo_dir: gems
36
36
  - name: activejob
@@ -38,7 +38,7 @@ gems:
38
38
  source:
39
39
  type: git
40
40
  name: ruby/gem_rbs_collection
41
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
41
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
42
42
  remote: https://github.com/ruby/gem_rbs_collection.git
43
43
  repo_dir: gems
44
44
  - name: activemodel
@@ -46,7 +46,7 @@ gems:
46
46
  source:
47
47
  type: git
48
48
  name: ruby/gem_rbs_collection
49
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
49
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
50
50
  remote: https://github.com/ruby/gem_rbs_collection.git
51
51
  repo_dir: gems
52
52
  - name: activerecord
@@ -54,7 +54,7 @@ gems:
54
54
  source:
55
55
  type: git
56
56
  name: ruby/gem_rbs_collection
57
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
57
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
58
58
  remote: https://github.com/ruby/gem_rbs_collection.git
59
59
  repo_dir: gems
60
60
  - name: activestorage
@@ -62,7 +62,7 @@ gems:
62
62
  source:
63
63
  type: git
64
64
  name: ruby/gem_rbs_collection
65
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
65
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
66
66
  remote: https://github.com/ruby/gem_rbs_collection.git
67
67
  repo_dir: gems
68
68
  - name: activesupport
@@ -70,7 +70,7 @@ gems:
70
70
  source:
71
71
  type: git
72
72
  name: ruby/gem_rbs_collection
73
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
73
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
74
74
  remote: https://github.com/ruby/gem_rbs_collection.git
75
75
  repo_dir: gems
76
76
  - name: ast
@@ -78,7 +78,7 @@ gems:
78
78
  source:
79
79
  type: git
80
80
  name: ruby/gem_rbs_collection
81
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
81
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
82
82
  remote: https://github.com/ruby/gem_rbs_collection.git
83
83
  repo_dir: gems
84
84
  - name: base64
@@ -98,7 +98,7 @@ gems:
98
98
  source:
99
99
  type: git
100
100
  name: ruby/gem_rbs_collection
101
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
101
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
102
102
  remote: https://github.com/ruby/gem_rbs_collection.git
103
103
  repo_dir: gems
104
104
  - name: connection_pool
@@ -106,7 +106,7 @@ gems:
106
106
  source:
107
107
  type: git
108
108
  name: ruby/gem_rbs_collection
109
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
109
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
110
110
  remote: https://github.com/ruby/gem_rbs_collection.git
111
111
  repo_dir: gems
112
112
  - name: csv
@@ -138,7 +138,7 @@ gems:
138
138
  source:
139
139
  type: git
140
140
  name: ruby/gem_rbs_collection
141
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
141
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
142
142
  remote: https://github.com/ruby/gem_rbs_collection.git
143
143
  repo_dir: gems
144
144
  - name: i18n
@@ -146,7 +146,7 @@ gems:
146
146
  source:
147
147
  type: git
148
148
  name: ruby/gem_rbs_collection
149
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
149
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
150
150
  remote: https://github.com/ruby/gem_rbs_collection.git
151
151
  repo_dir: gems
152
152
  - name: io-console
@@ -162,7 +162,7 @@ gems:
162
162
  source:
163
163
  type: git
164
164
  name: ruby/gem_rbs_collection
165
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
165
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
166
166
  remote: https://github.com/ruby/gem_rbs_collection.git
167
167
  repo_dir: gems
168
168
  - name: logger
@@ -174,7 +174,7 @@ gems:
174
174
  source:
175
175
  type: git
176
176
  name: ruby/gem_rbs_collection
177
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
177
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
178
178
  remote: https://github.com/ruby/gem_rbs_collection.git
179
179
  repo_dir: gems
180
180
  - name: marcel
@@ -182,7 +182,7 @@ gems:
182
182
  source:
183
183
  type: git
184
184
  name: ruby/gem_rbs_collection
185
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
185
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
186
186
  remote: https://github.com/ruby/gem_rbs_collection.git
187
187
  repo_dir: gems
188
188
  - name: mini_mime
@@ -190,7 +190,7 @@ gems:
190
190
  source:
191
191
  type: git
192
192
  name: ruby/gem_rbs_collection
193
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
193
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
194
194
  remote: https://github.com/ruby/gem_rbs_collection.git
195
195
  repo_dir: gems
196
196
  - name: minitest
@@ -218,19 +218,27 @@ gems:
218
218
  source:
219
219
  type: git
220
220
  name: ruby/gem_rbs_collection
221
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
221
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
222
222
  remote: https://github.com/ruby/gem_rbs_collection.git
223
223
  repo_dir: gems
224
224
  - name: optparse
225
225
  version: '0'
226
226
  source:
227
227
  type: stdlib
228
+ - name: parallel
229
+ version: '1.20'
230
+ source:
231
+ type: git
232
+ name: ruby/gem_rbs_collection
233
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
234
+ remote: https://github.com/ruby/gem_rbs_collection.git
235
+ repo_dir: gems
228
236
  - name: parser
229
237
  version: '3.2'
230
238
  source:
231
239
  type: git
232
240
  name: ruby/gem_rbs_collection
233
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
241
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
234
242
  remote: https://github.com/ruby/gem_rbs_collection.git
235
243
  repo_dir: gems
236
244
  - name: pathname
@@ -250,7 +258,7 @@ gems:
250
258
  source:
251
259
  type: git
252
260
  name: ruby/gem_rbs_collection
253
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
261
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
254
262
  remote: https://github.com/ruby/gem_rbs_collection.git
255
263
  repo_dir: gems
256
264
  - name: rails-dom-testing
@@ -258,7 +266,7 @@ gems:
258
266
  source:
259
267
  type: git
260
268
  name: ruby/gem_rbs_collection
261
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
269
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
262
270
  remote: https://github.com/ruby/gem_rbs_collection.git
263
271
  repo_dir: gems
264
272
  - name: railties
@@ -266,7 +274,7 @@ gems:
266
274
  source:
267
275
  type: git
268
276
  name: ruby/gem_rbs_collection
269
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
277
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
270
278
  remote: https://github.com/ruby/gem_rbs_collection.git
271
279
  repo_dir: gems
272
280
  - name: rainbow
@@ -274,7 +282,7 @@ gems:
274
282
  source:
275
283
  type: git
276
284
  name: ruby/gem_rbs_collection
277
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
285
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
278
286
  remote: https://github.com/ruby/gem_rbs_collection.git
279
287
  repo_dir: gems
280
288
  - name: rake
@@ -282,17 +290,41 @@ gems:
282
290
  source:
283
291
  type: git
284
292
  name: ruby/gem_rbs_collection
285
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
293
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
286
294
  remote: https://github.com/ruby/gem_rbs_collection.git
287
295
  repo_dir: gems
288
296
  - name: rbs
289
- version: 3.5.2
297
+ version: 3.5.3
290
298
  source:
291
299
  type: rubygems
292
300
  - name: rdoc
293
301
  version: '0'
294
302
  source:
295
303
  type: stdlib
304
+ - name: regexp_parser
305
+ version: '2.8'
306
+ source:
307
+ type: git
308
+ name: ruby/gem_rbs_collection
309
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
310
+ remote: https://github.com/ruby/gem_rbs_collection.git
311
+ repo_dir: gems
312
+ - name: rubocop
313
+ version: '1.57'
314
+ source:
315
+ type: git
316
+ name: ruby/gem_rbs_collection
317
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
318
+ remote: https://github.com/ruby/gem_rbs_collection.git
319
+ repo_dir: gems
320
+ - name: rubocop-ast
321
+ version: '1.30'
322
+ source:
323
+ type: git
324
+ name: ruby/gem_rbs_collection
325
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
326
+ remote: https://github.com/ruby/gem_rbs_collection.git
327
+ repo_dir: gems
296
328
  - name: securerandom
297
329
  version: '0'
298
330
  source:
@@ -314,7 +346,7 @@ gems:
314
346
  source:
315
347
  type: git
316
348
  name: ruby/gem_rbs_collection
317
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
349
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
318
350
  remote: https://github.com/ruby/gem_rbs_collection.git
319
351
  repo_dir: gems
320
352
  - name: time
@@ -334,7 +366,7 @@ gems:
334
366
  source:
335
367
  type: git
336
368
  name: ruby/gem_rbs_collection
337
- revision: 7062b1ca78ffa29275176daa236f9e1cf4018723
369
+ revision: f5ccba01753a601607c36f3eb1b5b213307300ab
338
370
  remote: https://github.com/ruby/gem_rbs_collection.git
339
371
  repo_dir: gems
340
372
  - name: uri
@@ -1,38 +1,39 @@
1
1
  module Svelte
2
- class CompilerError
3
- # TODO: ActiveSupport::SyntaxErrorProxy is untyped, so this is an incomplete type definition
4
- attr_accessor location: { file: String, line: Integer, lineText: String, suggestion: String }
5
- attr_accessor suggestion: String
6
- attr_accessor template: ActionView::Template
7
- attr_accessor message: String
8
-
9
- def initialize: (String, ActionView::Template) -> self
10
-
11
- def backtrace: -> Array[String]
12
- def cause: -> nil
13
- def binding: -> Array[Binding]
14
- def backtrace_locations: -> Array[untyped]
15
- def annotated_source_code: -> Array[String]
16
- end
2
+ module Errors
3
+ class CompilerError
4
+ # TODO: ActiveSupport::SyntaxErrorProxy is untyped, so this is an incomplete type definition
5
+ attr_accessor location: { file: String, line: Integer, lineText: String, suggestion: String }
6
+ attr_accessor suggestion: String
7
+ attr_accessor template: ActionView::Template
8
+ attr_accessor message: String
9
+
10
+ def initialize: (String, ActionView::Template) -> self
11
+
12
+ def backtrace: -> Array[String]
13
+ def cause: -> nil
14
+ def binding: -> Array[Binding]
15
+ def backtrace_locations: -> Array[untyped]
16
+ def annotated_source_code: -> Array[String]
17
+ end
17
18
 
18
- class TemplateError
19
- SOURCE_CODE_RADIUS: Integer
20
- attr_reader template: ActionView::Template
21
- attr_reader cause: Svelte::CompilerError
22
-
23
- def initialize: (ActionView::Template, CompilerError) -> self
24
-
25
- def message: -> String
26
- def annotated_source_code: -> Array[String]
27
- # ActionView::Template::Error stuff here
28
- def file_name: -> String
29
- def line_number: -> String?
30
- def source_extract: (Integer?) -> Array[String]
31
- def backtrace: -> Array[String]
32
-
33
- private
34
- def formatted_code_for: (Array[String], Integer?, Integer) -> Array[String]
35
- def source_location: -> String
36
-
19
+ class TemplateError
20
+ SOURCE_CODE_RADIUS: Integer
21
+ attr_reader template: ActionView::Template
22
+ attr_reader cause: Svelte::Errors::CompilerError
23
+
24
+ def initialize: (ActionView::Template, Errors::CompilerError) -> self
25
+
26
+ def message: -> String
27
+ def annotated_source_code: -> Array[String]
28
+ # ActionView::Template::Error stuff here
29
+ def file_name: -> String
30
+ def line_number: -> String?
31
+ def source_extract: (Integer?) -> Array[String]
32
+ def backtrace: -> Array[String]
33
+
34
+ private
35
+ def formatted_code_for: (Array[String], Integer?, Integer) -> Array[String]
36
+ def source_location: -> String
37
+ end
37
38
  end
38
39
  end
data/sig/lib/svelte.rbs CHANGED
@@ -11,7 +11,7 @@ module Svelte
11
11
  def self.preprocess: -> flexi_hash
12
12
 
13
13
  def self.ssr=: (boolish) -> void
14
- def self.aliases=: (strict_hash) -> void
14
+ def self.aliases=: (strict_hash, bool) -> void
15
15
  def self.preprocess=: (flexi_hash) -> void
16
16
 
17
17
  def self.props: -> flexi_hash
data/tmp/.gitkeep ADDED
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionview-svelte-handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - reesericci
8
- autorequire:
8
+ autorequire: svelte
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-07 00:00:00.000000000 Z
11
+ date: 2024-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '7.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: zeitwerk
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2'
27
41
  description: Documentation is available at https://svelte.rb.obl.ong
28
42
  email:
29
43
  - me@reeseric.ci
@@ -44,6 +58,7 @@ files:
44
58
  - actionview-svelte-handler.gemspec
45
59
  - bin/test
46
60
  - build.esbuild.js
61
+ - lib/actionview-svelte-handler.rb
47
62
  - lib/generators/svelte/install_generator.rb
48
63
  - lib/generators/svelte/templates/install/initializer.rb
49
64
  - lib/svelte.rb
@@ -70,7 +85,7 @@ files:
70
85
  - sig/lib/svelte/handler.rbs
71
86
  - sig/lib/svelte/helpers.rbs
72
87
  - sig/lib/svelte/version.rbs
73
- - svelte-on-rails.png
88
+ - tmp/.gitkeep
74
89
  - tsconfig.json
75
90
  - watch.esbuild.js
76
91
  homepage: https://svelte.rb.obl.ong
data/svelte-on-rails.png DELETED
Binary file