lightningcss 1.33.0-arm-linux-gnu → 1.33.0.2-arm-linux-gnu

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.
@@ -0,0 +1,104 @@
1
+ # Generated from lib/lightningcss/node.rb with RBS::Inline
2
+
3
+ module LightningCSS
4
+ # One object in the AST Lightning CSS parsed a stylesheet to.
5
+ #
6
+ # root = LightningCSS.parse(".a { color: red }").root
7
+ #
8
+ # root.type #=> "stylesheet"
9
+ # root.every("declaration") #=> every declaration in the stylesheet
10
+ # root.rules.first.value.location #=> {"source_index" => 0, "line" => 0, "column" => 1}
11
+ #
12
+ # Every object in the tree is a node, so reads chain all the way down. Most say what they are
13
+ # with their own `type`. The stylesheet, a declaration block, and a declaration do not, so a node
14
+ # names those from where it sits.
15
+ class Node
16
+ include Enumerable[LightningCSS::Node]
17
+
18
+ POSITION: Array[String]
19
+
20
+ DECLARATIONS: Array[String]
21
+
22
+ attr_reader parent: LightningCSS::Node?
23
+
24
+ attr_reader field: String?
25
+
26
+ # : (Hash[String, untyped], ?LightningCSS::Node?, ?String?) -> void
27
+ def initialize: (Hash[String, untyped], ?LightningCSS::Node?, ?String?) -> void
28
+
29
+ # : () -> String?
30
+ def type: () -> String?
31
+
32
+ # : () -> String?
33
+ def underscored_type: () -> String?
34
+
35
+ # : () -> bool
36
+ def rule?: () -> bool
37
+
38
+ # : () -> Hash[String, Integer]?
39
+ def location: () -> Hash[String, Integer]?
40
+
41
+ # : (String) -> untyped
42
+ def []: (String) -> untyped
43
+
44
+ # : () -> Array[String]
45
+ def keys: () -> Array[String]
46
+
47
+ # : () -> Hash[String, untyped]
48
+ def to_h: () -> Hash[String, untyped]
49
+
50
+ # : (?untyped) -> String
51
+ def to_json: (?untyped) -> String
52
+
53
+ # : (Array[Symbol]?) -> Hash[Symbol, untyped]
54
+ def deconstruct_keys: (Array[Symbol]?) -> Hash[Symbol, untyped]
55
+
56
+ # : () -> Array[LightningCSS::Node]
57
+ def child_nodes: () -> Array[LightningCSS::Node]
58
+
59
+ # : () { (LightningCSS::Node) -> void } -> void
60
+ # : () -> Enumerator[LightningCSS::Node, void]
61
+ def each: () { (LightningCSS::Node) -> void } -> void
62
+ | () -> Enumerator[LightningCSS::Node, void]
63
+
64
+ # : () -> Array[LightningCSS::Node]
65
+ def ancestors: () -> Array[LightningCSS::Node]
66
+
67
+ # : (String) -> Array[LightningCSS::Node]
68
+ def every: (String) -> Array[LightningCSS::Node]
69
+
70
+ # : () -> Hash[String, untyped]
71
+ def fields: () -> Hash[String, untyped]
72
+
73
+ # : () -> String
74
+ def inspect: () -> String
75
+
76
+ # : (Symbol, *untyped) -> untyped
77
+ def method_missing: (Symbol, *untyped) -> untyped
78
+
79
+ # : (Symbol, ?bool) -> bool
80
+ def respond_to_missing?: (Symbol, ?bool) -> bool
81
+
82
+ attr_reader attributes: Hash[String, untyped]
83
+
84
+ private
85
+
86
+ # : () -> String?
87
+ def inferred_type: () -> String?
88
+
89
+ # : (untyped, String) -> Array[LightningCSS::Node]
90
+ def nodes_in: (untyped, String) -> Array[LightningCSS::Node]
91
+
92
+ # : (String, untyped) -> String
93
+ def described_field: (String, untyped) -> String
94
+
95
+ # : (Array[untyped]) -> String
96
+ def counted: (Array[untyped]) -> String
97
+
98
+ # : (String) -> String?
99
+ def field_for: (String) -> String?
100
+
101
+ # : (untyped, String) -> untyped
102
+ def wrap: (untyped, String) -> untyped
103
+ end
104
+ end
@@ -13,6 +13,8 @@ module LightningCSS
13
13
 
14
14
  STYLE_ATTRIBUTE: Array[Symbol]
15
15
 
16
+ PARSE: Array[Symbol]
17
+
16
18
  BUNDLE: Array[Symbol]
17
19
 
18
20
  attr_reader to_h: Hash[Symbol, untyped]
@@ -0,0 +1,30 @@
1
+ # Generated from lib/lightningcss/parse_result.rb with RBS::Inline
2
+
3
+ module LightningCSS
4
+ # What a stylesheet parsed to.
5
+ #
6
+ # `stylesheet` is the AST exactly as Lightning CSS serializes it, and `root` is the same tree as a
7
+ # `LightningCSS::Node` to walk. `warnings` are the ones a transform would have reported.
8
+ class ParseResult
9
+ attr_reader source: String?
10
+
11
+ attr_reader stylesheet: Hash[String, untyped]
12
+
13
+ attr_reader warnings: Array[LightningCSS::Warning]
14
+
15
+ # : (String, ?String?) -> LightningCSS::ParseResult
16
+ def self.from_json: (String, ?String?) -> LightningCSS::ParseResult
17
+
18
+ # : (stylesheet: Hash[String, untyped], warnings: Array[LightningCSS::Warning], ?source: String?) -> void
19
+ def initialize: (stylesheet: Hash[String, untyped], warnings: Array[LightningCSS::Warning], ?source: String?) -> void
20
+
21
+ # : () -> LightningCSS::Node
22
+ def root: () -> LightningCSS::Node
23
+
24
+ # : () -> bool
25
+ def warnings?: () -> bool
26
+
27
+ # : () -> String
28
+ def inspect: () -> String
29
+ end
30
+ end
@@ -14,13 +14,13 @@ module LightningCSS
14
14
 
15
15
  attr_reader exports: Hash[String, String]?
16
16
 
17
- attr_reader warnings: Array[String]
17
+ attr_reader warnings: Array[LightningCSS::Warning]
18
18
 
19
19
  # : (String) -> LightningCSS::Result
20
20
  def self.from_json: (String) -> LightningCSS::Result
21
21
 
22
- # : (code: String, warnings: Array[String], ?exports: Hash[String, String]?) -> void
23
- def initialize: (code: String, warnings: Array[String], ?exports: Hash[String, String]?) -> void
22
+ # : (code: String, warnings: Array[LightningCSS::Warning], ?exports: Hash[String, String]?) -> void
23
+ def initialize: (code: String, warnings: Array[LightningCSS::Warning], ?exports: Hash[String, String]?) -> void
24
24
 
25
25
  # : () -> bool
26
26
  def warnings?: () -> bool
@@ -21,6 +21,9 @@ module LightningCSS
21
21
 
22
22
  alias call transform
23
23
 
24
+ # : (String, ?filename: String?, ?error_recovery: bool) -> LightningCSS::ParseResult
25
+ def parse: (String, ?filename: String?, ?error_recovery: bool) -> LightningCSS::ParseResult
26
+
24
27
  # : (String, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
25
28
  def bundle: (String, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
26
29
 
@@ -1,17 +1,19 @@
1
1
  # Note: This file is hand written, `rbs-inline` does not generate this file.
2
2
 
3
3
  module LightningCSS
4
+ type version = Integer | Float | String
5
+
4
6
  type browsers = {
5
- ?android: Integer,
6
- ?chrome: Integer,
7
- ?edge: Integer,
8
- ?firefox: Integer,
9
- ?ie: Integer,
10
- ?ios: Integer,
11
- ?ios_saf: Integer,
12
- ?opera: Integer,
13
- ?safari: Integer,
14
- ?samsung: Integer
7
+ ?android: version,
8
+ ?chrome: version,
9
+ ?edge: version,
10
+ ?firefox: version,
11
+ ?ie: version,
12
+ ?ios: version,
13
+ ?ios_saf: version,
14
+ ?opera: version,
15
+ ?safari: version,
16
+ ?samsung: version
15
17
  }
16
18
 
17
19
  type css_modules = bool | {
@@ -0,0 +1,24 @@
1
+ # Generated from lib/lightningcss/visitor.rb with RBS::Inline
2
+
3
+ module LightningCSS
4
+ # Walks an AST, answering each node with the method named after it and walking through anything
5
+ # nothing answers.
6
+ #
7
+ # class Colors < LightningCSS::Visitor
8
+ # def visit_declaration(node)
9
+ # puts node.value.type if node.property == "color"
10
+ # end
11
+ # end
12
+ #
13
+ # Colors.new.visit(LightningCSS.parse(".a { color: red }"))
14
+ #
15
+ # A rule is answered as one, as in `visit_style_rule` or `visit_media_rule`, since `style`,
16
+ # `nesting`, and `namespace` are also what a selector is made of.
17
+ class Visitor
18
+ # : (LightningCSS::Node | LightningCSS::ParseResult) -> void
19
+ def visit: (LightningCSS::Node | LightningCSS::ParseResult) -> void
20
+
21
+ # : (LightningCSS::Node) -> void
22
+ def visit_children: (LightningCSS::Node) -> void
23
+ end
24
+ end
@@ -0,0 +1,36 @@
1
+ # Generated from lib/lightningcss/warning.rb with RBS::Inline
2
+
3
+ module LightningCSS
4
+ class Warning
5
+ attr_reader message: String
6
+
7
+ attr_reader type: String?
8
+
9
+ attr_reader location: LightningCSS::Location?
10
+
11
+ # : (Hash[String, untyped]) -> LightningCSS::Warning
12
+ def self.from_hash: (Hash[String, untyped]) -> LightningCSS::Warning
13
+
14
+ # : (message: String, ?type: String?, ?location: LightningCSS::Location?) -> void
15
+ def initialize: (message: String, ?type: String?, ?location: LightningCSS::Location?) -> void
16
+
17
+ # : () -> Hash[Symbol, untyped]
18
+ def to_h: () -> Hash[Symbol, untyped]
19
+
20
+ # : () -> String
21
+ def to_s: () -> String
22
+
23
+ alias to_str to_s
24
+
25
+ # : (untyped) -> bool
26
+ def ==: (untyped) -> bool
27
+
28
+ alias eql? ==
29
+
30
+ # : () -> Integer
31
+ def hash: () -> Integer
32
+
33
+ # : () -> String
34
+ def inspect: () -> String
35
+ end
36
+ end
data/sig/lightningcss.rbs CHANGED
@@ -11,12 +11,20 @@
11
11
  # LightningCSS.transform(".title { color: red }", scope: "[data-scope-abc]").code
12
12
  # #=> ".title[data-scope-abc]{color:red}"
13
13
  #
14
+ # `parse` returns the AST instead, to walk with `LightningCSS::Node` and `LightningCSS::Visitor`:
15
+ #
16
+ # LightningCSS.parse(".a { color: red }").root.every("declaration").first.property
17
+ # #=> "color"
18
+ #
14
19
  # `LightningCSS::Options` is what the options are read by, and `LightningCSS::Transformer` holds a
15
20
  # set of them to reuse across many stylesheets.
16
21
  module LightningCSS
17
22
  # : (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
18
23
  def self.transform: (String, ?filename: String?, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
19
24
 
25
+ # : (String, ?filename: String?, ?error_recovery: bool) -> LightningCSS::ParseResult
26
+ def self.parse: (String, ?filename: String?, ?error_recovery: bool) -> LightningCSS::ParseResult
27
+
20
28
  # : (String, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
21
29
  def self.bundle: (String, ?minify: bool, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> LightningCSS::Result
22
30
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightningcss
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.33.0
4
+ version: 1.33.0.2
5
5
  platform: arm-linux-gnu
6
6
  authors:
7
7
  - Marco Roth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-12 00:00:00.000000000 Z
11
+ date: 2026-10-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby bindings for Lightning CSS, an extremely fast CSS parser, transformer,
14
14
  bundler, and minifier.
@@ -30,10 +30,15 @@ files:
30
30
  - lib/lightningcss/4.0/lightningcss.so
31
31
  - lib/lightningcss/backend.rb
32
32
  - lib/lightningcss/errors.rb
33
+ - lib/lightningcss/location.rb
34
+ - lib/lightningcss/node.rb
33
35
  - lib/lightningcss/options.rb
36
+ - lib/lightningcss/parse_result.rb
34
37
  - lib/lightningcss/result.rb
35
38
  - lib/lightningcss/transformer.rb
36
39
  - lib/lightningcss/version.rb
40
+ - lib/lightningcss/visitor.rb
41
+ - lib/lightningcss/warning.rb
37
42
  - licenses/README.md
38
43
  - licenses/lightningcss-MPL-2.0.txt
39
44
  - lightningcss.gemspec
@@ -48,11 +53,16 @@ files:
48
53
  - sig/lightningcss.rbs
49
54
  - sig/lightningcss/backend.rbs
50
55
  - sig/lightningcss/errors.rbs
56
+ - sig/lightningcss/location.rbs
57
+ - sig/lightningcss/node.rbs
51
58
  - sig/lightningcss/options.rbs
59
+ - sig/lightningcss/parse_result.rbs
52
60
  - sig/lightningcss/result.rbs
53
61
  - sig/lightningcss/transformer.rbs
54
62
  - sig/lightningcss/types.rbs
55
63
  - sig/lightningcss/version.rbs
64
+ - sig/lightningcss/visitor.rbs
65
+ - sig/lightningcss/warning.rbs
56
66
  homepage: https://github.com/marcoroth/lightningcss-ruby
57
67
  licenses:
58
68
  - MIT