sass-embedded 1.74.1-aarch64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +20 -0
- data/README.md +48 -0
- data/exe/sass +21 -0
- data/ext/sass/cli.rb +12 -0
- data/ext/sass/dart-sass/sass.bat +7 -0
- data/ext/sass/dart-sass/src/LICENSE +1687 -0
- data/ext/sass/dart-sass/src/dart.exe +0 -0
- data/ext/sass/dart-sass/src/sass.snapshot +0 -0
- data/ext/sass/embedded_sass_pb.rb +63 -0
- data/lib/sass/calculation_value/calculation_operation.rb +49 -0
- data/lib/sass/calculation_value.rb +22 -0
- data/lib/sass/canonicalize_context.rb +21 -0
- data/lib/sass/compile_result.rb +24 -0
- data/lib/sass/compiler/channel.rb +68 -0
- data/lib/sass/compiler/connection.rb +92 -0
- data/lib/sass/compiler/dispatcher.rb +115 -0
- data/lib/sass/compiler/host/function_registry.rb +87 -0
- data/lib/sass/compiler/host/importer_registry.rb +137 -0
- data/lib/sass/compiler/host/logger_registry.rb +55 -0
- data/lib/sass/compiler/host/protofier.rb +390 -0
- data/lib/sass/compiler/host/structifier.rb +37 -0
- data/lib/sass/compiler/host.rb +226 -0
- data/lib/sass/compiler/varint.rb +39 -0
- data/lib/sass/compiler.rb +212 -0
- data/lib/sass/elf.rb +276 -0
- data/lib/sass/embedded/version.rb +7 -0
- data/lib/sass/embedded.rb +107 -0
- data/lib/sass/embedded_protocol.rb +10 -0
- data/lib/sass/exception.rb +69 -0
- data/lib/sass/fork_tracker.rb +51 -0
- data/lib/sass/logger/silent.rb +28 -0
- data/lib/sass/logger/source_location.rb +22 -0
- data/lib/sass/logger/source_span.rb +28 -0
- data/lib/sass/node_package_importer.rb +17 -0
- data/lib/sass/serializer.rb +36 -0
- data/lib/sass/value/argument_list.rb +37 -0
- data/lib/sass/value/boolean.rb +52 -0
- data/lib/sass/value/calculation.rb +90 -0
- data/lib/sass/value/color.rb +253 -0
- data/lib/sass/value/function.rb +51 -0
- data/lib/sass/value/fuzzy_math.rb +80 -0
- data/lib/sass/value/list.rb +79 -0
- data/lib/sass/value/map.rb +71 -0
- data/lib/sass/value/mixin.rb +36 -0
- data/lib/sass/value/null.rb +48 -0
- data/lib/sass/value/number/unit.rb +186 -0
- data/lib/sass/value/number.rb +366 -0
- data/lib/sass/value/string.rb +61 -0
- data/lib/sass/value.rb +136 -0
- data/lib/sass-embedded.rb +4 -0
- metadata +120 -0
data/lib/sass/value.rb
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sass
|
4
|
+
# The abstract base class of Sass's value types.
|
5
|
+
#
|
6
|
+
# @see https://sass-lang.com/documentation/js-api/classes/value/
|
7
|
+
module Value
|
8
|
+
# @return [::String, nil]
|
9
|
+
def separator
|
10
|
+
nil
|
11
|
+
end
|
12
|
+
|
13
|
+
# @return [::Boolean]
|
14
|
+
def bracketed?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [::Boolean]
|
19
|
+
def eql?(other)
|
20
|
+
self == other
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param index [Numeric]
|
24
|
+
# @return [Value]
|
25
|
+
def [](index)
|
26
|
+
at(index)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @param index [Numeric]
|
30
|
+
# @return [Value]
|
31
|
+
def at(index)
|
32
|
+
index < 1 && index >= -1 ? self : nil
|
33
|
+
end
|
34
|
+
|
35
|
+
# @return [Array<Value>]
|
36
|
+
def to_a
|
37
|
+
[self]
|
38
|
+
end
|
39
|
+
|
40
|
+
# @return [::Boolean]
|
41
|
+
def to_bool
|
42
|
+
true
|
43
|
+
end
|
44
|
+
|
45
|
+
# @return [Map, nil]
|
46
|
+
def to_map
|
47
|
+
nil
|
48
|
+
end
|
49
|
+
|
50
|
+
# @return [Value, nil]
|
51
|
+
def to_nil
|
52
|
+
self
|
53
|
+
end
|
54
|
+
|
55
|
+
# @return [Boolean]
|
56
|
+
# @raise [ScriptError]
|
57
|
+
def assert_boolean(name = nil)
|
58
|
+
raise Sass::ScriptError.new("#{self} is not a boolean", name)
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [Calculation]
|
62
|
+
# @raise [ScriptError]
|
63
|
+
def assert_calculation(name = nil)
|
64
|
+
raise Sass::ScriptError.new("#{self} is not a calculation", name)
|
65
|
+
end
|
66
|
+
|
67
|
+
# @return [Color]
|
68
|
+
# @raise [ScriptError]
|
69
|
+
def assert_color(name = nil)
|
70
|
+
raise Sass::ScriptError.new("#{self} is not a color", name)
|
71
|
+
end
|
72
|
+
|
73
|
+
# @return [Function]
|
74
|
+
# @raise [ScriptError]
|
75
|
+
def assert_function(name = nil)
|
76
|
+
raise Sass::ScriptError.new("#{self} is not a function", name)
|
77
|
+
end
|
78
|
+
|
79
|
+
# @return [Map]
|
80
|
+
# @raise [ScriptError]
|
81
|
+
def assert_map(name = nil)
|
82
|
+
raise Sass::ScriptError.new("#{self} is not a map", name)
|
83
|
+
end
|
84
|
+
|
85
|
+
# @return [Mixin]
|
86
|
+
# @raise [ScriptError]
|
87
|
+
def assert_mixin(name = nil)
|
88
|
+
raise Sass::ScriptError.new("#{self} is not a mixin", name)
|
89
|
+
end
|
90
|
+
|
91
|
+
# @return [Number]
|
92
|
+
# @raise [ScriptError]
|
93
|
+
def assert_number(name = nil)
|
94
|
+
raise Sass::ScriptError.new("#{self} is not a number", name)
|
95
|
+
end
|
96
|
+
|
97
|
+
# @return [String]
|
98
|
+
# @raise [ScriptError]
|
99
|
+
def assert_string(name = nil)
|
100
|
+
raise Sass::ScriptError.new("#{self} is not a string", name)
|
101
|
+
end
|
102
|
+
|
103
|
+
# @param sass_index [Number]
|
104
|
+
# @return [Integer]
|
105
|
+
def sass_index_to_array_index(sass_index, name = nil)
|
106
|
+
index = sass_index.assert_number(name).assert_integer(name)
|
107
|
+
raise Sass::ScriptError.new('List index may not be 0', name) if index.zero?
|
108
|
+
|
109
|
+
if index.abs > to_a_length
|
110
|
+
raise Sass::ScriptError.new("Invalid index #{sass_index} for a list with #{to_a_length} elements", name)
|
111
|
+
end
|
112
|
+
|
113
|
+
index.negative? ? to_a_length + index : index - 1
|
114
|
+
end
|
115
|
+
|
116
|
+
private
|
117
|
+
|
118
|
+
def to_a_length
|
119
|
+
1
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
require_relative 'calculation_value'
|
125
|
+
require_relative 'value/list'
|
126
|
+
require_relative 'value/argument_list'
|
127
|
+
require_relative 'value/boolean'
|
128
|
+
require_relative 'value/calculation'
|
129
|
+
require_relative 'value/color'
|
130
|
+
require_relative 'value/function'
|
131
|
+
require_relative 'value/fuzzy_math'
|
132
|
+
require_relative 'value/map'
|
133
|
+
require_relative 'value/mixin'
|
134
|
+
require_relative 'value/null'
|
135
|
+
require_relative 'value/number'
|
136
|
+
require_relative 'value/string'
|
metadata
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sass-embedded
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.74.1
|
5
|
+
platform: aarch64-mingw-ucrt
|
6
|
+
authors:
|
7
|
+
- なつき
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-04-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: google-protobuf
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.25'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.25'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5.0'
|
33
|
+
description: A Ruby library that will communicate with Embedded Dart Sass using the
|
34
|
+
Embedded Sass protocol.
|
35
|
+
email:
|
36
|
+
- i@ntk.me
|
37
|
+
executables:
|
38
|
+
- sass
|
39
|
+
extensions: []
|
40
|
+
extra_rdoc_files: []
|
41
|
+
files:
|
42
|
+
- LICENSE
|
43
|
+
- README.md
|
44
|
+
- exe/sass
|
45
|
+
- ext/sass/cli.rb
|
46
|
+
- ext/sass/dart-sass/sass.bat
|
47
|
+
- ext/sass/dart-sass/src/LICENSE
|
48
|
+
- ext/sass/dart-sass/src/dart.exe
|
49
|
+
- ext/sass/dart-sass/src/sass.snapshot
|
50
|
+
- ext/sass/embedded_sass_pb.rb
|
51
|
+
- lib/sass-embedded.rb
|
52
|
+
- lib/sass/calculation_value.rb
|
53
|
+
- lib/sass/calculation_value/calculation_operation.rb
|
54
|
+
- lib/sass/canonicalize_context.rb
|
55
|
+
- lib/sass/compile_result.rb
|
56
|
+
- lib/sass/compiler.rb
|
57
|
+
- lib/sass/compiler/channel.rb
|
58
|
+
- lib/sass/compiler/connection.rb
|
59
|
+
- lib/sass/compiler/dispatcher.rb
|
60
|
+
- lib/sass/compiler/host.rb
|
61
|
+
- lib/sass/compiler/host/function_registry.rb
|
62
|
+
- lib/sass/compiler/host/importer_registry.rb
|
63
|
+
- lib/sass/compiler/host/logger_registry.rb
|
64
|
+
- lib/sass/compiler/host/protofier.rb
|
65
|
+
- lib/sass/compiler/host/structifier.rb
|
66
|
+
- lib/sass/compiler/varint.rb
|
67
|
+
- lib/sass/elf.rb
|
68
|
+
- lib/sass/embedded.rb
|
69
|
+
- lib/sass/embedded/version.rb
|
70
|
+
- lib/sass/embedded_protocol.rb
|
71
|
+
- lib/sass/exception.rb
|
72
|
+
- lib/sass/fork_tracker.rb
|
73
|
+
- lib/sass/logger/silent.rb
|
74
|
+
- lib/sass/logger/source_location.rb
|
75
|
+
- lib/sass/logger/source_span.rb
|
76
|
+
- lib/sass/node_package_importer.rb
|
77
|
+
- lib/sass/serializer.rb
|
78
|
+
- lib/sass/value.rb
|
79
|
+
- lib/sass/value/argument_list.rb
|
80
|
+
- lib/sass/value/boolean.rb
|
81
|
+
- lib/sass/value/calculation.rb
|
82
|
+
- lib/sass/value/color.rb
|
83
|
+
- lib/sass/value/function.rb
|
84
|
+
- lib/sass/value/fuzzy_math.rb
|
85
|
+
- lib/sass/value/list.rb
|
86
|
+
- lib/sass/value/map.rb
|
87
|
+
- lib/sass/value/mixin.rb
|
88
|
+
- lib/sass/value/null.rb
|
89
|
+
- lib/sass/value/number.rb
|
90
|
+
- lib/sass/value/number/unit.rb
|
91
|
+
- lib/sass/value/string.rb
|
92
|
+
homepage: https://github.com/sass-contrib/sass-embedded-host-ruby
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata:
|
96
|
+
bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
|
97
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.74.1
|
98
|
+
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.74.1
|
99
|
+
funding_uri: https://github.com/sponsors/ntkme
|
100
|
+
rubygems_mfa_required: 'true'
|
101
|
+
post_install_message:
|
102
|
+
rdoc_options: []
|
103
|
+
require_paths:
|
104
|
+
- lib
|
105
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 3.1.0
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
requirements: []
|
116
|
+
rubygems_version: 3.5.7
|
117
|
+
signing_key:
|
118
|
+
specification_version: 4
|
119
|
+
summary: Use dart-sass with Ruby!
|
120
|
+
test_files: []
|