sass-embedded 1.79.4-x86_64-linux-android → 1.79.6-x86_64-linux-android
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/sass/cli.rb +3 -3
- data/ext/sass/dart-sass/src/sass.snapshot +0 -0
- data/ext/sass/embedded_sass_pb.rb +1 -1
- data/lib/sass/compiler/host/protofier.rb +5 -4
- data/lib/sass/embedded/version.rb +1 -1
- data/lib/sass/value/color/conversions.rb +62 -53
- data/lib/sass/value/color/gamut_map_method/clip.rb +1 -1
- data/lib/sass/value/color/space/a98_rgb.rb +2 -2
- data/lib/sass/value/color/space/prophoto_rgb.rb +2 -2
- data/lib/sass/value/color/space/rec2020.rb +2 -2
- data/lib/sass/value/color/space/srgb.rb +1 -2
- data/lib/sass/value/color/space/utils.rb +2 -2
- data/lib/sass/value/color.rb +10 -10
- data/lib/sass/value/fuzzy_math.rb +4 -27
- data/lib/sass/value/number.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab024fa66713fc1dab8d57ffcfb35488965b5658c06a0d7344a44d6c4c7fa704
|
4
|
+
data.tar.gz: 6864e4e1feeda3050d591dbffc4b1174843d4ccae5e356ec4f2d2e6d16c5ebfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eebadd431ef4c40cbf81f3ca7d70de205ecec0c283b1f9120d88576a5ca05d47b23e8da90daa0498ad370ff698c1aeb51ea8fbb816dbd1faa85cf40415edaa2
|
7
|
+
data.tar.gz: 5a3f8c61743e9c38797b2df9509f6758f4ed6ff084c9c137e20a5f2c4b52d6e9028f4b5bdf457e871f039f269a8c7fcc80368653211f10bbb5a37ae0c682f27a
|
data/ext/sass/cli.rb
CHANGED
@@ -6,10 +6,10 @@ module Sass
|
|
6
6
|
module CLI
|
7
7
|
INTERPRETER = '/system/bin/linker64'
|
8
8
|
|
9
|
+
INTERPRETER_SUFFIX = '/linker64'
|
10
|
+
|
9
11
|
COMMAND = [
|
10
|
-
*(ELF::INTERPRETER
|
11
|
-
ELF::INTERPRETER == INTERPRETER ||
|
12
|
-
!ELF::INTERPRETER.end_with?(INTERPRETER)),
|
12
|
+
*(ELF::INTERPRETER if ELF::INTERPRETER != INTERPRETER && ELF::INTERPRETER&.end_with?(INTERPRETER_SUFFIX)),
|
13
13
|
File.absolute_path('dart-sass/src/dart', __dir__).freeze,
|
14
14
|
File.absolute_path('dart-sass/src/sass.snapshot', __dir__).freeze
|
15
15
|
].freeze
|
Binary file
|
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
|
8
|
-
descriptor_data = "\n\x13\x65mbedded_sass.proto\x12\x16sass.embedded_protocol\"\xe8\x10\n\x0eInboundMessage\x12P\n\x0f\x63ompile_request\x18\x02 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.CompileRequestH\x00\x12\\\n\x15\x63\x61nonicalize_response\x18\x03 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.CanonicalizeResponseH\x00\x12P\n\x0fimport_response\x18\x04 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.ImportResponseH\x00\x12Y\n\x14\x66ile_import_response\x18\x05 \x01(\x0b\x32\x39.sass.embedded_protocol.InboundMessage.FileImportResponseH\x00\x12]\n\x16\x66unction_call_response\x18\x06 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.FunctionCallResponseH\x00\x12P\n\x0fversion_request\x18\x07 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.VersionRequestH\x00\x1a\x1c\n\x0eVersionRequest\x12\n\n\x02id\x18\x01 \x01(\r\x1a\x98\x07\n\x0e\x43ompileRequest\x12S\n\x06string\x18\x02 \x01(\x0b\x32\x41.sass.embedded_protocol.InboundMessage.CompileRequest.StringInputH\x00\x12\x0e\n\x04path\x18\x03 \x01(\tH\x00\x12\x32\n\x05style\x18\x04 \x01(\x0e\x32#.sass.embedded_protocol.OutputStyle\x12\x12\n\nsource_map\x18\x05 \x01(\x08\x12Q\n\timporters\x18\x06 \x03(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x12\x18\n\x10global_functions\x18\x07 \x03(\t\x12\x13\n\x0b\x61lert_color\x18\x08 \x01(\x08\x12\x13\n\x0b\x61lert_ascii\x18\t \x01(\x08\x12\x0f\n\x07verbose\x18\n \x01(\x08\x12\x12\n\nquiet_deps\x18\x0b \x01(\x08\x12\"\n\x1asource_map_include_sources\x18\x0c \x01(\x08\x12\x0f\n\x07\x63harset\x18\r \x01(\x08\x12\x0e\n\x06silent\x18\x0e \x01(\x08\x12\x19\n\x11\x66\x61tal_deprecation\x18\x0f \x03(\t\x12\x1b\n\x13silence_deprecation\x18\x10 \x03(\t\x12\x1a\n\x12\x66uture_deprecation\x18\x11 \x03(\t\x1a\xac\x01\n\x0bStringInput\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12.\n\x06syntax\x18\x03 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12P\n\x08importer\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x1a\xc5\x01\n\x08Importer\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x15\n\x0bimporter_id\x18\x02 \x01(\rH\x00\x12\x1a\n\x10\x66ile_importer_id\x18\x03 \x01(\rH\x00\x12L\n\x15node_package_importer\x18\x05 \x01(\x0b\x32+.sass.embedded_protocol.NodePackageImporterH\x00\x12\x1c\n\x14non_canonical_scheme\x18\x04 \x03(\tB\n\n\x08importerB\x07\n\x05inputJ\x04\x08\x01\x10\x02\x1ak\n\x14\x43\x61nonicalizeResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x03url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1d\n\x15\x63ontaining_url_unused\x18\x04 \x01(\x08\x42\x08\n\x06result\x1a\x93\x02\n\x0eImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12V\n\x07success\x18\x02 \x01(\x0b\x32\x43.sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccessH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x1a\x81\x01\n\rImportSuccess\x12\x10\n\x08\x63ontents\x18\x01 \x01(\t\x12.\n\x06syntax\x18\x02 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12\x1b\n\x0esource_map_url\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_source_map_urlB\x08\n\x06result\x1an\n\x12\x46ileImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x12\n\x08\x66ile_url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1d\n\x15\x63ontaining_url_unused\x18\x04 \x01(\x08\x42\x08\n\x06result\x1a\x90\x01\n\x14\x46unctionCallResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x30\n\x07success\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.ValueH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1f\n\x17\x61\x63\x63\x65ssed_argument_lists\x18\x04 \x03(\rB\x08\n\x06resultB\t\n\x07message\"\xcb\x0f\n\x0fOutboundMessage\x12\x36\n\x05\x65rror\x18\x01 \x01(\x0b\x32%.sass.embedded_protocol.ProtocolErrorH\x00\x12S\n\x10\x63ompile_response\x18\x02 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.CompileResponseH\x00\x12\x45\n\tlog_event\x18\x03 \x01(\x0b\x32\x30.sass.embedded_protocol.OutboundMessage.LogEventH\x00\x12[\n\x14\x63\x61nonicalize_request\x18\x04 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.CanonicalizeRequestH\x00\x12O\n\x0eimport_request\x18\x05 \x01(\x0b\x32\x35.sass.embedded_protocol.OutboundMessage.ImportRequestH\x00\x12X\n\x13\x66ile_import_request\x18\x06 \x01(\x0b\x32\x39.sass.embedded_protocol.OutboundMessage.FileImportRequestH\x00\x12\\\n\x15\x66unction_call_request\x18\x07 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.FunctionCallRequestH\x00\x12S\n\x10version_response\x18\x08 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.VersionResponseH\x00\x1a\x8e\x01\n\x0fVersionResponse\x12\n\n\x02id\x18\x05 \x01(\r\x12\x18\n\x10protocol_version\x18\x01 \x01(\t\x12\x18\n\x10\x63ompiler_version\x18\x02 \x01(\t\x12\x1e\n\x16implementation_version\x18\x03 \x01(\t\x12\x1b\n\x13implementation_name\x18\x04 \x01(\t\x1a\xa2\x03\n\x0f\x43ompileResponse\x12Y\n\x07success\x18\x02 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccessH\x00\x12Y\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailureH\x00\x12\x13\n\x0bloaded_urls\x18\x04 \x03(\t\x1a\x37\n\x0e\x43ompileSuccess\x12\x0b\n\x03\x63ss\x18\x01 \x01(\t\x12\x12\n\nsource_map\x18\x02 \x01(\tJ\x04\x08\x03\x10\x04\x1a{\n\x0e\x43ompileFailure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x30\n\x04span\x18\x02 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpan\x12\x13\n\x0bstack_trace\x18\x03 \x01(\t\x12\x11\n\tformatted\x18\x04 \x01(\tB\x08\n\x06resultJ\x04\x08\x01\x10\x02\x1a\xf1\x01\n\x08LogEvent\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.sass.embedded_protocol.LogEventType\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x35\n\x04span\x18\x04 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpanH\x00\x88\x01\x01\x12\x13\n\x0bstack_trace\x18\x05 \x01(\t\x12\x11\n\tformatted\x18\x06 \x01(\t\x12\x1d\n\x10\x64\x65precation_type\x18\x07 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_spanB\x13\n\x11_deprecation_typeJ\x04\x08\x01\x10\x02\x1a\x8e\x01\n\x13\x43\x61nonicalizeRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08\x12\x1b\n\x0e\x63ontaining_url\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_containing_urlJ\x04\x08\x02\x10\x03\x1a\x43\n\rImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\tJ\x04\x08\x02\x10\x03\x1a\x8c\x01\n\x11\x46ileImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08\x12\x1b\n\x0e\x63ontaining_url\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_containing_urlJ\x04\x08\x02\x10\x03\x1a\x8e\x01\n\x13\x46unctionCallRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x12\x15\n\x0b\x66unction_id\x18\x04 \x01(\rH\x00\x12\x30\n\targuments\x18\x05 \x03(\x0b\x32\x1d.sass.embedded_protocol.ValueB\x0c\n\nidentifierJ\x04\x08\x02\x10\x03\x42\t\n\x07message\"e\n\rProtocolError\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).sass.embedded_protocol.ProtocolErrorType\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0f\n\x07message\x18\x03 \x01(\t\"\x87\x02\n\nSourceSpan\x12\x0c\n\x04text\x18\x01 \x01(\t\x12@\n\x05start\x18\x02 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocation\x12\x43\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocationH\x00\x88\x01\x01\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontext\x18\x05 \x01(\t\x1a>\n\x0eSourceLocation\x12\x0e\n\x06offset\x18\x01 \x01(\r\x12\x0c\n\x04line\x18\x02 \x01(\r\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\rB\x06\n\x04_end\"\xb2\x11\n\x05Value\x12\x36\n\x06string\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.StringH\x00\x12\x36\n\x06number\x18\x02 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12\x32\n\x04list\x18\x05 \x01(\x0b\x32\".sass.embedded_protocol.Value.ListH\x00\x12\x30\n\x03map\x18\x06 \x01(\x0b\x32!.sass.embedded_protocol.Value.MapH\x00\x12;\n\tsingleton\x18\x07 \x01(\x0e\x32&.sass.embedded_protocol.SingletonValueH\x00\x12K\n\x11\x63ompiler_function\x18\x08 \x01(\x0b\x32..sass.embedded_protocol.Value.CompilerFunctionH\x00\x12\x43\n\rhost_function\x18\t \x01(\x0b\x32*.sass.embedded_protocol.Value.HostFunctionH\x00\x12\x43\n\rargument_list\x18\n \x01(\x0b\x32*.sass.embedded_protocol.Value.ArgumentListH\x00\x12@\n\x0b\x63\x61lculation\x18\x0c \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x12\x45\n\x0e\x63ompiler_mixin\x18\r \x01(\x0b\x32+.sass.embedded_protocol.Value.CompilerMixinH\x00\x12\x34\n\x05\x63olor\x18\x0e \x01(\x0b\x32#.sass.embedded_protocol.Value.ColorH\x00\x1a&\n\x06String\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x0e\n\x06quoted\x18\x02 \x01(\x08\x1a\x41\n\x06Number\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x12\n\nnumerators\x18\x02 \x03(\t\x12\x14\n\x0c\x64\x65nominators\x18\x03 \x03(\t\x1a[\n\x05\x43olor\x12\r\n\x05space\x18\x01 \x01(\t\x12\x10\n\x08\x63hannel1\x18\x02 \x01(\x01\x12\x10\n\x08\x63hannel2\x18\x03 \x01(\x01\x12\x10\n\x08\x63hannel3\x18\x04 \x01(\x01\x12\r\n\x05\x61lpha\x18\x05 \x01(\x01\x1a\x87\x01\n\x04List\x12\x38\n\tseparator\x18\x01 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12\x14\n\x0chas_brackets\x18\x02 \x01(\x08\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\xa2\x01\n\x03Map\x12\x38\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\'.sass.embedded_protocol.Value.Map.Entry\x1a\x61\n\x05\x45ntry\x12*\n\x03key\x18\x01 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\x1e\n\x10\x43ompilerFunction\x12\n\n\x02id\x18\x01 \x01(\r\x1a-\n\x0cHostFunction\x12\n\n\x02id\x18\x01 \x01(\r\x12\x11\n\tsignature\x18\x02 \x01(\t\x1a\x1b\n\rCompilerMixin\x12\n\n\x02id\x18\x01 \x01(\r\x1a\xa1\x02\n\x0c\x41rgumentList\x12\n\n\x02id\x18\x01 \x01(\r\x12\x38\n\tseparator\x18\x02 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x12J\n\x08keywords\x18\x04 \x03(\x0b\x32\x38.sass.embedded_protocol.Value.ArgumentList.KeywordsEntry\x1aN\n\rKeywordsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value:\x02\x38\x01\x1a\xef\x04\n\x0b\x43\x61lculation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\targuments\x18\x02 \x03(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x1a\x95\x02\n\x10\x43\x61lculationValue\x12\x36\n\x06number\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x17\n\rinterpolation\x18\x03 \x01(\tH\x00\x12S\n\toperation\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.Value.Calculation.CalculationOperationH\x00\x12@\n\x0b\x63\x61lculation\x18\x05 \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x42\x07\n\x05value\x1a\xea\x01\n\x14\x43\x61lculationOperation\x12=\n\x08operator\x18\x01 \x01(\x0e\x32+.sass.embedded_protocol.CalculationOperator\x12H\n\x04left\x18\x02 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x12I\n\x05right\x18\x03 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValueB\x07\n\x05value\"4\n\x13NodePackageImporter\x12\x1d\n\x15\x65ntry_point_directory\x18\x01 \x01(\t*+\n\x0bOutputStyle\x12\x0c\n\x08\x45XPANDED\x10\x00\x12\x0e\n\nCOMPRESSED\x10\x01*)\n\x06Syntax\x12\x08\n\x04SCSS\x10\x00\x12\x0c\n\x08INDENTED\x10\x01\x12\x07\n\x03\x43SS\x10\x02*?\n\x0cLogEventType\x12\x0b\n\x07WARNING\x10\x00\x12\x17\n\x13\x44\x45PRECATION_WARNING\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02*8\n\x11ProtocolErrorType\x12\t\n\x05PARSE\x10\x00\x12\n\n\x06PARAMS\x10\x01\x12\x0c\n\x08INTERNAL\x10\x02*?\n\rListSeparator\x12\t\n\x05\x43OMMA\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\t\n\x05SLASH\x10\x02\x12\r\n\tUNDECIDED\x10\x03*/\n\x0eSingletonValue\x12\x08\n\x04TRUE\x10\x00\x12\t\n\x05\x46\x41LSE\x10\x01\x12\x08\n\x04NULL\x10\x02*A\n\x13\x43\x61lculationOperator\x12\x08\n\x04PLUS\x10\x00\x12\t\n\x05MINUS\x10\x01\x12\t\n\x05TIMES\x10\x02\x12\n\n\x06\x44IVIDE\x10\x03\x42#\n\x1f\x63om.sass_lang.embedded_protocolP\x01\x62\x06proto3"
|
8
|
+
descriptor_data = "\n\x13\x65mbedded_sass.proto\x12\x16sass.embedded_protocol\"\xe8\x10\n\x0eInboundMessage\x12P\n\x0f\x63ompile_request\x18\x02 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.CompileRequestH\x00\x12\\\n\x15\x63\x61nonicalize_response\x18\x03 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.CanonicalizeResponseH\x00\x12P\n\x0fimport_response\x18\x04 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.ImportResponseH\x00\x12Y\n\x14\x66ile_import_response\x18\x05 \x01(\x0b\x32\x39.sass.embedded_protocol.InboundMessage.FileImportResponseH\x00\x12]\n\x16\x66unction_call_response\x18\x06 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.FunctionCallResponseH\x00\x12P\n\x0fversion_request\x18\x07 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.VersionRequestH\x00\x1a\x1c\n\x0eVersionRequest\x12\n\n\x02id\x18\x01 \x01(\r\x1a\x98\x07\n\x0e\x43ompileRequest\x12S\n\x06string\x18\x02 \x01(\x0b\x32\x41.sass.embedded_protocol.InboundMessage.CompileRequest.StringInputH\x00\x12\x0e\n\x04path\x18\x03 \x01(\tH\x00\x12\x32\n\x05style\x18\x04 \x01(\x0e\x32#.sass.embedded_protocol.OutputStyle\x12\x12\n\nsource_map\x18\x05 \x01(\x08\x12Q\n\timporters\x18\x06 \x03(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x12\x18\n\x10global_functions\x18\x07 \x03(\t\x12\x13\n\x0b\x61lert_color\x18\x08 \x01(\x08\x12\x13\n\x0b\x61lert_ascii\x18\t \x01(\x08\x12\x0f\n\x07verbose\x18\n \x01(\x08\x12\x12\n\nquiet_deps\x18\x0b \x01(\x08\x12\"\n\x1asource_map_include_sources\x18\x0c \x01(\x08\x12\x0f\n\x07\x63harset\x18\r \x01(\x08\x12\x0e\n\x06silent\x18\x0e \x01(\x08\x12\x19\n\x11\x66\x61tal_deprecation\x18\x0f \x03(\t\x12\x1b\n\x13silence_deprecation\x18\x10 \x03(\t\x12\x1a\n\x12\x66uture_deprecation\x18\x11 \x03(\t\x1a\xac\x01\n\x0bStringInput\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12.\n\x06syntax\x18\x03 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12P\n\x08importer\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x1a\xc5\x01\n\x08Importer\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x15\n\x0bimporter_id\x18\x02 \x01(\rH\x00\x12\x1a\n\x10\x66ile_importer_id\x18\x03 \x01(\rH\x00\x12L\n\x15node_package_importer\x18\x05 \x01(\x0b\x32+.sass.embedded_protocol.NodePackageImporterH\x00\x12\x1c\n\x14non_canonical_scheme\x18\x04 \x03(\tB\n\n\x08importerB\x07\n\x05inputJ\x04\x08\x01\x10\x02\x1ak\n\x14\x43\x61nonicalizeResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x03url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1d\n\x15\x63ontaining_url_unused\x18\x04 \x01(\x08\x42\x08\n\x06result\x1a\x93\x02\n\x0eImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12V\n\x07success\x18\x02 \x01(\x0b\x32\x43.sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccessH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x1a\x81\x01\n\rImportSuccess\x12\x10\n\x08\x63ontents\x18\x01 \x01(\t\x12.\n\x06syntax\x18\x02 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12\x1b\n\x0esource_map_url\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_source_map_urlB\x08\n\x06result\x1an\n\x12\x46ileImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x12\n\x08\x66ile_url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1d\n\x15\x63ontaining_url_unused\x18\x04 \x01(\x08\x42\x08\n\x06result\x1a\x90\x01\n\x14\x46unctionCallResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x30\n\x07success\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.ValueH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1f\n\x17\x61\x63\x63\x65ssed_argument_lists\x18\x04 \x03(\rB\x08\n\x06resultB\t\n\x07message\"\xcb\x0f\n\x0fOutboundMessage\x12\x36\n\x05\x65rror\x18\x01 \x01(\x0b\x32%.sass.embedded_protocol.ProtocolErrorH\x00\x12S\n\x10\x63ompile_response\x18\x02 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.CompileResponseH\x00\x12\x45\n\tlog_event\x18\x03 \x01(\x0b\x32\x30.sass.embedded_protocol.OutboundMessage.LogEventH\x00\x12[\n\x14\x63\x61nonicalize_request\x18\x04 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.CanonicalizeRequestH\x00\x12O\n\x0eimport_request\x18\x05 \x01(\x0b\x32\x35.sass.embedded_protocol.OutboundMessage.ImportRequestH\x00\x12X\n\x13\x66ile_import_request\x18\x06 \x01(\x0b\x32\x39.sass.embedded_protocol.OutboundMessage.FileImportRequestH\x00\x12\\\n\x15\x66unction_call_request\x18\x07 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.FunctionCallRequestH\x00\x12S\n\x10version_response\x18\x08 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.VersionResponseH\x00\x1a\x8e\x01\n\x0fVersionResponse\x12\n\n\x02id\x18\x05 \x01(\r\x12\x18\n\x10protocol_version\x18\x01 \x01(\t\x12\x18\n\x10\x63ompiler_version\x18\x02 \x01(\t\x12\x1e\n\x16implementation_version\x18\x03 \x01(\t\x12\x1b\n\x13implementation_name\x18\x04 \x01(\t\x1a\xa2\x03\n\x0f\x43ompileResponse\x12Y\n\x07success\x18\x02 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccessH\x00\x12Y\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailureH\x00\x12\x13\n\x0bloaded_urls\x18\x04 \x03(\t\x1a\x37\n\x0e\x43ompileSuccess\x12\x0b\n\x03\x63ss\x18\x01 \x01(\t\x12\x12\n\nsource_map\x18\x02 \x01(\tJ\x04\x08\x03\x10\x04\x1a{\n\x0e\x43ompileFailure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x30\n\x04span\x18\x02 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpan\x12\x13\n\x0bstack_trace\x18\x03 \x01(\t\x12\x11\n\tformatted\x18\x04 \x01(\tB\x08\n\x06resultJ\x04\x08\x01\x10\x02\x1a\xf1\x01\n\x08LogEvent\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.sass.embedded_protocol.LogEventType\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x35\n\x04span\x18\x04 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpanH\x00\x88\x01\x01\x12\x13\n\x0bstack_trace\x18\x05 \x01(\t\x12\x11\n\tformatted\x18\x06 \x01(\t\x12\x1d\n\x10\x64\x65precation_type\x18\x07 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_spanB\x13\n\x11_deprecation_typeJ\x04\x08\x01\x10\x02\x1a\x8e\x01\n\x13\x43\x61nonicalizeRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08\x12\x1b\n\x0e\x63ontaining_url\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_containing_urlJ\x04\x08\x02\x10\x03\x1a\x43\n\rImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\tJ\x04\x08\x02\x10\x03\x1a\x8c\x01\n\x11\x46ileImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08\x12\x1b\n\x0e\x63ontaining_url\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_containing_urlJ\x04\x08\x02\x10\x03\x1a\x8e\x01\n\x13\x46unctionCallRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x12\x15\n\x0b\x66unction_id\x18\x04 \x01(\rH\x00\x12\x30\n\targuments\x18\x05 \x03(\x0b\x32\x1d.sass.embedded_protocol.ValueB\x0c\n\nidentifierJ\x04\x08\x02\x10\x03\x42\t\n\x07message\"e\n\rProtocolError\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).sass.embedded_protocol.ProtocolErrorType\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0f\n\x07message\x18\x03 \x01(\t\"\x87\x02\n\nSourceSpan\x12\x0c\n\x04text\x18\x01 \x01(\t\x12@\n\x05start\x18\x02 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocation\x12\x43\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocationH\x00\x88\x01\x01\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontext\x18\x05 \x01(\t\x1a>\n\x0eSourceLocation\x12\x0e\n\x06offset\x18\x01 \x01(\r\x12\x0c\n\x04line\x18\x02 \x01(\r\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\rB\x06\n\x04_end\"\xf8\x11\n\x05Value\x12\x36\n\x06string\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.StringH\x00\x12\x36\n\x06number\x18\x02 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12\x32\n\x04list\x18\x05 \x01(\x0b\x32\".sass.embedded_protocol.Value.ListH\x00\x12\x30\n\x03map\x18\x06 \x01(\x0b\x32!.sass.embedded_protocol.Value.MapH\x00\x12;\n\tsingleton\x18\x07 \x01(\x0e\x32&.sass.embedded_protocol.SingletonValueH\x00\x12K\n\x11\x63ompiler_function\x18\x08 \x01(\x0b\x32..sass.embedded_protocol.Value.CompilerFunctionH\x00\x12\x43\n\rhost_function\x18\t \x01(\x0b\x32*.sass.embedded_protocol.Value.HostFunctionH\x00\x12\x43\n\rargument_list\x18\n \x01(\x0b\x32*.sass.embedded_protocol.Value.ArgumentListH\x00\x12@\n\x0b\x63\x61lculation\x18\x0c \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x12\x45\n\x0e\x63ompiler_mixin\x18\r \x01(\x0b\x32+.sass.embedded_protocol.Value.CompilerMixinH\x00\x12\x34\n\x05\x63olor\x18\x0e \x01(\x0b\x32#.sass.embedded_protocol.Value.ColorH\x00\x1a&\n\x06String\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x0e\n\x06quoted\x18\x02 \x01(\x08\x1a\x41\n\x06Number\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x12\n\nnumerators\x18\x02 \x03(\t\x12\x14\n\x0c\x64\x65nominators\x18\x03 \x03(\t\x1a\xa0\x01\n\x05\x43olor\x12\r\n\x05space\x18\x01 \x01(\t\x12\x15\n\x08\x63hannel1\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x63hannel2\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x15\n\x08\x63hannel3\x18\x04 \x01(\x01H\x02\x88\x01\x01\x12\x12\n\x05\x61lpha\x18\x05 \x01(\x01H\x03\x88\x01\x01\x42\x0b\n\t_channel1B\x0b\n\t_channel2B\x0b\n\t_channel3B\x08\n\x06_alpha\x1a\x87\x01\n\x04List\x12\x38\n\tseparator\x18\x01 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12\x14\n\x0chas_brackets\x18\x02 \x01(\x08\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\xa2\x01\n\x03Map\x12\x38\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\'.sass.embedded_protocol.Value.Map.Entry\x1a\x61\n\x05\x45ntry\x12*\n\x03key\x18\x01 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\x1e\n\x10\x43ompilerFunction\x12\n\n\x02id\x18\x01 \x01(\r\x1a-\n\x0cHostFunction\x12\n\n\x02id\x18\x01 \x01(\r\x12\x11\n\tsignature\x18\x02 \x01(\t\x1a\x1b\n\rCompilerMixin\x12\n\n\x02id\x18\x01 \x01(\r\x1a\xa1\x02\n\x0c\x41rgumentList\x12\n\n\x02id\x18\x01 \x01(\r\x12\x38\n\tseparator\x18\x02 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x12J\n\x08keywords\x18\x04 \x03(\x0b\x32\x38.sass.embedded_protocol.Value.ArgumentList.KeywordsEntry\x1aN\n\rKeywordsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value:\x02\x38\x01\x1a\xef\x04\n\x0b\x43\x61lculation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\targuments\x18\x02 \x03(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x1a\x95\x02\n\x10\x43\x61lculationValue\x12\x36\n\x06number\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x17\n\rinterpolation\x18\x03 \x01(\tH\x00\x12S\n\toperation\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.Value.Calculation.CalculationOperationH\x00\x12@\n\x0b\x63\x61lculation\x18\x05 \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x42\x07\n\x05value\x1a\xea\x01\n\x14\x43\x61lculationOperation\x12=\n\x08operator\x18\x01 \x01(\x0e\x32+.sass.embedded_protocol.CalculationOperator\x12H\n\x04left\x18\x02 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x12I\n\x05right\x18\x03 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValueB\x07\n\x05value\"4\n\x13NodePackageImporter\x12\x1d\n\x15\x65ntry_point_directory\x18\x01 \x01(\t*+\n\x0bOutputStyle\x12\x0c\n\x08\x45XPANDED\x10\x00\x12\x0e\n\nCOMPRESSED\x10\x01*)\n\x06Syntax\x12\x08\n\x04SCSS\x10\x00\x12\x0c\n\x08INDENTED\x10\x01\x12\x07\n\x03\x43SS\x10\x02*?\n\x0cLogEventType\x12\x0b\n\x07WARNING\x10\x00\x12\x17\n\x13\x44\x45PRECATION_WARNING\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02*8\n\x11ProtocolErrorType\x12\t\n\x05PARSE\x10\x00\x12\n\n\x06PARAMS\x10\x01\x12\x0c\n\x08INTERNAL\x10\x02*?\n\rListSeparator\x12\t\n\x05\x43OMMA\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\t\n\x05SLASH\x10\x02\x12\r\n\tUNDECIDED\x10\x03*/\n\x0eSingletonValue\x12\x08\n\x04TRUE\x10\x00\x12\t\n\x05\x46\x41LSE\x10\x01\x12\x08\n\x04NULL\x10\x02*A\n\x13\x43\x61lculationOperator\x12\x08\n\x04PLUS\x10\x00\x12\t\n\x05MINUS\x10\x01\x12\t\n\x05TIMES\x10\x02\x12\n\n\x06\x44IVIDE\x10\x03\x42#\n\x1f\x63om.sass_lang.embedded_protocolP\x01\x62\x06proto3"
|
9
9
|
|
10
10
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
@@ -112,13 +112,14 @@ module Sass
|
|
112
112
|
when :number
|
113
113
|
Number.from_proto(obj)
|
114
114
|
when :color
|
115
|
+
obj.to_s if RUBY_ENGINE == 'jruby' # TODO: https://github.com/protocolbuffers/protobuf/issues/18807
|
115
116
|
Sass::Value::Color.send(
|
116
117
|
:for_space,
|
117
118
|
obj.space,
|
118
|
-
obj.channel1,
|
119
|
-
obj.channel2,
|
120
|
-
obj.channel3,
|
121
|
-
obj.alpha
|
119
|
+
obj.has_channel1? ? obj.channel1 : nil,
|
120
|
+
obj.has_channel2? ? obj.channel2 : nil,
|
121
|
+
obj.has_channel3? ? obj.channel3 : nil,
|
122
|
+
obj.has_alpha? ? obj.alpha : nil
|
122
123
|
)
|
123
124
|
when :argument_list
|
124
125
|
Sass::Value::ArgumentList.new(
|
@@ -7,28 +7,35 @@ module Sass
|
|
7
7
|
# @see https://github.com/sass/dart-sass/blob/main/lib/src/value/color/conversions.dart
|
8
8
|
module Conversions
|
9
9
|
# The D50 white point.
|
10
|
+
#
|
11
|
+
# Definition from https://www.w3.org/TR/css-color-4/#color-conversion-code.
|
10
12
|
D50 = [0.3457 / 0.3585, 1.00000, (1.0 - 0.3457 - 0.3585) / 0.3585].freeze
|
11
13
|
|
14
|
+
# Matrix values from https://www.w3.org/TR/css-color-4/#color-conversion-code.
|
15
|
+
|
12
16
|
# The transformation matrix for converting LMS colors to OKLab.
|
13
17
|
#
|
14
|
-
# Note that this can't be directly multiplied with
|
18
|
+
# Note that this can't be directly multiplied with [XYZ_D65_TO_LMS]; see Color
|
15
19
|
# Level 4 spec for details on how to convert between XYZ and OKLab.
|
16
20
|
LMS_TO_OKLAB = [
|
17
|
-
0.
|
18
|
-
1.
|
19
|
-
0.
|
21
|
+
0.21045426830931400, 0.79361777470230540, -0.00407204301161930,
|
22
|
+
1.97799853243116840, -2.42859224204858000, 0.45059370961741100,
|
23
|
+
0.02590404246554780, 0.78277171245752960, -0.80867575492307740
|
20
24
|
].freeze
|
21
25
|
|
22
26
|
# The transformation matrix for converting OKLab colors to LMS.
|
23
27
|
#
|
24
|
-
# Note that this can't be directly multiplied with
|
28
|
+
# Note that this can't be directly multiplied with [LMS_TO_XYZ_D65]; see Color
|
25
29
|
# Level 4 spec for details on how to convert between XYZ and OKLab.
|
26
30
|
OKLAB_TO_LMS = [
|
27
|
-
|
28
|
-
|
29
|
-
|
31
|
+
1.00000000000000020, 0.39633777737617490, 0.21580375730991360,
|
32
|
+
0.99999999999999980, -0.10556134581565854, -0.06385417282581334,
|
33
|
+
0.99999999999999990, -0.08948417752981180, -1.29148554801940940
|
30
34
|
].freeze
|
31
35
|
|
36
|
+
# The following matrices were precomputed using
|
37
|
+
# https://gist.github.com/nex3/3d7ecfef467b22e02e7a666db1b8a316.
|
38
|
+
|
32
39
|
# The transformation matrix for converting linear-light srgb colors to
|
33
40
|
# linear-light display-p3.
|
34
41
|
LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = [
|
@@ -38,7 +45,7 @@ module Sass
|
|
38
45
|
].freeze
|
39
46
|
|
40
47
|
# The transformation matrix for converting linear-light display-p3 colors to
|
41
|
-
#
|
48
|
+
# linear-light srgb.
|
42
49
|
LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = [
|
43
50
|
1.22494017628055980, -0.22494017628055996, 0.00000000000000000,
|
44
51
|
-0.04205695470968816, 1.04205695470968800, 0.00000000000000000,
|
@@ -93,16 +100,16 @@ module Sass
|
|
93
100
|
|
94
101
|
# The transformation matrix for converting linear-light srgb colors to lms.
|
95
102
|
LINEAR_SRGB_TO_LMS = [
|
96
|
-
0.
|
97
|
-
0.
|
98
|
-
0.
|
103
|
+
0.41222146947076300, 0.53633253726173480, 0.05144599326750220,
|
104
|
+
0.21190349581782520, 0.68069955064523420, 0.10739695353694050,
|
105
|
+
0.08830245919005641, 0.28171883913612150, 0.62997870167382210
|
99
106
|
].freeze
|
100
107
|
|
101
108
|
# The transformation matrix for converting lms colors to linear-light srgb.
|
102
109
|
LMS_TO_LINEAR_SRGB = [
|
103
|
-
4.
|
104
|
-
-1.
|
105
|
-
-0.
|
110
|
+
4.07674163607595800, -3.30771153925806200, 0.23096990318210417,
|
111
|
+
-1.26843797328503200, 2.60975734928768900, -0.34131937600265710,
|
112
|
+
-0.00419607613867551, -0.70341861793593630, 1.70761469407461200
|
106
113
|
].freeze
|
107
114
|
|
108
115
|
# The transformation matrix for converting linear-light srgb colors to
|
@@ -121,14 +128,16 @@ module Sass
|
|
121
128
|
-0.00855882878391742, -0.15326670213803720, 1.16182553092195470
|
122
129
|
].freeze
|
123
130
|
|
124
|
-
# The transformation matrix for converting linear-light srgb colors to
|
131
|
+
# The transformation matrix for converting linear-light srgb colors to
|
132
|
+
# xyz-d50.
|
125
133
|
LINEAR_SRGB_TO_XYZ_D50 = [
|
126
134
|
0.43606574687426936, 0.38515150959015960, 0.14307841996513868,
|
127
135
|
0.22249317711056518, 0.71688701309448240, 0.06061980979495235,
|
128
136
|
0.01392392146316939, 0.09708132423141015, 0.71409935681588070
|
129
137
|
].freeze
|
130
138
|
|
131
|
-
# The transformation matrix for converting xyz-d50 colors to linear-light
|
139
|
+
# The transformation matrix for converting xyz-d50 colors to linear-light
|
140
|
+
# srgb.
|
132
141
|
XYZ_D50_TO_LINEAR_SRGB = [
|
133
142
|
3.13413585290011780, -1.61738599801804200, -0.49066221791109754,
|
134
143
|
-0.97879547655577770, 1.91625437739598840, 0.03344287339036693,
|
@@ -186,17 +195,17 @@ module Sass
|
|
186
195
|
# The transformation matrix for converting linear-light display-p3 colors to
|
187
196
|
# lms.
|
188
197
|
LINEAR_DISPLAY_P3_TO_LMS = [
|
189
|
-
0.
|
190
|
-
0.
|
191
|
-
0.
|
198
|
+
0.48137985274995443, 0.46211837101131803, 0.05650177623872756,
|
199
|
+
0.22883194181124472, 0.65321681938356760, 0.11795123880518774,
|
200
|
+
0.08394575232299319, 0.22416527097756642, 0.69188897669944040
|
192
201
|
].freeze
|
193
202
|
|
194
203
|
# The transformation matrix for converting lms colors to linear-light
|
195
204
|
# display-p3.
|
196
205
|
LMS_TO_LINEAR_DISPLAY_P3 = [
|
197
|
-
3.
|
198
|
-
-1.
|
199
|
-
-0.
|
206
|
+
3.12776897136187370, -2.25713576259163860, 0.12936679122976494,
|
207
|
+
-1.09100901843779790, 2.41333171030692250, -0.32232269186912466,
|
208
|
+
-0.02601080193857045, -0.50804133170416700, 1.53405213364273730
|
200
209
|
].freeze
|
201
210
|
|
202
211
|
# The transformation matrix for converting linear-light display-p3 colors to
|
@@ -263,16 +272,16 @@ module Sass
|
|
263
272
|
|
264
273
|
# The transformation matrix for converting linear-light a98-rgb colors to lms.
|
265
274
|
LINEAR_A98_RGB_TO_LMS = [
|
266
|
-
0.
|
267
|
-
0.
|
268
|
-
0.
|
275
|
+
0.57643225961839410, 0.36991322261987963, 0.05365451776172635,
|
276
|
+
0.29631647054222465, 0.59167613325218850, 0.11200739620558686,
|
277
|
+
0.12347825101427760, 0.21949869837199862, 0.65702305061372380
|
269
278
|
].freeze
|
270
279
|
|
271
280
|
# The transformation matrix for converting lms colors to linear-light a98-rgb.
|
272
281
|
LMS_TO_LINEAR_A98_RGB = [
|
273
|
-
2.
|
274
|
-
-1.
|
275
|
-
-0.
|
282
|
+
2.55403683861155660, -1.62197618068286990, 0.06793934207131327,
|
283
|
+
-1.26843797328503200, 2.60975734928768900, -0.34131937600265710,
|
284
|
+
-0.05623473593749381, -0.56704183956690610, 1.62327657550439990
|
276
285
|
].freeze
|
277
286
|
|
278
287
|
# The transformation matrix for converting linear-light a98-rgb colors to
|
@@ -323,16 +332,16 @@ module Sass
|
|
323
332
|
|
324
333
|
# The transformation matrix for converting linear-light rec2020 colors to lms.
|
325
334
|
LINEAR_REC2020_TO_LMS = [
|
326
|
-
0.
|
327
|
-
0.
|
328
|
-
0.
|
335
|
+
0.61675578486544440, 0.36019840122646335, 0.02304581390809228,
|
336
|
+
0.26513305939263670, 0.63583937206784910, 0.09902756853951408,
|
337
|
+
0.10010262952034828, 0.20390652261661452, 0.69599084786303720
|
329
338
|
].freeze
|
330
339
|
|
331
340
|
# The transformation matrix for converting lms colors to linear-light rec2020.
|
332
341
|
LMS_TO_LINEAR_REC2020 = [
|
333
|
-
2.
|
334
|
-
-0.
|
335
|
-
-0.
|
342
|
+
2.13990673043465130, -1.24638949376061800, 0.10648276332596668,
|
343
|
+
-0.88473583575776740, 2.16323093836120070, -0.27849510260343340,
|
344
|
+
-0.04857374640044396, -0.45450314971409640, 1.50307689611454040
|
336
345
|
].freeze
|
337
346
|
|
338
347
|
# The transformation matrix for converting linear-light rec2020 colors to
|
@@ -369,16 +378,16 @@ module Sass
|
|
369
378
|
|
370
379
|
# The transformation matrix for converting xyz colors to lms.
|
371
380
|
XYZ_D65_TO_LMS = [
|
372
|
-
0.
|
373
|
-
0.
|
374
|
-
0.
|
381
|
+
0.81902243799670300, 0.36190626005289034, -0.12887378152098788,
|
382
|
+
0.03298365393238846, 0.92928686158634330, 0.03614466635064235,
|
383
|
+
0.04817718935962420, 0.26423953175273080, 0.63354782846943080
|
375
384
|
].freeze
|
376
385
|
|
377
386
|
# The transformation matrix for converting lms colors to xyz.
|
378
387
|
LMS_TO_XYZ_D65 = [
|
379
|
-
1.
|
380
|
-
-0.
|
381
|
-
-0.
|
388
|
+
1.22687987584592430, -0.55781499446021710, 0.28139104566596460,
|
389
|
+
-0.04057574521480084, 1.11228680328031730, -0.07171105806551635,
|
390
|
+
-0.07637293667466007, -0.42149333240224324, 1.58692401983678180
|
382
391
|
].freeze
|
383
392
|
|
384
393
|
# The transformation matrix for converting xyz colors to linear-light
|
@@ -414,31 +423,31 @@ module Sass
|
|
414
423
|
# The transformation matrix for converting lms colors to linear-light
|
415
424
|
# prophoto-rgb.
|
416
425
|
LMS_TO_LINEAR_PROPHOTO_RGB = [
|
417
|
-
1.
|
418
|
-
-0.
|
419
|
-
-0.
|
426
|
+
1.73835514811572070, -0.98795094275144580, 0.24959579463572504,
|
427
|
+
-0.70704940153292660, 1.93437004444013820, -0.22732064290721150,
|
428
|
+
-0.08407882206239634, -0.35754060521141334, 1.44161942727380970
|
420
429
|
].freeze
|
421
430
|
|
422
431
|
# The transformation matrix for converting linear-light prophoto-rgb colors to
|
423
432
|
# lms.
|
424
433
|
LINEAR_PROPHOTO_RGB_TO_LMS = [
|
425
|
-
0.
|
426
|
-
0.
|
427
|
-
0.
|
434
|
+
0.71544846056555340, 0.35279155007721186, -0.06824001064276530,
|
435
|
+
0.27441164900156710, 0.66779764984123670, 0.05779070115719616,
|
436
|
+
0.10978443261622942, 0.18619829115002018, 0.70401727623375040
|
428
437
|
].freeze
|
429
438
|
|
430
439
|
# The transformation matrix for converting lms colors to xyz-d50.
|
431
440
|
LMS_TO_XYZ_D50 = [
|
432
|
-
1.
|
433
|
-
-0.
|
434
|
-
-0.
|
441
|
+
1.28858621817270600, -0.53787174449737450, 0.21358120275423640,
|
442
|
+
-0.00253387643187372, 1.09231679887191650, -0.08978292244004273,
|
443
|
+
-0.06937382305734124, -0.29500839894431263, 1.18948682451211420
|
435
444
|
].freeze
|
436
445
|
|
437
446
|
# The transformation matrix for converting xyz-d50 colors to lms.
|
438
447
|
XYZ_D50_TO_LMS = [
|
439
|
-
0.
|
440
|
-
0.
|
441
|
-
0.
|
448
|
+
0.77070004204311720, 0.34924840261939616, -0.11202351884164681,
|
449
|
+
0.00559649248368848, 0.93707234011367690, 0.06972568836252771,
|
450
|
+
0.04633714262191069, 0.25277531574310524, 0.85145807674679600
|
442
451
|
].freeze
|
443
452
|
|
444
453
|
# The transformation matrix for converting linear-light prophoto-rgb colors to
|
@@ -17,11 +17,11 @@ module Sass
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def to_linear(channel)
|
20
|
-
|
20
|
+
(channel <=> 0) * (channel.abs**(563 / 256.0))
|
21
21
|
end
|
22
22
|
|
23
23
|
def from_linear(channel)
|
24
|
-
|
24
|
+
(channel <=> 0) * (channel.abs**(256 / 563.0))
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
@@ -18,12 +18,12 @@ module Sass
|
|
18
18
|
|
19
19
|
def to_linear(channel)
|
20
20
|
abs = channel.abs
|
21
|
-
abs <= 16 / 512.0 ? channel / 16.0 :
|
21
|
+
abs <= 16 / 512.0 ? channel / 16.0 : (channel <=> 0) * (abs**1.8)
|
22
22
|
end
|
23
23
|
|
24
24
|
def from_linear(channel)
|
25
25
|
abs = channel.abs
|
26
|
-
abs >= 1 / 512.0 ?
|
26
|
+
abs >= 1 / 512.0 ? (channel <=> 0) * (abs**(1 / 1.8)) : 16 * channel
|
27
27
|
end
|
28
28
|
|
29
29
|
private
|
@@ -28,12 +28,12 @@ module Sass
|
|
28
28
|
|
29
29
|
def to_linear(channel)
|
30
30
|
abs = channel.abs
|
31
|
-
abs < BETA * 4.5 ? channel / 4.5 :
|
31
|
+
abs < BETA * 4.5 ? channel / 4.5 : (channel <=> 0) * (((abs + ALPHA - 1) / ALPHA)**(1 / 0.45))
|
32
32
|
end
|
33
33
|
|
34
34
|
def from_linear(channel)
|
35
35
|
abs = channel.abs
|
36
|
-
abs > BETA ?
|
36
|
+
abs > BETA ? (channel <=> 0) * ((ALPHA * (abs**0.45)) - (ALPHA - 1)) : 4.5 * channel
|
37
37
|
end
|
38
38
|
|
39
39
|
private
|
@@ -37,7 +37,7 @@ module Sass
|
|
37
37
|
# @return [Numeric]
|
38
38
|
def srgb_and_display_p3_to_linear(channel)
|
39
39
|
abs = channel.abs
|
40
|
-
abs
|
40
|
+
abs <= 0.04045 ? channel / 12.92 : (channel <=> 0) * (((abs + 0.055) / 1.055)**2.4)
|
41
41
|
end
|
42
42
|
|
43
43
|
# The algorithm for converting a single `srgb` or `display-p3` channel to
|
@@ -46,7 +46,7 @@ module Sass
|
|
46
46
|
# @return [Numeric]
|
47
47
|
def srgb_and_display_p3_from_linear(channel)
|
48
48
|
abs = channel.abs
|
49
|
-
abs <= 0.0031308 ? channel * 12.92 :
|
49
|
+
abs <= 0.0031308 ? channel * 12.92 : (channel <=> 0) * ((1.055 * (abs**(1 / 2.4))) - 0.055)
|
50
50
|
end
|
51
51
|
|
52
52
|
# Converts a Lab or OKLab color to LCH or OKLCH, respectively.
|
data/lib/sass/value/color.rb
CHANGED
@@ -101,7 +101,7 @@ module Sass
|
|
101
101
|
_to_gamut(GamutMapMethod.from_name(method, 'method'))
|
102
102
|
end
|
103
103
|
|
104
|
-
# @return [Array<Numeric>]
|
104
|
+
# @return [Array<Numeric, nil>]
|
105
105
|
def channels_or_nil
|
106
106
|
[channel0_or_nil, channel1_or_nil, channel2_or_nil].freeze
|
107
107
|
end
|
@@ -254,12 +254,12 @@ module Sass
|
|
254
254
|
changed_color._to_space(_space)
|
255
255
|
end
|
256
256
|
|
257
|
-
# return [Numeric]
|
257
|
+
# @return [Numeric]
|
258
258
|
def alpha
|
259
259
|
@alpha_or_nil.nil? ? 0 : @alpha_or_nil
|
260
260
|
end
|
261
261
|
|
262
|
-
# return [::Boolean]
|
262
|
+
# @return [::Boolean]
|
263
263
|
def legacy?
|
264
264
|
_space.legacy?
|
265
265
|
end
|
@@ -339,11 +339,11 @@ module Sass
|
|
339
339
|
# @return [Integer]
|
340
340
|
def hash
|
341
341
|
@hash ||= [
|
342
|
-
_space,
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
342
|
+
_space.name,
|
343
|
+
FuzzyMath._hash(channel0_or_nil),
|
344
|
+
FuzzyMath._hash(channel1_or_nil),
|
345
|
+
FuzzyMath._hash(channel2_or_nil),
|
346
|
+
FuzzyMath._hash(alpha_or_nil)
|
347
347
|
].hash
|
348
348
|
end
|
349
349
|
|
@@ -569,8 +569,8 @@ module Sass
|
|
569
569
|
|
570
570
|
return false if original.equal?(output)
|
571
571
|
|
572
|
-
output_channel = output.
|
573
|
-
original_channel = original.
|
572
|
+
output_channel = output._space.channels[output_channel_index]
|
573
|
+
original_channel = original._space.channels.find do |channel|
|
574
574
|
output_channel.analogous?(channel)
|
575
575
|
end
|
576
576
|
|
@@ -47,33 +47,14 @@ module Sass
|
|
47
47
|
|
48
48
|
def integer?(number)
|
49
49
|
return false unless number.finite?
|
50
|
-
return true if number.integer?
|
51
50
|
|
52
|
-
equals(
|
51
|
+
equals(number, number.round)
|
53
52
|
end
|
54
53
|
|
55
54
|
def to_i(number)
|
56
55
|
integer?(number) ? number.round : nil
|
57
56
|
end
|
58
57
|
|
59
|
-
def round(number)
|
60
|
-
if number.positive?
|
61
|
-
less_than(number % 1, 0.5) ? number.floor : number.ceil
|
62
|
-
else
|
63
|
-
less_than_or_equals(number % 1, 0.5) ? number.floor : number.ceil
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
def sign(number)
|
68
|
-
if number.positive?
|
69
|
-
1
|
70
|
-
elsif number.negative?
|
71
|
-
-1
|
72
|
-
else
|
73
|
-
0
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
58
|
def between(number, min, max)
|
78
59
|
return min if equals(number, min)
|
79
60
|
return max if equals(number, max)
|
@@ -89,16 +70,12 @@ module Sass
|
|
89
70
|
raise Sass::ScriptError.new("#{number} must be between #{min} and #{max}.", name)
|
90
71
|
end
|
91
72
|
|
92
|
-
def
|
73
|
+
def _clamp_like_css(number, lower_bound, upper_bound)
|
93
74
|
number.to_f.nan? ? lower_bound : number.clamp(lower_bound, upper_bound)
|
94
75
|
end
|
95
76
|
|
96
|
-
def
|
97
|
-
|
98
|
-
(number * INVERSE_EPSILON).round.hash
|
99
|
-
else
|
100
|
-
number.hash
|
101
|
-
end
|
77
|
+
def _hash(number)
|
78
|
+
number&.finite? ? (number * INVERSE_EPSILON).round : number
|
102
79
|
end
|
103
80
|
end
|
104
81
|
|
data/lib/sass/value/number.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass-embedded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.79.
|
4
|
+
version: 1.79.6
|
5
5
|
platform: x86_64-linux-android
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -112,8 +112,8 @@ licenses:
|
|
112
112
|
- MIT
|
113
113
|
metadata:
|
114
114
|
bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
|
115
|
-
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.79.
|
116
|
-
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.79.
|
115
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.79.6
|
116
|
+
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.79.6
|
117
117
|
funding_uri: https://github.com/sponsors/ntkme
|
118
118
|
rubygems_mfa_required: 'true'
|
119
119
|
post_install_message:
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
|
-
rubygems_version: 3.5.
|
134
|
+
rubygems_version: 3.5.22
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Use dart-sass with Ruby!
|