sass-embedded 1.58.2 → 1.58.3

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,2410 @@
1
+ "use strict";
2
+ // Copyright 2019 Google Inc. Use of this source code is governed by an
3
+ // MIT-style license that can be found in the LICENSE file or at
4
+ // https://opensource.org/licenses/MIT.
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Value_Calculation_CalculationOperation = exports.Value_Calculation_CalculationValue = exports.Value_Calculation = exports.Value_ArgumentList = exports.Value_HostFunction = exports.Value_CompilerFunction = exports.Value_Map_Entry = exports.Value_Map = exports.Value_List = exports.Value_HwbColor = exports.Value_HslColor = exports.Value_RgbColor = exports.Value_Number = exports.Value_String = exports.Value = exports.SourceSpan_SourceLocation = exports.SourceSpan = exports.ProtocolError = exports.OutboundMessage_FunctionCallRequest = exports.OutboundMessage_FileImportRequest = exports.OutboundMessage_ImportRequest = exports.OutboundMessage_CanonicalizeRequest = exports.OutboundMessage_LogEvent = exports.OutboundMessage_CompileResponse_CompileFailure = exports.OutboundMessage_CompileResponse_CompileSuccess = exports.OutboundMessage_CompileResponse = exports.OutboundMessage_VersionResponse = exports.OutboundMessage = exports.InboundMessage_FunctionCallResponse = exports.InboundMessage_FileImportResponse = exports.InboundMessage_ImportResponse_ImportSuccess = exports.InboundMessage_ImportResponse = exports.InboundMessage_CanonicalizeResponse = exports.InboundMessage_CompileRequest_Importer = exports.InboundMessage_CompileRequest_StringInput = exports.InboundMessage_CompileRequest = exports.InboundMessage_VersionRequest = exports.InboundMessage = exports.CalculationOperator = exports.SingletonValue = exports.ListSeparator = exports.ProtocolErrorType = exports.LogEventType = exports.Syntax = exports.OutputStyle = void 0;
7
+ const protobuf_1 = require("@bufbuild/protobuf");
8
+ /**
9
+ * Possible ways to format the CSS output. The compiler is not required to
10
+ * support all possible options; if the host requests an unsupported style, the
11
+ * compiler should choose the closest supported style.
12
+ *
13
+ * @generated from enum sass.embedded_protocol.OutputStyle
14
+ */
15
+ var OutputStyle;
16
+ (function (OutputStyle) {
17
+ /**
18
+ * Each selector and declaration is written on its own line.
19
+ *
20
+ * @generated from enum value: EXPANDED = 0;
21
+ */
22
+ OutputStyle[OutputStyle["EXPANDED"] = 0] = "EXPANDED";
23
+ /**
24
+ * The entire stylesheet is written on a single line, with as few characters
25
+ * as possible.
26
+ *
27
+ * @generated from enum value: COMPRESSED = 1;
28
+ */
29
+ OutputStyle[OutputStyle["COMPRESSED"] = 1] = "COMPRESSED";
30
+ })(OutputStyle = exports.OutputStyle || (exports.OutputStyle = {}));
31
+ // Retrieve enum metadata with: proto3.getEnumType(OutputStyle)
32
+ protobuf_1.proto3.util.setEnumType(OutputStyle, "sass.embedded_protocol.OutputStyle", [
33
+ { no: 0, name: "EXPANDED" },
34
+ { no: 1, name: "COMPRESSED" },
35
+ ]);
36
+ /**
37
+ * Possible syntaxes for a Sass stylesheet.
38
+ *
39
+ * @generated from enum sass.embedded_protocol.Syntax
40
+ */
41
+ var Syntax;
42
+ (function (Syntax) {
43
+ /**
44
+ * The CSS-superset `.scss` syntax.
45
+ *
46
+ * @generated from enum value: SCSS = 0;
47
+ */
48
+ Syntax[Syntax["SCSS"] = 0] = "SCSS";
49
+ /**
50
+ * The indented `.sass` syntax.
51
+ *
52
+ * @generated from enum value: INDENTED = 1;
53
+ */
54
+ Syntax[Syntax["INDENTED"] = 1] = "INDENTED";
55
+ /**
56
+ * Plain CSS syntax that doesn't support any special Sass features.
57
+ *
58
+ * @generated from enum value: CSS = 2;
59
+ */
60
+ Syntax[Syntax["CSS"] = 2] = "CSS";
61
+ })(Syntax = exports.Syntax || (exports.Syntax = {}));
62
+ // Retrieve enum metadata with: proto3.getEnumType(Syntax)
63
+ protobuf_1.proto3.util.setEnumType(Syntax, "sass.embedded_protocol.Syntax", [
64
+ { no: 0, name: "SCSS" },
65
+ { no: 1, name: "INDENTED" },
66
+ { no: 2, name: "CSS" },
67
+ ]);
68
+ /**
69
+ * The possible types of [LogEvent].
70
+ *
71
+ * @generated from enum sass.embedded_protocol.LogEventType
72
+ */
73
+ var LogEventType;
74
+ (function (LogEventType) {
75
+ /**
76
+ * A warning for something other than a deprecated Sass feature. Often emitted
77
+ * due to a stylesheet using the `@warn` rule.
78
+ *
79
+ * @generated from enum value: WARNING = 0;
80
+ */
81
+ LogEventType[LogEventType["WARNING"] = 0] = "WARNING";
82
+ /**
83
+ * A warning indicating that the stylesheet is using a deprecated Sass
84
+ * feature. Compilers should not add text like "deprecation warning" to
85
+ * deprecation warnings; it's up to the host to determine how to signal that
86
+ * to the user.
87
+ *
88
+ * @generated from enum value: DEPRECATION_WARNING = 1;
89
+ */
90
+ LogEventType[LogEventType["DEPRECATION_WARNING"] = 1] = "DEPRECATION_WARNING";
91
+ /**
92
+ * A message generated by the user for their own debugging purposes.
93
+ *
94
+ * @generated from enum value: DEBUG = 2;
95
+ */
96
+ LogEventType[LogEventType["DEBUG"] = 2] = "DEBUG";
97
+ })(LogEventType = exports.LogEventType || (exports.LogEventType = {}));
98
+ // Retrieve enum metadata with: proto3.getEnumType(LogEventType)
99
+ protobuf_1.proto3.util.setEnumType(LogEventType, "sass.embedded_protocol.LogEventType", [
100
+ { no: 0, name: "WARNING" },
101
+ { no: 1, name: "DEPRECATION_WARNING" },
102
+ { no: 2, name: "DEBUG" },
103
+ ]);
104
+ /**
105
+ * Potential types of protocol errors.
106
+ *
107
+ * @generated from enum sass.embedded_protocol.ProtocolErrorType
108
+ */
109
+ var ProtocolErrorType;
110
+ (function (ProtocolErrorType) {
111
+ /**
112
+ * A message was received that couldn't be decoded as an `InboundMessage` (for
113
+ * the compiler) or `OutboundMessage` (for the host).
114
+ *
115
+ * @generated from enum value: PARSE = 0;
116
+ */
117
+ ProtocolErrorType[ProtocolErrorType["PARSE"] = 0] = "PARSE";
118
+ /**
119
+ * A message was received that violated a documented restriction, such as not
120
+ * providing a mandatory field.
121
+ *
122
+ * @generated from enum value: PARAMS = 1;
123
+ */
124
+ ProtocolErrorType[ProtocolErrorType["PARAMS"] = 1] = "PARAMS";
125
+ /**
126
+ * Something unexpected went wrong within the endpoint.
127
+ *
128
+ * @generated from enum value: INTERNAL = 2;
129
+ */
130
+ ProtocolErrorType[ProtocolErrorType["INTERNAL"] = 2] = "INTERNAL";
131
+ })(ProtocolErrorType = exports.ProtocolErrorType || (exports.ProtocolErrorType = {}));
132
+ // Retrieve enum metadata with: proto3.getEnumType(ProtocolErrorType)
133
+ protobuf_1.proto3.util.setEnumType(ProtocolErrorType, "sass.embedded_protocol.ProtocolErrorType", [
134
+ { no: 0, name: "PARSE" },
135
+ { no: 1, name: "PARAMS" },
136
+ { no: 2, name: "INTERNAL" },
137
+ ]);
138
+ /**
139
+ * Different types of separators a list can have.
140
+ *
141
+ * @generated from enum sass.embedded_protocol.ListSeparator
142
+ */
143
+ var ListSeparator;
144
+ (function (ListSeparator) {
145
+ /**
146
+ * List elements are separated by a comma.
147
+ *
148
+ * @generated from enum value: COMMA = 0;
149
+ */
150
+ ListSeparator[ListSeparator["COMMA"] = 0] = "COMMA";
151
+ /**
152
+ * List elements are separated by whitespace.
153
+ *
154
+ * @generated from enum value: SPACE = 1;
155
+ */
156
+ ListSeparator[ListSeparator["SPACE"] = 1] = "SPACE";
157
+ /**
158
+ * List elements are separated by a forward slash.
159
+ *
160
+ * @generated from enum value: SLASH = 2;
161
+ */
162
+ ListSeparator[ListSeparator["SLASH"] = 2] = "SLASH";
163
+ /**
164
+ * The list's separator hasn't yet been determined. This is only allowed for
165
+ * singleton and empty lists.
166
+ *
167
+ * Singleton lists and empty lists don't have separators defined. This means
168
+ * that list functions will prefer other lists' separators if possible.
169
+ *
170
+ * @generated from enum value: UNDECIDED = 3;
171
+ */
172
+ ListSeparator[ListSeparator["UNDECIDED"] = 3] = "UNDECIDED";
173
+ })(ListSeparator = exports.ListSeparator || (exports.ListSeparator = {}));
174
+ // Retrieve enum metadata with: proto3.getEnumType(ListSeparator)
175
+ protobuf_1.proto3.util.setEnumType(ListSeparator, "sass.embedded_protocol.ListSeparator", [
176
+ { no: 0, name: "COMMA" },
177
+ { no: 1, name: "SPACE" },
178
+ { no: 2, name: "SLASH" },
179
+ { no: 3, name: "UNDECIDED" },
180
+ ]);
181
+ /**
182
+ * Singleton SassScript values that have no internal state.
183
+ *
184
+ * @generated from enum sass.embedded_protocol.SingletonValue
185
+ */
186
+ var SingletonValue;
187
+ (function (SingletonValue) {
188
+ /**
189
+ * The SassScript boolean true value.
190
+ *
191
+ * @generated from enum value: TRUE = 0;
192
+ */
193
+ SingletonValue[SingletonValue["TRUE"] = 0] = "TRUE";
194
+ /**
195
+ * The SassScript boolean false value.
196
+ *
197
+ * @generated from enum value: FALSE = 1;
198
+ */
199
+ SingletonValue[SingletonValue["FALSE"] = 1] = "FALSE";
200
+ /**
201
+ * The SassScript null value.
202
+ *
203
+ * @generated from enum value: NULL = 2;
204
+ */
205
+ SingletonValue[SingletonValue["NULL"] = 2] = "NULL";
206
+ })(SingletonValue = exports.SingletonValue || (exports.SingletonValue = {}));
207
+ // Retrieve enum metadata with: proto3.getEnumType(SingletonValue)
208
+ protobuf_1.proto3.util.setEnumType(SingletonValue, "sass.embedded_protocol.SingletonValue", [
209
+ { no: 0, name: "TRUE" },
210
+ { no: 1, name: "FALSE" },
211
+ { no: 2, name: "NULL" },
212
+ ]);
213
+ /**
214
+ * An operator used in a calculation value's operation.
215
+ *
216
+ * @generated from enum sass.embedded_protocol.CalculationOperator
217
+ */
218
+ var CalculationOperator;
219
+ (function (CalculationOperator) {
220
+ /**
221
+ * The addition operator.
222
+ *
223
+ * @generated from enum value: PLUS = 0;
224
+ */
225
+ CalculationOperator[CalculationOperator["PLUS"] = 0] = "PLUS";
226
+ /**
227
+ * The subtraction operator.
228
+ *
229
+ * @generated from enum value: MINUS = 1;
230
+ */
231
+ CalculationOperator[CalculationOperator["MINUS"] = 1] = "MINUS";
232
+ /**
233
+ * The multiplication operator.
234
+ *
235
+ * @generated from enum value: TIMES = 2;
236
+ */
237
+ CalculationOperator[CalculationOperator["TIMES"] = 2] = "TIMES";
238
+ /**
239
+ * The division operator.
240
+ *
241
+ * @generated from enum value: DIVIDE = 3;
242
+ */
243
+ CalculationOperator[CalculationOperator["DIVIDE"] = 3] = "DIVIDE";
244
+ })(CalculationOperator = exports.CalculationOperator || (exports.CalculationOperator = {}));
245
+ // Retrieve enum metadata with: proto3.getEnumType(CalculationOperator)
246
+ protobuf_1.proto3.util.setEnumType(CalculationOperator, "sass.embedded_protocol.CalculationOperator", [
247
+ { no: 0, name: "PLUS" },
248
+ { no: 1, name: "MINUS" },
249
+ { no: 2, name: "TIMES" },
250
+ { no: 3, name: "DIVIDE" },
251
+ ]);
252
+ /**
253
+ * The wrapper type for all messages sent from the host to the compiler. This
254
+ * provides a `oneof` that makes it possible to determine the type of each
255
+ * inbound message.
256
+ *
257
+ * @generated from message sass.embedded_protocol.InboundMessage
258
+ */
259
+ class InboundMessage extends protobuf_1.Message {
260
+ constructor(data) {
261
+ super();
262
+ /**
263
+ * The wrapped message. Mandatory.
264
+ *
265
+ * @generated from oneof sass.embedded_protocol.InboundMessage.message
266
+ */
267
+ this.message = { case: undefined };
268
+ protobuf_1.proto3.util.initPartial(data, this);
269
+ }
270
+ static fromBinary(bytes, options) {
271
+ return new InboundMessage().fromBinary(bytes, options);
272
+ }
273
+ static fromJson(jsonValue, options) {
274
+ return new InboundMessage().fromJson(jsonValue, options);
275
+ }
276
+ static fromJsonString(jsonString, options) {
277
+ return new InboundMessage().fromJsonString(jsonString, options);
278
+ }
279
+ static equals(a, b) {
280
+ return protobuf_1.proto3.util.equals(InboundMessage, a, b);
281
+ }
282
+ }
283
+ exports.InboundMessage = InboundMessage;
284
+ InboundMessage.runtime = protobuf_1.proto3;
285
+ InboundMessage.typeName = "sass.embedded_protocol.InboundMessage";
286
+ InboundMessage.fields = protobuf_1.proto3.util.newFieldList(() => [
287
+ { no: 2, name: "compile_request", kind: "message", T: InboundMessage_CompileRequest, oneof: "message" },
288
+ { no: 3, name: "canonicalize_response", kind: "message", T: InboundMessage_CanonicalizeResponse, oneof: "message" },
289
+ { no: 4, name: "import_response", kind: "message", T: InboundMessage_ImportResponse, oneof: "message" },
290
+ { no: 5, name: "file_import_response", kind: "message", T: InboundMessage_FileImportResponse, oneof: "message" },
291
+ { no: 6, name: "function_call_response", kind: "message", T: InboundMessage_FunctionCallResponse, oneof: "message" },
292
+ { no: 7, name: "version_request", kind: "message", T: InboundMessage_VersionRequest, oneof: "message" },
293
+ ]);
294
+ /**
295
+ * A request for information about the version of the embedded compiler. The
296
+ * host can use this to provide diagnostic information to the user, to check
297
+ * which features the compiler supports, or to ensure that it's compatible
298
+ * with the same protocol version the compiler supports.
299
+ *
300
+ * @generated from message sass.embedded_protocol.InboundMessage.VersionRequest
301
+ */
302
+ class InboundMessage_VersionRequest extends protobuf_1.Message {
303
+ constructor(data) {
304
+ super();
305
+ /**
306
+ * This version request's id. Mandatory.
307
+ *
308
+ * @generated from field: uint32 id = 1;
309
+ */
310
+ this.id = 0;
311
+ protobuf_1.proto3.util.initPartial(data, this);
312
+ }
313
+ static fromBinary(bytes, options) {
314
+ return new InboundMessage_VersionRequest().fromBinary(bytes, options);
315
+ }
316
+ static fromJson(jsonValue, options) {
317
+ return new InboundMessage_VersionRequest().fromJson(jsonValue, options);
318
+ }
319
+ static fromJsonString(jsonString, options) {
320
+ return new InboundMessage_VersionRequest().fromJsonString(jsonString, options);
321
+ }
322
+ static equals(a, b) {
323
+ return protobuf_1.proto3.util.equals(InboundMessage_VersionRequest, a, b);
324
+ }
325
+ }
326
+ exports.InboundMessage_VersionRequest = InboundMessage_VersionRequest;
327
+ InboundMessage_VersionRequest.runtime = protobuf_1.proto3;
328
+ InboundMessage_VersionRequest.typeName = "sass.embedded_protocol.InboundMessage.VersionRequest";
329
+ InboundMessage_VersionRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
330
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
331
+ ]);
332
+ /**
333
+ * A request that compiles an entrypoint to CSS.
334
+ *
335
+ * @generated from message sass.embedded_protocol.InboundMessage.CompileRequest
336
+ */
337
+ class InboundMessage_CompileRequest extends protobuf_1.Message {
338
+ constructor(data) {
339
+ super();
340
+ /**
341
+ * This compilation's request id. This is included in messages sent from the
342
+ * compiler to the host. Mandatory.
343
+ *
344
+ * @generated from field: uint32 id = 1;
345
+ */
346
+ this.id = 0;
347
+ /**
348
+ * The input stylesheet to parse. Mandatory.
349
+ *
350
+ * @generated from oneof sass.embedded_protocol.InboundMessage.CompileRequest.input
351
+ */
352
+ this.input = { case: undefined };
353
+ /**
354
+ * How to format the CSS output.
355
+ *
356
+ * @generated from field: sass.embedded_protocol.OutputStyle style = 4;
357
+ */
358
+ this.style = OutputStyle.EXPANDED;
359
+ /**
360
+ * Whether to generate a source map. Note that this will *not* add a source
361
+ * map comment to the stylesheet; that's up to the host or its users.
362
+ *
363
+ * @generated from field: bool source_map = 5;
364
+ */
365
+ this.sourceMap = false;
366
+ /**
367
+ * Importers (including load paths on the filesystem) to use when resolving
368
+ * imports that can't be resolved relative to the file that contains it. Each
369
+ * importer is checked in order until one recognizes the imported URL.
370
+ *
371
+ * @generated from field: repeated sass.embedded_protocol.InboundMessage.CompileRequest.Importer importers = 6;
372
+ */
373
+ this.importers = [];
374
+ /**
375
+ * Signatures for custom global functions whose behavior is defined by the
376
+ * host.
377
+ *
378
+ * If this is not a valid Sass function signature that could appear after
379
+ * `@function` in a Sass stylesheet (such as `mix($color1, $color2, $weight:
380
+ * 50%)`), or if it conflicts with a function name that's built into the
381
+ * Sass language, the compiler must treat the compilation as failed.
382
+ *
383
+ * Compilers must ensure that pure-Sass functions take precedence over
384
+ * custom global functions.
385
+ *
386
+ * @generated from field: repeated string global_functions = 7;
387
+ */
388
+ this.globalFunctions = [];
389
+ /**
390
+ * Whether to use terminal colors in the formatted message of errors and
391
+ * logs.
392
+ *
393
+ * @generated from field: bool alert_color = 8;
394
+ */
395
+ this.alertColor = false;
396
+ /**
397
+ * Whether to encode the formatted message of errors and logs in ASCII.
398
+ *
399
+ * @generated from field: bool alert_ascii = 9;
400
+ */
401
+ this.alertAscii = false;
402
+ /**
403
+ * Whether to report all deprecation warnings or only the first few ones.
404
+ * If this is `false`, the compiler may choose not to send events for
405
+ * repeated deprecation warnings. If this is `true`, the compiler must emit
406
+ * an event for every deprecation warning it encounters.
407
+ *
408
+ * @generated from field: bool verbose = 10;
409
+ */
410
+ this.verbose = false;
411
+ /**
412
+ * Whether to omit events for deprecation warnings coming from dependencies
413
+ * (files loaded from a different importer than the input).
414
+ *
415
+ * @generated from field: bool quiet_deps = 11;
416
+ */
417
+ this.quietDeps = false;
418
+ /**
419
+ * Whether to include sources in the generated sourcemap
420
+ *
421
+ * @generated from field: bool source_map_include_sources = 12;
422
+ */
423
+ this.sourceMapIncludeSources = false;
424
+ /**
425
+ * Whether to emit a `@charset`/BOM for non-ASCII stylesheets.
426
+ *
427
+ * @generated from field: bool charset = 13;
428
+ */
429
+ this.charset = false;
430
+ protobuf_1.proto3.util.initPartial(data, this);
431
+ }
432
+ static fromBinary(bytes, options) {
433
+ return new InboundMessage_CompileRequest().fromBinary(bytes, options);
434
+ }
435
+ static fromJson(jsonValue, options) {
436
+ return new InboundMessage_CompileRequest().fromJson(jsonValue, options);
437
+ }
438
+ static fromJsonString(jsonString, options) {
439
+ return new InboundMessage_CompileRequest().fromJsonString(jsonString, options);
440
+ }
441
+ static equals(a, b) {
442
+ return protobuf_1.proto3.util.equals(InboundMessage_CompileRequest, a, b);
443
+ }
444
+ }
445
+ exports.InboundMessage_CompileRequest = InboundMessage_CompileRequest;
446
+ InboundMessage_CompileRequest.runtime = protobuf_1.proto3;
447
+ InboundMessage_CompileRequest.typeName = "sass.embedded_protocol.InboundMessage.CompileRequest";
448
+ InboundMessage_CompileRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
449
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
450
+ { no: 2, name: "string", kind: "message", T: InboundMessage_CompileRequest_StringInput, oneof: "input" },
451
+ { no: 3, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "input" },
452
+ { no: 4, name: "style", kind: "enum", T: protobuf_1.proto3.getEnumType(OutputStyle) },
453
+ { no: 5, name: "source_map", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
454
+ { no: 6, name: "importers", kind: "message", T: InboundMessage_CompileRequest_Importer, repeated: true },
455
+ { no: 7, name: "global_functions", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
456
+ { no: 8, name: "alert_color", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
457
+ { no: 9, name: "alert_ascii", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
458
+ { no: 10, name: "verbose", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
459
+ { no: 11, name: "quiet_deps", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
460
+ { no: 12, name: "source_map_include_sources", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
461
+ { no: 13, name: "charset", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
462
+ ]);
463
+ /**
464
+ * An input stylesheet provided as plain text, rather than loaded from the
465
+ * filesystem.
466
+ *
467
+ * @generated from message sass.embedded_protocol.InboundMessage.CompileRequest.StringInput
468
+ */
469
+ class InboundMessage_CompileRequest_StringInput extends protobuf_1.Message {
470
+ constructor(data) {
471
+ super();
472
+ /**
473
+ * The contents of the stylesheet.
474
+ *
475
+ * @generated from field: string source = 1;
476
+ */
477
+ this.source = "";
478
+ /**
479
+ * The location from which `source` was loaded. If this is empty, it
480
+ * indicates that the URL is unknown.
481
+ *
482
+ * This must be a canonical URL recognized by `importer`, if it's passed.
483
+ *
484
+ * @generated from field: string url = 2;
485
+ */
486
+ this.url = "";
487
+ /**
488
+ * The syntax to use to parse `source`.
489
+ *
490
+ * @generated from field: sass.embedded_protocol.Syntax syntax = 3;
491
+ */
492
+ this.syntax = Syntax.SCSS;
493
+ protobuf_1.proto3.util.initPartial(data, this);
494
+ }
495
+ static fromBinary(bytes, options) {
496
+ return new InboundMessage_CompileRequest_StringInput().fromBinary(bytes, options);
497
+ }
498
+ static fromJson(jsonValue, options) {
499
+ return new InboundMessage_CompileRequest_StringInput().fromJson(jsonValue, options);
500
+ }
501
+ static fromJsonString(jsonString, options) {
502
+ return new InboundMessage_CompileRequest_StringInput().fromJsonString(jsonString, options);
503
+ }
504
+ static equals(a, b) {
505
+ return protobuf_1.proto3.util.equals(InboundMessage_CompileRequest_StringInput, a, b);
506
+ }
507
+ }
508
+ exports.InboundMessage_CompileRequest_StringInput = InboundMessage_CompileRequest_StringInput;
509
+ InboundMessage_CompileRequest_StringInput.runtime = protobuf_1.proto3;
510
+ InboundMessage_CompileRequest_StringInput.typeName = "sass.embedded_protocol.InboundMessage.CompileRequest.StringInput";
511
+ InboundMessage_CompileRequest_StringInput.fields = protobuf_1.proto3.util.newFieldList(() => [
512
+ { no: 1, name: "source", kind: "scalar", T: 9 /* ScalarType.STRING */ },
513
+ { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
514
+ { no: 3, name: "syntax", kind: "enum", T: protobuf_1.proto3.getEnumType(Syntax) },
515
+ { no: 4, name: "importer", kind: "message", T: InboundMessage_CompileRequest_Importer },
516
+ ]);
517
+ /**
518
+ * A wrapper message that represents either a user-defined importer or a
519
+ * load path on disk. This must be a wrapper because `oneof` types can't be
520
+ * `repeated`.
521
+ *
522
+ * @generated from message sass.embedded_protocol.InboundMessage.CompileRequest.Importer
523
+ */
524
+ class InboundMessage_CompileRequest_Importer extends protobuf_1.Message {
525
+ constructor(data) {
526
+ super();
527
+ /**
528
+ * The possible types of importer. Mandatory.
529
+ *
530
+ * @generated from oneof sass.embedded_protocol.InboundMessage.CompileRequest.Importer.importer
531
+ */
532
+ this.importer = { case: undefined };
533
+ protobuf_1.proto3.util.initPartial(data, this);
534
+ }
535
+ static fromBinary(bytes, options) {
536
+ return new InboundMessage_CompileRequest_Importer().fromBinary(bytes, options);
537
+ }
538
+ static fromJson(jsonValue, options) {
539
+ return new InboundMessage_CompileRequest_Importer().fromJson(jsonValue, options);
540
+ }
541
+ static fromJsonString(jsonString, options) {
542
+ return new InboundMessage_CompileRequest_Importer().fromJsonString(jsonString, options);
543
+ }
544
+ static equals(a, b) {
545
+ return protobuf_1.proto3.util.equals(InboundMessage_CompileRequest_Importer, a, b);
546
+ }
547
+ }
548
+ exports.InboundMessage_CompileRequest_Importer = InboundMessage_CompileRequest_Importer;
549
+ InboundMessage_CompileRequest_Importer.runtime = protobuf_1.proto3;
550
+ InboundMessage_CompileRequest_Importer.typeName = "sass.embedded_protocol.InboundMessage.CompileRequest.Importer";
551
+ InboundMessage_CompileRequest_Importer.fields = protobuf_1.proto3.util.newFieldList(() => [
552
+ { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "importer" },
553
+ { no: 2, name: "importer_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */, oneof: "importer" },
554
+ { no: 3, name: "file_importer_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */, oneof: "importer" },
555
+ ]);
556
+ /**
557
+ * A response indicating the result of canonicalizing an imported URL.
558
+ *
559
+ * @generated from message sass.embedded_protocol.InboundMessage.CanonicalizeResponse
560
+ */
561
+ class InboundMessage_CanonicalizeResponse extends protobuf_1.Message {
562
+ constructor(data) {
563
+ super();
564
+ /**
565
+ * @generated from field: uint32 id = 1;
566
+ */
567
+ this.id = 0;
568
+ /**
569
+ * The result of canonicalization. Optional. If this is `null`, it indicates
570
+ * that the importer either did not recognize the URL, or could not find a
571
+ * stylesheet at the location it referred to.
572
+ *
573
+ * @generated from oneof sass.embedded_protocol.InboundMessage.CanonicalizeResponse.result
574
+ */
575
+ this.result = { case: undefined };
576
+ protobuf_1.proto3.util.initPartial(data, this);
577
+ }
578
+ static fromBinary(bytes, options) {
579
+ return new InboundMessage_CanonicalizeResponse().fromBinary(bytes, options);
580
+ }
581
+ static fromJson(jsonValue, options) {
582
+ return new InboundMessage_CanonicalizeResponse().fromJson(jsonValue, options);
583
+ }
584
+ static fromJsonString(jsonString, options) {
585
+ return new InboundMessage_CanonicalizeResponse().fromJsonString(jsonString, options);
586
+ }
587
+ static equals(a, b) {
588
+ return protobuf_1.proto3.util.equals(InboundMessage_CanonicalizeResponse, a, b);
589
+ }
590
+ }
591
+ exports.InboundMessage_CanonicalizeResponse = InboundMessage_CanonicalizeResponse;
592
+ InboundMessage_CanonicalizeResponse.runtime = protobuf_1.proto3;
593
+ InboundMessage_CanonicalizeResponse.typeName = "sass.embedded_protocol.InboundMessage.CanonicalizeResponse";
594
+ InboundMessage_CanonicalizeResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
595
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
596
+ { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" },
597
+ { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" },
598
+ ]);
599
+ /**
600
+ * A response indicating the result of importing a canonical URL.
601
+ *
602
+ * @generated from message sass.embedded_protocol.InboundMessage.ImportResponse
603
+ */
604
+ class InboundMessage_ImportResponse extends protobuf_1.Message {
605
+ constructor(data) {
606
+ super();
607
+ /**
608
+ * @generated from field: uint32 id = 1;
609
+ */
610
+ this.id = 0;
611
+ /**
612
+ * The result of loading the URL. Optional. If this is `null`, it indicates
613
+ * that the importer either did not recognize the URL, or could not find a
614
+ * stylesheet at the location it referred to.
615
+ *
616
+ * @generated from oneof sass.embedded_protocol.InboundMessage.ImportResponse.result
617
+ */
618
+ this.result = { case: undefined };
619
+ protobuf_1.proto3.util.initPartial(data, this);
620
+ }
621
+ static fromBinary(bytes, options) {
622
+ return new InboundMessage_ImportResponse().fromBinary(bytes, options);
623
+ }
624
+ static fromJson(jsonValue, options) {
625
+ return new InboundMessage_ImportResponse().fromJson(jsonValue, options);
626
+ }
627
+ static fromJsonString(jsonString, options) {
628
+ return new InboundMessage_ImportResponse().fromJsonString(jsonString, options);
629
+ }
630
+ static equals(a, b) {
631
+ return protobuf_1.proto3.util.equals(InboundMessage_ImportResponse, a, b);
632
+ }
633
+ }
634
+ exports.InboundMessage_ImportResponse = InboundMessage_ImportResponse;
635
+ InboundMessage_ImportResponse.runtime = protobuf_1.proto3;
636
+ InboundMessage_ImportResponse.typeName = "sass.embedded_protocol.InboundMessage.ImportResponse";
637
+ InboundMessage_ImportResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
638
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
639
+ { no: 2, name: "success", kind: "message", T: InboundMessage_ImportResponse_ImportSuccess, oneof: "result" },
640
+ { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" },
641
+ ]);
642
+ /**
643
+ * The stylesheet's contents were loaded successfully.
644
+ *
645
+ * @generated from message sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccess
646
+ */
647
+ class InboundMessage_ImportResponse_ImportSuccess extends protobuf_1.Message {
648
+ constructor(data) {
649
+ super();
650
+ /**
651
+ * The text of the stylesheet. Mandatory.
652
+ *
653
+ * @generated from field: string contents = 1;
654
+ */
655
+ this.contents = "";
656
+ /**
657
+ * The syntax of `contents`. Mandatory.
658
+ *
659
+ * @generated from field: sass.embedded_protocol.Syntax syntax = 2;
660
+ */
661
+ this.syntax = Syntax.SCSS;
662
+ /**
663
+ * An absolute, browser-accessible URL indicating the resolved location of
664
+ * the imported stylesheet. Optional.
665
+ *
666
+ * This should be a `file:` URL if one is available, but an `http:` URL is
667
+ * acceptable as well. If no URL is supplied, a `data:` URL is generated
668
+ * automatically from `contents`.
669
+ *
670
+ * If this is provided and is not an absolute URL (including scheme) the
671
+ * compiler must treat that as an error thrown by the importer.
672
+ *
673
+ * @generated from field: string source_map_url = 3;
674
+ */
675
+ this.sourceMapUrl = "";
676
+ protobuf_1.proto3.util.initPartial(data, this);
677
+ }
678
+ static fromBinary(bytes, options) {
679
+ return new InboundMessage_ImportResponse_ImportSuccess().fromBinary(bytes, options);
680
+ }
681
+ static fromJson(jsonValue, options) {
682
+ return new InboundMessage_ImportResponse_ImportSuccess().fromJson(jsonValue, options);
683
+ }
684
+ static fromJsonString(jsonString, options) {
685
+ return new InboundMessage_ImportResponse_ImportSuccess().fromJsonString(jsonString, options);
686
+ }
687
+ static equals(a, b) {
688
+ return protobuf_1.proto3.util.equals(InboundMessage_ImportResponse_ImportSuccess, a, b);
689
+ }
690
+ }
691
+ exports.InboundMessage_ImportResponse_ImportSuccess = InboundMessage_ImportResponse_ImportSuccess;
692
+ InboundMessage_ImportResponse_ImportSuccess.runtime = protobuf_1.proto3;
693
+ InboundMessage_ImportResponse_ImportSuccess.typeName = "sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccess";
694
+ InboundMessage_ImportResponse_ImportSuccess.fields = protobuf_1.proto3.util.newFieldList(() => [
695
+ { no: 1, name: "contents", kind: "scalar", T: 9 /* ScalarType.STRING */ },
696
+ { no: 2, name: "syntax", kind: "enum", T: protobuf_1.proto3.getEnumType(Syntax) },
697
+ { no: 3, name: "source_map_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
698
+ ]);
699
+ /**
700
+ * A response indicating the result of redirecting a URL to the filesystem.
701
+ *
702
+ * @generated from message sass.embedded_protocol.InboundMessage.FileImportResponse
703
+ */
704
+ class InboundMessage_FileImportResponse extends protobuf_1.Message {
705
+ constructor(data) {
706
+ super();
707
+ /**
708
+ * @generated from field: uint32 id = 1;
709
+ */
710
+ this.id = 0;
711
+ /**
712
+ * The result of loading the URL. Optional. A null result indicates that the
713
+ * importer did not recognize the URL and other importers or load paths
714
+ * should be tried.
715
+ *
716
+ * @generated from oneof sass.embedded_protocol.InboundMessage.FileImportResponse.result
717
+ */
718
+ this.result = { case: undefined };
719
+ protobuf_1.proto3.util.initPartial(data, this);
720
+ }
721
+ static fromBinary(bytes, options) {
722
+ return new InboundMessage_FileImportResponse().fromBinary(bytes, options);
723
+ }
724
+ static fromJson(jsonValue, options) {
725
+ return new InboundMessage_FileImportResponse().fromJson(jsonValue, options);
726
+ }
727
+ static fromJsonString(jsonString, options) {
728
+ return new InboundMessage_FileImportResponse().fromJsonString(jsonString, options);
729
+ }
730
+ static equals(a, b) {
731
+ return protobuf_1.proto3.util.equals(InboundMessage_FileImportResponse, a, b);
732
+ }
733
+ }
734
+ exports.InboundMessage_FileImportResponse = InboundMessage_FileImportResponse;
735
+ InboundMessage_FileImportResponse.runtime = protobuf_1.proto3;
736
+ InboundMessage_FileImportResponse.typeName = "sass.embedded_protocol.InboundMessage.FileImportResponse";
737
+ InboundMessage_FileImportResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
738
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
739
+ { no: 2, name: "file_url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" },
740
+ { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" },
741
+ ]);
742
+ /**
743
+ * A response indicating the result of calling a custom Sass function defined
744
+ * in the host.
745
+ *
746
+ * @generated from message sass.embedded_protocol.InboundMessage.FunctionCallResponse
747
+ */
748
+ class InboundMessage_FunctionCallResponse extends protobuf_1.Message {
749
+ constructor(data) {
750
+ super();
751
+ /**
752
+ * @generated from field: uint32 id = 1;
753
+ */
754
+ this.id = 0;
755
+ /**
756
+ * The result of calling the function. Mandatory.
757
+ *
758
+ * @generated from oneof sass.embedded_protocol.InboundMessage.FunctionCallResponse.result
759
+ */
760
+ this.result = { case: undefined };
761
+ /**
762
+ * The IDs of all `Value.ArgumentList`s in `FunctionCallRequest.arguments`
763
+ * whose keywords were accessed. See `Value.ArgumentList` for details.
764
+ * Mandatory if `result.success` is set. This may not include the special
765
+ * value `0` and it may not include multiple instances of the same ID.
766
+ *
767
+ * @generated from field: repeated uint32 accessed_argument_lists = 4;
768
+ */
769
+ this.accessedArgumentLists = [];
770
+ protobuf_1.proto3.util.initPartial(data, this);
771
+ }
772
+ static fromBinary(bytes, options) {
773
+ return new InboundMessage_FunctionCallResponse().fromBinary(bytes, options);
774
+ }
775
+ static fromJson(jsonValue, options) {
776
+ return new InboundMessage_FunctionCallResponse().fromJson(jsonValue, options);
777
+ }
778
+ static fromJsonString(jsonString, options) {
779
+ return new InboundMessage_FunctionCallResponse().fromJsonString(jsonString, options);
780
+ }
781
+ static equals(a, b) {
782
+ return protobuf_1.proto3.util.equals(InboundMessage_FunctionCallResponse, a, b);
783
+ }
784
+ }
785
+ exports.InboundMessage_FunctionCallResponse = InboundMessage_FunctionCallResponse;
786
+ InboundMessage_FunctionCallResponse.runtime = protobuf_1.proto3;
787
+ InboundMessage_FunctionCallResponse.typeName = "sass.embedded_protocol.InboundMessage.FunctionCallResponse";
788
+ InboundMessage_FunctionCallResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
789
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
790
+ { no: 2, name: "success", kind: "message", T: Value, oneof: "result" },
791
+ { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "result" },
792
+ { no: 4, name: "accessed_argument_lists", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
793
+ ]);
794
+ /**
795
+ * The wrapper type for all messages sent from the compiler to the host. This
796
+ * provides a `oneof` that makes it possible to determine the type of each
797
+ * outbound message.
798
+ *
799
+ * @generated from message sass.embedded_protocol.OutboundMessage
800
+ */
801
+ class OutboundMessage extends protobuf_1.Message {
802
+ constructor(data) {
803
+ super();
804
+ /**
805
+ * The wrapped message. Mandatory.
806
+ *
807
+ * @generated from oneof sass.embedded_protocol.OutboundMessage.message
808
+ */
809
+ this.message = { case: undefined };
810
+ protobuf_1.proto3.util.initPartial(data, this);
811
+ }
812
+ static fromBinary(bytes, options) {
813
+ return new OutboundMessage().fromBinary(bytes, options);
814
+ }
815
+ static fromJson(jsonValue, options) {
816
+ return new OutboundMessage().fromJson(jsonValue, options);
817
+ }
818
+ static fromJsonString(jsonString, options) {
819
+ return new OutboundMessage().fromJsonString(jsonString, options);
820
+ }
821
+ static equals(a, b) {
822
+ return protobuf_1.proto3.util.equals(OutboundMessage, a, b);
823
+ }
824
+ }
825
+ exports.OutboundMessage = OutboundMessage;
826
+ OutboundMessage.runtime = protobuf_1.proto3;
827
+ OutboundMessage.typeName = "sass.embedded_protocol.OutboundMessage";
828
+ OutboundMessage.fields = protobuf_1.proto3.util.newFieldList(() => [
829
+ { no: 1, name: "error", kind: "message", T: ProtocolError, oneof: "message" },
830
+ { no: 2, name: "compile_response", kind: "message", T: OutboundMessage_CompileResponse, oneof: "message" },
831
+ { no: 3, name: "log_event", kind: "message", T: OutboundMessage_LogEvent, oneof: "message" },
832
+ { no: 4, name: "canonicalize_request", kind: "message", T: OutboundMessage_CanonicalizeRequest, oneof: "message" },
833
+ { no: 5, name: "import_request", kind: "message", T: OutboundMessage_ImportRequest, oneof: "message" },
834
+ { no: 6, name: "file_import_request", kind: "message", T: OutboundMessage_FileImportRequest, oneof: "message" },
835
+ { no: 7, name: "function_call_request", kind: "message", T: OutboundMessage_FunctionCallRequest, oneof: "message" },
836
+ { no: 8, name: "version_response", kind: "message", T: OutboundMessage_VersionResponse, oneof: "message" },
837
+ ]);
838
+ /**
839
+ * A response that contains the version of the embedded compiler.
840
+ *
841
+ * @generated from message sass.embedded_protocol.OutboundMessage.VersionResponse
842
+ */
843
+ class OutboundMessage_VersionResponse extends protobuf_1.Message {
844
+ constructor(data) {
845
+ super();
846
+ /**
847
+ * This version request's id. Mandatory.
848
+ *
849
+ * @generated from field: uint32 id = 5;
850
+ */
851
+ this.id = 0;
852
+ /**
853
+ * The version of the embedded protocol, in semver format.
854
+ *
855
+ * @generated from field: string protocol_version = 1;
856
+ */
857
+ this.protocolVersion = "";
858
+ /**
859
+ * The version of the embedded compiler package. This has no guaranteed
860
+ * format, although compilers are encouraged to use semver.
861
+ *
862
+ * @generated from field: string compiler_version = 2;
863
+ */
864
+ this.compilerVersion = "";
865
+ /**
866
+ * The version of the Sass implementation that the embedded compiler wraps.
867
+ * This has no guaranteed format, although Sass implementations are
868
+ * encouraged to use semver.
869
+ *
870
+ * @generated from field: string implementation_version = 3;
871
+ */
872
+ this.implementationVersion = "";
873
+ /**
874
+ * The name of the Sass implementation that the embedded compiler wraps.
875
+ *
876
+ * @generated from field: string implementation_name = 4;
877
+ */
878
+ this.implementationName = "";
879
+ protobuf_1.proto3.util.initPartial(data, this);
880
+ }
881
+ static fromBinary(bytes, options) {
882
+ return new OutboundMessage_VersionResponse().fromBinary(bytes, options);
883
+ }
884
+ static fromJson(jsonValue, options) {
885
+ return new OutboundMessage_VersionResponse().fromJson(jsonValue, options);
886
+ }
887
+ static fromJsonString(jsonString, options) {
888
+ return new OutboundMessage_VersionResponse().fromJsonString(jsonString, options);
889
+ }
890
+ static equals(a, b) {
891
+ return protobuf_1.proto3.util.equals(OutboundMessage_VersionResponse, a, b);
892
+ }
893
+ }
894
+ exports.OutboundMessage_VersionResponse = OutboundMessage_VersionResponse;
895
+ OutboundMessage_VersionResponse.runtime = protobuf_1.proto3;
896
+ OutboundMessage_VersionResponse.typeName = "sass.embedded_protocol.OutboundMessage.VersionResponse";
897
+ OutboundMessage_VersionResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
898
+ { no: 5, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
899
+ { no: 1, name: "protocol_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
900
+ { no: 2, name: "compiler_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
901
+ { no: 3, name: "implementation_version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
902
+ { no: 4, name: "implementation_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
903
+ ]);
904
+ /**
905
+ * A response that contains the result of a compilation.
906
+ *
907
+ * @generated from message sass.embedded_protocol.OutboundMessage.CompileResponse
908
+ */
909
+ class OutboundMessage_CompileResponse extends protobuf_1.Message {
910
+ constructor(data) {
911
+ super();
912
+ /**
913
+ * The compilation's request id. Mandatory.
914
+ *
915
+ * @generated from field: uint32 id = 1;
916
+ */
917
+ this.id = 0;
918
+ /**
919
+ * The success or failure result of the compilation. Mandatory.
920
+ *
921
+ * @generated from oneof sass.embedded_protocol.OutboundMessage.CompileResponse.result
922
+ */
923
+ this.result = { case: undefined };
924
+ protobuf_1.proto3.util.initPartial(data, this);
925
+ }
926
+ static fromBinary(bytes, options) {
927
+ return new OutboundMessage_CompileResponse().fromBinary(bytes, options);
928
+ }
929
+ static fromJson(jsonValue, options) {
930
+ return new OutboundMessage_CompileResponse().fromJson(jsonValue, options);
931
+ }
932
+ static fromJsonString(jsonString, options) {
933
+ return new OutboundMessage_CompileResponse().fromJsonString(jsonString, options);
934
+ }
935
+ static equals(a, b) {
936
+ return protobuf_1.proto3.util.equals(OutboundMessage_CompileResponse, a, b);
937
+ }
938
+ }
939
+ exports.OutboundMessage_CompileResponse = OutboundMessage_CompileResponse;
940
+ OutboundMessage_CompileResponse.runtime = protobuf_1.proto3;
941
+ OutboundMessage_CompileResponse.typeName = "sass.embedded_protocol.OutboundMessage.CompileResponse";
942
+ OutboundMessage_CompileResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
943
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
944
+ { no: 2, name: "success", kind: "message", T: OutboundMessage_CompileResponse_CompileSuccess, oneof: "result" },
945
+ { no: 3, name: "failure", kind: "message", T: OutboundMessage_CompileResponse_CompileFailure, oneof: "result" },
946
+ ]);
947
+ /**
948
+ * A message indicating that the Sass file was successfully compiled to CSS.
949
+ *
950
+ * @generated from message sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccess
951
+ */
952
+ class OutboundMessage_CompileResponse_CompileSuccess extends protobuf_1.Message {
953
+ constructor(data) {
954
+ super();
955
+ /**
956
+ * The compiled CSS.
957
+ *
958
+ * @generated from field: string css = 1;
959
+ */
960
+ this.css = "";
961
+ /**
962
+ * The JSON-encoded source map, or the empty string if
963
+ * `CompileRequest.source_map` was `false`.
964
+ *
965
+ * The compiler must not add a `"file"` key to this source map. It's the
966
+ * host's (or the host's user's) responsibility to determine how the
967
+ * generated CSS can be reached from the source map.
968
+ *
969
+ * @generated from field: string source_map = 2;
970
+ */
971
+ this.sourceMap = "";
972
+ /**
973
+ * The canonical URLs of all source files loaded during the compilation.
974
+ *
975
+ * The compiler must ensure that each canonical URL appears only once in
976
+ * this list. This must include the entrypoint file's URL if either
977
+ * `CompileRequest.input.path` or `CompileRequest.StringInput.url` was
978
+ * passed.
979
+ *
980
+ * @generated from field: repeated string loaded_urls = 3;
981
+ */
982
+ this.loadedUrls = [];
983
+ protobuf_1.proto3.util.initPartial(data, this);
984
+ }
985
+ static fromBinary(bytes, options) {
986
+ return new OutboundMessage_CompileResponse_CompileSuccess().fromBinary(bytes, options);
987
+ }
988
+ static fromJson(jsonValue, options) {
989
+ return new OutboundMessage_CompileResponse_CompileSuccess().fromJson(jsonValue, options);
990
+ }
991
+ static fromJsonString(jsonString, options) {
992
+ return new OutboundMessage_CompileResponse_CompileSuccess().fromJsonString(jsonString, options);
993
+ }
994
+ static equals(a, b) {
995
+ return protobuf_1.proto3.util.equals(OutboundMessage_CompileResponse_CompileSuccess, a, b);
996
+ }
997
+ }
998
+ exports.OutboundMessage_CompileResponse_CompileSuccess = OutboundMessage_CompileResponse_CompileSuccess;
999
+ OutboundMessage_CompileResponse_CompileSuccess.runtime = protobuf_1.proto3;
1000
+ OutboundMessage_CompileResponse_CompileSuccess.typeName = "sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccess";
1001
+ OutboundMessage_CompileResponse_CompileSuccess.fields = protobuf_1.proto3.util.newFieldList(() => [
1002
+ { no: 1, name: "css", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1003
+ { no: 2, name: "source_map", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1004
+ { no: 3, name: "loaded_urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1005
+ ]);
1006
+ /**
1007
+ * A message indicating that the Sass file could not be successfully
1008
+ * compiled to CSS.
1009
+ *
1010
+ * @generated from message sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailure
1011
+ */
1012
+ class OutboundMessage_CompileResponse_CompileFailure extends protobuf_1.Message {
1013
+ constructor(data) {
1014
+ super();
1015
+ /**
1016
+ * A message describing the reason for the failure.
1017
+ *
1018
+ * @generated from field: string message = 1;
1019
+ */
1020
+ this.message = "";
1021
+ /**
1022
+ * The stack trace associated with the failure.
1023
+ *
1024
+ * The empty string indicates that no stack trace is available. Otherwise,
1025
+ * the format of this stack trace is not specified and is likely to be
1026
+ * inconsistent between implementations.
1027
+ *
1028
+ * @generated from field: string stack_trace = 3;
1029
+ */
1030
+ this.stackTrace = "";
1031
+ /**
1032
+ * A formatted, human-readable string that contains the message, span
1033
+ * (if available), and trace (if available). The format of this string is
1034
+ * not specified and is likely to be inconsistent between implementations.
1035
+ *
1036
+ * @generated from field: string formatted = 4;
1037
+ */
1038
+ this.formatted = "";
1039
+ protobuf_1.proto3.util.initPartial(data, this);
1040
+ }
1041
+ static fromBinary(bytes, options) {
1042
+ return new OutboundMessage_CompileResponse_CompileFailure().fromBinary(bytes, options);
1043
+ }
1044
+ static fromJson(jsonValue, options) {
1045
+ return new OutboundMessage_CompileResponse_CompileFailure().fromJson(jsonValue, options);
1046
+ }
1047
+ static fromJsonString(jsonString, options) {
1048
+ return new OutboundMessage_CompileResponse_CompileFailure().fromJsonString(jsonString, options);
1049
+ }
1050
+ static equals(a, b) {
1051
+ return protobuf_1.proto3.util.equals(OutboundMessage_CompileResponse_CompileFailure, a, b);
1052
+ }
1053
+ }
1054
+ exports.OutboundMessage_CompileResponse_CompileFailure = OutboundMessage_CompileResponse_CompileFailure;
1055
+ OutboundMessage_CompileResponse_CompileFailure.runtime = protobuf_1.proto3;
1056
+ OutboundMessage_CompileResponse_CompileFailure.typeName = "sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailure";
1057
+ OutboundMessage_CompileResponse_CompileFailure.fields = protobuf_1.proto3.util.newFieldList(() => [
1058
+ { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1059
+ { no: 2, name: "span", kind: "message", T: SourceSpan },
1060
+ { no: 3, name: "stack_trace", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1061
+ { no: 4, name: "formatted", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1062
+ ]);
1063
+ /**
1064
+ * An event indicating that a message should be displayed to the user.
1065
+ *
1066
+ * @generated from message sass.embedded_protocol.OutboundMessage.LogEvent
1067
+ */
1068
+ class OutboundMessage_LogEvent extends protobuf_1.Message {
1069
+ constructor(data) {
1070
+ super();
1071
+ /**
1072
+ * The request id for the compilation that triggered the message. Mandatory.
1073
+ *
1074
+ * @generated from field: uint32 compilation_id = 1;
1075
+ */
1076
+ this.compilationId = 0;
1077
+ /**
1078
+ * @generated from field: sass.embedded_protocol.LogEventType type = 2;
1079
+ */
1080
+ this.type = LogEventType.WARNING;
1081
+ /**
1082
+ * The text of the message.
1083
+ *
1084
+ * @generated from field: string message = 3;
1085
+ */
1086
+ this.message = "";
1087
+ /**
1088
+ * The stack trace associated with this message.
1089
+ *
1090
+ * The empty string indicates that no stack trace is available. Otherwise,
1091
+ * the format of this stack trace is not specified and is likely to be
1092
+ * inconsistent between implementations.
1093
+ *
1094
+ * @generated from field: string stack_trace = 5;
1095
+ */
1096
+ this.stackTrace = "";
1097
+ /**
1098
+ * A formatted, human-readable string that contains the message, span (if
1099
+ * available), and trace (if available). The format of this string is not
1100
+ * specified and is likely to be inconsistent between implementations.
1101
+ *
1102
+ * @generated from field: string formatted = 6;
1103
+ */
1104
+ this.formatted = "";
1105
+ protobuf_1.proto3.util.initPartial(data, this);
1106
+ }
1107
+ static fromBinary(bytes, options) {
1108
+ return new OutboundMessage_LogEvent().fromBinary(bytes, options);
1109
+ }
1110
+ static fromJson(jsonValue, options) {
1111
+ return new OutboundMessage_LogEvent().fromJson(jsonValue, options);
1112
+ }
1113
+ static fromJsonString(jsonString, options) {
1114
+ return new OutboundMessage_LogEvent().fromJsonString(jsonString, options);
1115
+ }
1116
+ static equals(a, b) {
1117
+ return protobuf_1.proto3.util.equals(OutboundMessage_LogEvent, a, b);
1118
+ }
1119
+ }
1120
+ exports.OutboundMessage_LogEvent = OutboundMessage_LogEvent;
1121
+ OutboundMessage_LogEvent.runtime = protobuf_1.proto3;
1122
+ OutboundMessage_LogEvent.typeName = "sass.embedded_protocol.OutboundMessage.LogEvent";
1123
+ OutboundMessage_LogEvent.fields = protobuf_1.proto3.util.newFieldList(() => [
1124
+ { no: 1, name: "compilation_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1125
+ { no: 2, name: "type", kind: "enum", T: protobuf_1.proto3.getEnumType(LogEventType) },
1126
+ { no: 3, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1127
+ { no: 4, name: "span", kind: "message", T: SourceSpan },
1128
+ { no: 5, name: "stack_trace", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1129
+ { no: 6, name: "formatted", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1130
+ ]);
1131
+ /**
1132
+ * A request for a custom importer to convert an imported URL to its canonical
1133
+ * format.
1134
+ *
1135
+ * If the URL is not recognized by this importer, or if no stylesheet is found
1136
+ * at that URL, `CanonicalizeResponse.result` must be `null`. Otherwise, the
1137
+ * importer must return an absolute URL, including a scheme.
1138
+ *
1139
+ * > The host's documentation should encourage the use of file importers (via
1140
+ * > `CompileRequest.Importer.file_importer_id`, `FileImportRequest`, and
1141
+ * > `FileImportResponse`) for any importers that simply refer to files on
1142
+ * > disk. This will allow Sass to handle the logic of resolving partials,
1143
+ * > file extensions, and index files.
1144
+ *
1145
+ * If Sass has already loaded a stylesheet with the returned canonical URL, it
1146
+ * re-uses the existing parse tree. This means that importers must ensure that
1147
+ * the same canonical URL always refers to the same stylesheet, *even across
1148
+ * different importers*. Importers must also ensure that any canonicalized
1149
+ * URLs they return can be passed back to `CanonicalizeRequest` and will be
1150
+ * returned unchanged.
1151
+ *
1152
+ * If this importer's URL format supports file extensions, it should
1153
+ * canonicalize them the same way as the default filesystem importer:
1154
+ *
1155
+ * * The importer should look for stylesheets by adding the prefix `_` to the
1156
+ * URL's basename, and by adding the extensions `.sass` and `.scss` if the
1157
+ * URL doesn't already have one of those extensions. For example, if the URL
1158
+ * was `foo/bar/baz`, the importer would look for:
1159
+ *
1160
+ * * `foo/bar/baz.sass`
1161
+ * * `foo/bar/baz.scss`
1162
+ * * `foo/bar/_baz.sass`
1163
+ * * `foo/bar/_baz.scss`
1164
+ *
1165
+ * If the URL was foo/bar/baz.scss, the importer would just look for:
1166
+ *
1167
+ * * `foo/bar/baz.scss`
1168
+ * * `foo/bar/_baz.scss`
1169
+ *
1170
+ * If the importer finds a stylesheet at more than one of these URLs, it
1171
+ * should respond with a `CanonicalizeResponse.result.error` indicating that
1172
+ * the import is ambiguous. Note that if the extension is explicitly
1173
+ * specified, a stylesheet with another extension may exist without error.
1174
+ *
1175
+ * * If none of the possible paths is valid, the importer should perform the
1176
+ * same resolution on the URL followed by `/index`. In the example above, it
1177
+ * would look for:
1178
+ *
1179
+ * * `foo/bar/baz/_index.sass`
1180
+ * * `foo/bar/baz/index.sass`
1181
+ * * `foo/bar/baz/_index.scss`
1182
+ * * `foo/bar/baz/index.scss`
1183
+ *
1184
+ * As above, if the importer finds a stylesheet at more than one of these
1185
+ * URLs, it should respond with a `CanonicalizeResponse.result.error`
1186
+ * indicating that the import is ambiguous.
1187
+ *
1188
+ * @generated from message sass.embedded_protocol.OutboundMessage.CanonicalizeRequest
1189
+ */
1190
+ class OutboundMessage_CanonicalizeRequest extends protobuf_1.Message {
1191
+ constructor(data) {
1192
+ super();
1193
+ /**
1194
+ * @generated from field: uint32 id = 1;
1195
+ */
1196
+ this.id = 0;
1197
+ /**
1198
+ * The request id for the compilation that triggered the message. Mandatory.
1199
+ *
1200
+ * @generated from field: uint32 compilation_id = 2;
1201
+ */
1202
+ this.compilationId = 0;
1203
+ /**
1204
+ * The unique ID of the importer being invoked. This must match an importer
1205
+ * ID passed to this compilation in `CompileRequest.importers` or
1206
+ * `CompileRequest.input.string.importer`. Mandatory.
1207
+ *
1208
+ * @generated from field: uint32 importer_id = 3;
1209
+ */
1210
+ this.importerId = 0;
1211
+ /**
1212
+ * The URL of the import to be canonicalized. This may be either absolute or
1213
+ * relative.
1214
+ *
1215
+ * When loading a URL, the compiler must first try resolving that URL
1216
+ * relative to the canonical URL of the current file, and canonicalizing the
1217
+ * result using the importer that loaded the current file. If this returns
1218
+ * `null`, the compiler must then try canonicalizing the original URL with
1219
+ * each importer in order until one returns something other than `null`.
1220
+ * That is the result of the import.
1221
+ *
1222
+ * @generated from field: string url = 4;
1223
+ */
1224
+ this.url = "";
1225
+ /**
1226
+ * / Whether this request comes from an `@import` rule.
1227
+ * /
1228
+ * / When evaluating `@import` rules, URLs should canonicalize to an
1229
+ * / [import-only file] if one exists for the URL being canonicalized.
1230
+ * / Otherwise, canonicalization should be identical for `@import` and `@use`
1231
+ * / rules.
1232
+ * /
1233
+ * / [import-only file]: https://sass-lang.com/documentation/at-rules/import#import-only-files
1234
+ *
1235
+ * @generated from field: bool from_import = 5;
1236
+ */
1237
+ this.fromImport = false;
1238
+ protobuf_1.proto3.util.initPartial(data, this);
1239
+ }
1240
+ static fromBinary(bytes, options) {
1241
+ return new OutboundMessage_CanonicalizeRequest().fromBinary(bytes, options);
1242
+ }
1243
+ static fromJson(jsonValue, options) {
1244
+ return new OutboundMessage_CanonicalizeRequest().fromJson(jsonValue, options);
1245
+ }
1246
+ static fromJsonString(jsonString, options) {
1247
+ return new OutboundMessage_CanonicalizeRequest().fromJsonString(jsonString, options);
1248
+ }
1249
+ static equals(a, b) {
1250
+ return protobuf_1.proto3.util.equals(OutboundMessage_CanonicalizeRequest, a, b);
1251
+ }
1252
+ }
1253
+ exports.OutboundMessage_CanonicalizeRequest = OutboundMessage_CanonicalizeRequest;
1254
+ OutboundMessage_CanonicalizeRequest.runtime = protobuf_1.proto3;
1255
+ OutboundMessage_CanonicalizeRequest.typeName = "sass.embedded_protocol.OutboundMessage.CanonicalizeRequest";
1256
+ OutboundMessage_CanonicalizeRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
1257
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1258
+ { no: 2, name: "compilation_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1259
+ { no: 3, name: "importer_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1260
+ { no: 4, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1261
+ { no: 5, name: "from_import", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1262
+ ]);
1263
+ /**
1264
+ * A request for a custom importer to load the contents of a stylesheet.
1265
+ *
1266
+ * @generated from message sass.embedded_protocol.OutboundMessage.ImportRequest
1267
+ */
1268
+ class OutboundMessage_ImportRequest extends protobuf_1.Message {
1269
+ constructor(data) {
1270
+ super();
1271
+ /**
1272
+ * @generated from field: uint32 id = 1;
1273
+ */
1274
+ this.id = 0;
1275
+ /**
1276
+ * The request id for the compilation that triggered the message. Mandatory.
1277
+ *
1278
+ * @generated from field: uint32 compilation_id = 2;
1279
+ */
1280
+ this.compilationId = 0;
1281
+ /**
1282
+ * The unique ID of the importer being invoked. This must match an
1283
+ * `Importer.importer_id` passed to this compilation in
1284
+ * `CompileRequest.importers` or `CompileRequest.input.string.importer`.
1285
+ * Mandatory.
1286
+ *
1287
+ * @generated from field: uint32 importer_id = 3;
1288
+ */
1289
+ this.importerId = 0;
1290
+ /**
1291
+ * The canonical URL of the import. This is guaranteed to be a URL returned
1292
+ * by a `CanonicalizeRequest` to this importer.
1293
+ *
1294
+ * @generated from field: string url = 4;
1295
+ */
1296
+ this.url = "";
1297
+ protobuf_1.proto3.util.initPartial(data, this);
1298
+ }
1299
+ static fromBinary(bytes, options) {
1300
+ return new OutboundMessage_ImportRequest().fromBinary(bytes, options);
1301
+ }
1302
+ static fromJson(jsonValue, options) {
1303
+ return new OutboundMessage_ImportRequest().fromJson(jsonValue, options);
1304
+ }
1305
+ static fromJsonString(jsonString, options) {
1306
+ return new OutboundMessage_ImportRequest().fromJsonString(jsonString, options);
1307
+ }
1308
+ static equals(a, b) {
1309
+ return protobuf_1.proto3.util.equals(OutboundMessage_ImportRequest, a, b);
1310
+ }
1311
+ }
1312
+ exports.OutboundMessage_ImportRequest = OutboundMessage_ImportRequest;
1313
+ OutboundMessage_ImportRequest.runtime = protobuf_1.proto3;
1314
+ OutboundMessage_ImportRequest.typeName = "sass.embedded_protocol.OutboundMessage.ImportRequest";
1315
+ OutboundMessage_ImportRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
1316
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1317
+ { no: 2, name: "compilation_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1318
+ { no: 3, name: "importer_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1319
+ { no: 4, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1320
+ ]);
1321
+ /**
1322
+ * A request for a custom filesystem importer to load the contents of a
1323
+ * stylesheet.
1324
+ *
1325
+ * A filesystem importer is represented in the compiler as an [importer]. When
1326
+ * the importer is invoked with a string `string`:
1327
+ *
1328
+ * [importer]: https://github.com/sass/sass/tree/main/spec/modules.md#importer
1329
+ *
1330
+ * * If `string` is an absolute URL whose scheme is `file`:
1331
+ *
1332
+ * * Let `url` be string.
1333
+ *
1334
+ * * Otherwise:
1335
+ *
1336
+ * * Let `fromImport` be `true` if the importer is being run for an
1337
+ * `@import` and `false` otherwise.
1338
+ *
1339
+ * * Let `response` be the result of sending a `FileImportRequest` with
1340
+ * `string` as its `url` and `fromImport` as `from_import`.
1341
+ *
1342
+ * * If `response.result` is null, return null.
1343
+ *
1344
+ * * Otherwise, if `response.result.error` is set, throw an error.
1345
+ *
1346
+ * * Otherwise, let `url` be `response.result.file_url`.
1347
+ *
1348
+ * * Let `resolved` be the result of [resolving `url`].
1349
+ *
1350
+ * * If `resolved` is null, return null.
1351
+ *
1352
+ * * Let `text` be the contents of the file at `resolved`.
1353
+ *
1354
+ * * Let `syntax` be:
1355
+ * * "scss" if `url` ends in `.scss`.
1356
+ * * "indented" if `url` ends in `.sass`.
1357
+ * * "css" if `url` ends in `.css`.
1358
+ *
1359
+ * > The algorithm for resolving a `file:` URL guarantees that `url` will have
1360
+ * > one of these extensions.
1361
+ *
1362
+ * * Return `text`, `syntax`, and `resolved`.
1363
+ *
1364
+ * [resolving `url`]: https://github.com/sass/sass/tree/main/spec/modules.md#resolving-a-file-url
1365
+ *
1366
+ * @generated from message sass.embedded_protocol.OutboundMessage.FileImportRequest
1367
+ */
1368
+ class OutboundMessage_FileImportRequest extends protobuf_1.Message {
1369
+ constructor(data) {
1370
+ super();
1371
+ /**
1372
+ * @generated from field: uint32 id = 1;
1373
+ */
1374
+ this.id = 0;
1375
+ /**
1376
+ * The request id for the compilation that triggered the message. Mandatory.
1377
+ *
1378
+ * @generated from field: uint32 compilation_id = 2;
1379
+ */
1380
+ this.compilationId = 0;
1381
+ /**
1382
+ * The unique ID of the importer being invoked. This must match an
1383
+ * `Importer.file_importer_id` passed to this compilation in
1384
+ * `CompileRequest.importers` or `CompileRequest.input.string.importer`.
1385
+ * Mandatory.
1386
+ *
1387
+ * @generated from field: uint32 importer_id = 3;
1388
+ */
1389
+ this.importerId = 0;
1390
+ /**
1391
+ * The (non-canonicalized) URL of the import.
1392
+ *
1393
+ * @generated from field: string url = 4;
1394
+ */
1395
+ this.url = "";
1396
+ /**
1397
+ * / Whether this request comes from an `@import` rule.
1398
+ * /
1399
+ * / When evaluating `@import` rules, filesystem importers should load an
1400
+ * / [import-only file] if one exists for the URL being canonicalized.
1401
+ * / Otherwise, canonicalization should be identical for `@import` and `@use`
1402
+ * / rules.
1403
+ * /
1404
+ * / [import-only file]: https://sass-lang.com/documentation/at-rules/import#import-only-files
1405
+ *
1406
+ * @generated from field: bool from_import = 5;
1407
+ */
1408
+ this.fromImport = false;
1409
+ protobuf_1.proto3.util.initPartial(data, this);
1410
+ }
1411
+ static fromBinary(bytes, options) {
1412
+ return new OutboundMessage_FileImportRequest().fromBinary(bytes, options);
1413
+ }
1414
+ static fromJson(jsonValue, options) {
1415
+ return new OutboundMessage_FileImportRequest().fromJson(jsonValue, options);
1416
+ }
1417
+ static fromJsonString(jsonString, options) {
1418
+ return new OutboundMessage_FileImportRequest().fromJsonString(jsonString, options);
1419
+ }
1420
+ static equals(a, b) {
1421
+ return protobuf_1.proto3.util.equals(OutboundMessage_FileImportRequest, a, b);
1422
+ }
1423
+ }
1424
+ exports.OutboundMessage_FileImportRequest = OutboundMessage_FileImportRequest;
1425
+ OutboundMessage_FileImportRequest.runtime = protobuf_1.proto3;
1426
+ OutboundMessage_FileImportRequest.typeName = "sass.embedded_protocol.OutboundMessage.FileImportRequest";
1427
+ OutboundMessage_FileImportRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
1428
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1429
+ { no: 2, name: "compilation_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1430
+ { no: 3, name: "importer_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1431
+ { no: 4, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1432
+ { no: 5, name: "from_import", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1433
+ ]);
1434
+ /**
1435
+ * A request to invoke a custom Sass function and return its result.
1436
+ *
1437
+ * @generated from message sass.embedded_protocol.OutboundMessage.FunctionCallRequest
1438
+ */
1439
+ class OutboundMessage_FunctionCallRequest extends protobuf_1.Message {
1440
+ constructor(data) {
1441
+ super();
1442
+ /**
1443
+ * @generated from field: uint32 id = 1;
1444
+ */
1445
+ this.id = 0;
1446
+ /**
1447
+ * The request id for the compilation that triggered the message. Mandatory.
1448
+ *
1449
+ * @generated from field: uint32 compilation_id = 2;
1450
+ */
1451
+ this.compilationId = 0;
1452
+ /**
1453
+ * An identifier that indicates which function to invoke. Mandatory.
1454
+ *
1455
+ * @generated from oneof sass.embedded_protocol.OutboundMessage.FunctionCallRequest.identifier
1456
+ */
1457
+ this.identifier = { case: undefined };
1458
+ /**
1459
+ * The arguments passed to the function, in the order they appear in the
1460
+ * function signature passed to `CompileRequest.global_functions`. Mandatory.
1461
+ *
1462
+ * The compiler must ensure that a valid number of arguments are passed for
1463
+ * the given signature, that default argument values are instantiated
1464
+ * appropriately, and that variable argument lists (`$args...`) are passed
1465
+ * as `Value.ArgumentList`s.
1466
+ *
1467
+ * @generated from field: repeated sass.embedded_protocol.Value arguments = 5;
1468
+ */
1469
+ this.arguments = [];
1470
+ protobuf_1.proto3.util.initPartial(data, this);
1471
+ }
1472
+ static fromBinary(bytes, options) {
1473
+ return new OutboundMessage_FunctionCallRequest().fromBinary(bytes, options);
1474
+ }
1475
+ static fromJson(jsonValue, options) {
1476
+ return new OutboundMessage_FunctionCallRequest().fromJson(jsonValue, options);
1477
+ }
1478
+ static fromJsonString(jsonString, options) {
1479
+ return new OutboundMessage_FunctionCallRequest().fromJsonString(jsonString, options);
1480
+ }
1481
+ static equals(a, b) {
1482
+ return protobuf_1.proto3.util.equals(OutboundMessage_FunctionCallRequest, a, b);
1483
+ }
1484
+ }
1485
+ exports.OutboundMessage_FunctionCallRequest = OutboundMessage_FunctionCallRequest;
1486
+ OutboundMessage_FunctionCallRequest.runtime = protobuf_1.proto3;
1487
+ OutboundMessage_FunctionCallRequest.typeName = "sass.embedded_protocol.OutboundMessage.FunctionCallRequest";
1488
+ OutboundMessage_FunctionCallRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
1489
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1490
+ { no: 2, name: "compilation_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1491
+ { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "identifier" },
1492
+ { no: 4, name: "function_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */, oneof: "identifier" },
1493
+ { no: 5, name: "arguments", kind: "message", T: Value, repeated: true },
1494
+ ]);
1495
+ /**
1496
+ * An error reported when an endpoint violates the embedded Sass protocol.
1497
+ *
1498
+ * @generated from message sass.embedded_protocol.ProtocolError
1499
+ */
1500
+ class ProtocolError extends protobuf_1.Message {
1501
+ constructor(data) {
1502
+ super();
1503
+ /**
1504
+ * @generated from field: sass.embedded_protocol.ProtocolErrorType type = 1;
1505
+ */
1506
+ this.type = ProtocolErrorType.PARSE;
1507
+ /**
1508
+ * The ID of the request that had an error. This MUST be `4294967295` if the
1509
+ * request ID couldn't be determined, or if the error is being reported for a
1510
+ * response or an event.
1511
+ *
1512
+ * @generated from field: uint32 id = 2;
1513
+ */
1514
+ this.id = 0;
1515
+ /**
1516
+ * A human-readable message providing more detail about the error.
1517
+ *
1518
+ * @generated from field: string message = 3;
1519
+ */
1520
+ this.message = "";
1521
+ protobuf_1.proto3.util.initPartial(data, this);
1522
+ }
1523
+ static fromBinary(bytes, options) {
1524
+ return new ProtocolError().fromBinary(bytes, options);
1525
+ }
1526
+ static fromJson(jsonValue, options) {
1527
+ return new ProtocolError().fromJson(jsonValue, options);
1528
+ }
1529
+ static fromJsonString(jsonString, options) {
1530
+ return new ProtocolError().fromJsonString(jsonString, options);
1531
+ }
1532
+ static equals(a, b) {
1533
+ return protobuf_1.proto3.util.equals(ProtocolError, a, b);
1534
+ }
1535
+ }
1536
+ exports.ProtocolError = ProtocolError;
1537
+ ProtocolError.runtime = protobuf_1.proto3;
1538
+ ProtocolError.typeName = "sass.embedded_protocol.ProtocolError";
1539
+ ProtocolError.fields = protobuf_1.proto3.util.newFieldList(() => [
1540
+ { no: 1, name: "type", kind: "enum", T: protobuf_1.proto3.getEnumType(ProtocolErrorType) },
1541
+ { no: 2, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1542
+ { no: 3, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1543
+ ]);
1544
+ /**
1545
+ * A chunk of a source file.
1546
+ *
1547
+ * @generated from message sass.embedded_protocol.SourceSpan
1548
+ */
1549
+ class SourceSpan extends protobuf_1.Message {
1550
+ constructor(data) {
1551
+ super();
1552
+ /**
1553
+ * The text covered by the source span. Compilers must guarantee that this is
1554
+ * the text between `start.offset` and `end.offset` in the source file
1555
+ * referred to by `url`.
1556
+ *
1557
+ * @generated from field: string text = 1;
1558
+ */
1559
+ this.text = "";
1560
+ /**
1561
+ * The URL of the file to which this span refers.
1562
+ *
1563
+ * This may be empty, indicating that the span refers to a
1564
+ * `CompileRequest.StringInput` file that doesn't specify a URL.
1565
+ *
1566
+ * @generated from field: string url = 4;
1567
+ */
1568
+ this.url = "";
1569
+ /**
1570
+ * Additional source text surrounding this span.
1571
+ *
1572
+ * If this isn't empty, it must contain `text`. Furthermore, `text` must begin
1573
+ * at column `start.column` of a line in `context`.
1574
+ *
1575
+ * This usually contains the full lines the span begins and ends on if the
1576
+ * span itself doesn't cover the full lines.
1577
+ *
1578
+ * @generated from field: string context = 5;
1579
+ */
1580
+ this.context = "";
1581
+ protobuf_1.proto3.util.initPartial(data, this);
1582
+ }
1583
+ static fromBinary(bytes, options) {
1584
+ return new SourceSpan().fromBinary(bytes, options);
1585
+ }
1586
+ static fromJson(jsonValue, options) {
1587
+ return new SourceSpan().fromJson(jsonValue, options);
1588
+ }
1589
+ static fromJsonString(jsonString, options) {
1590
+ return new SourceSpan().fromJsonString(jsonString, options);
1591
+ }
1592
+ static equals(a, b) {
1593
+ return protobuf_1.proto3.util.equals(SourceSpan, a, b);
1594
+ }
1595
+ }
1596
+ exports.SourceSpan = SourceSpan;
1597
+ SourceSpan.runtime = protobuf_1.proto3;
1598
+ SourceSpan.typeName = "sass.embedded_protocol.SourceSpan";
1599
+ SourceSpan.fields = protobuf_1.proto3.util.newFieldList(() => [
1600
+ { no: 1, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1601
+ { no: 2, name: "start", kind: "message", T: SourceSpan_SourceLocation },
1602
+ { no: 3, name: "end", kind: "message", T: SourceSpan_SourceLocation },
1603
+ { no: 4, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1604
+ { no: 5, name: "context", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1605
+ ]);
1606
+ /**
1607
+ * A single point in a source file.
1608
+ *
1609
+ * @generated from message sass.embedded_protocol.SourceSpan.SourceLocation
1610
+ */
1611
+ class SourceSpan_SourceLocation extends protobuf_1.Message {
1612
+ constructor(data) {
1613
+ super();
1614
+ /**
1615
+ * The 0-based offset of this location within the source file. Mandatory.
1616
+ *
1617
+ * @generated from field: uint32 offset = 1;
1618
+ */
1619
+ this.offset = 0;
1620
+ /**
1621
+ * The 0-based line number of this location within the source file.
1622
+ * Mandatory.
1623
+ *
1624
+ * @generated from field: uint32 line = 2;
1625
+ */
1626
+ this.line = 0;
1627
+ /**
1628
+ * The 0-based column number of this location within its line. Mandatory.
1629
+ *
1630
+ * @generated from field: uint32 column = 3;
1631
+ */
1632
+ this.column = 0;
1633
+ protobuf_1.proto3.util.initPartial(data, this);
1634
+ }
1635
+ static fromBinary(bytes, options) {
1636
+ return new SourceSpan_SourceLocation().fromBinary(bytes, options);
1637
+ }
1638
+ static fromJson(jsonValue, options) {
1639
+ return new SourceSpan_SourceLocation().fromJson(jsonValue, options);
1640
+ }
1641
+ static fromJsonString(jsonString, options) {
1642
+ return new SourceSpan_SourceLocation().fromJsonString(jsonString, options);
1643
+ }
1644
+ static equals(a, b) {
1645
+ return protobuf_1.proto3.util.equals(SourceSpan_SourceLocation, a, b);
1646
+ }
1647
+ }
1648
+ exports.SourceSpan_SourceLocation = SourceSpan_SourceLocation;
1649
+ SourceSpan_SourceLocation.runtime = protobuf_1.proto3;
1650
+ SourceSpan_SourceLocation.typeName = "sass.embedded_protocol.SourceSpan.SourceLocation";
1651
+ SourceSpan_SourceLocation.fields = protobuf_1.proto3.util.newFieldList(() => [
1652
+ { no: 1, name: "offset", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1653
+ { no: 2, name: "line", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1654
+ { no: 3, name: "column", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1655
+ ]);
1656
+ /**
1657
+ * A SassScript value, passed to and returned by functions.
1658
+ *
1659
+ * @generated from message sass.embedded_protocol.Value
1660
+ */
1661
+ class Value extends protobuf_1.Message {
1662
+ constructor(data) {
1663
+ super();
1664
+ /**
1665
+ * The value itself. Mandatory.
1666
+ *
1667
+ * This is wrapped in a message type rather than used directly to reduce
1668
+ * repetition, and because oneofs can't be repeated.
1669
+ *
1670
+ * @generated from oneof sass.embedded_protocol.Value.value
1671
+ */
1672
+ this.value = { case: undefined };
1673
+ protobuf_1.proto3.util.initPartial(data, this);
1674
+ }
1675
+ static fromBinary(bytes, options) {
1676
+ return new Value().fromBinary(bytes, options);
1677
+ }
1678
+ static fromJson(jsonValue, options) {
1679
+ return new Value().fromJson(jsonValue, options);
1680
+ }
1681
+ static fromJsonString(jsonString, options) {
1682
+ return new Value().fromJsonString(jsonString, options);
1683
+ }
1684
+ static equals(a, b) {
1685
+ return protobuf_1.proto3.util.equals(Value, a, b);
1686
+ }
1687
+ }
1688
+ exports.Value = Value;
1689
+ Value.runtime = protobuf_1.proto3;
1690
+ Value.typeName = "sass.embedded_protocol.Value";
1691
+ Value.fields = protobuf_1.proto3.util.newFieldList(() => [
1692
+ { no: 1, name: "string", kind: "message", T: Value_String, oneof: "value" },
1693
+ { no: 2, name: "number", kind: "message", T: Value_Number, oneof: "value" },
1694
+ { no: 3, name: "rgb_color", kind: "message", T: Value_RgbColor, oneof: "value" },
1695
+ { no: 4, name: "hsl_color", kind: "message", T: Value_HslColor, oneof: "value" },
1696
+ { no: 5, name: "list", kind: "message", T: Value_List, oneof: "value" },
1697
+ { no: 6, name: "map", kind: "message", T: Value_Map, oneof: "value" },
1698
+ { no: 7, name: "singleton", kind: "enum", T: protobuf_1.proto3.getEnumType(SingletonValue), oneof: "value" },
1699
+ { no: 8, name: "compiler_function", kind: "message", T: Value_CompilerFunction, oneof: "value" },
1700
+ { no: 9, name: "host_function", kind: "message", T: Value_HostFunction, oneof: "value" },
1701
+ { no: 10, name: "argument_list", kind: "message", T: Value_ArgumentList, oneof: "value" },
1702
+ { no: 11, name: "hwb_color", kind: "message", T: Value_HwbColor, oneof: "value" },
1703
+ { no: 12, name: "calculation", kind: "message", T: Value_Calculation, oneof: "value" },
1704
+ ]);
1705
+ /**
1706
+ * A SassScript string value.
1707
+ *
1708
+ * @generated from message sass.embedded_protocol.Value.String
1709
+ */
1710
+ class Value_String extends protobuf_1.Message {
1711
+ constructor(data) {
1712
+ super();
1713
+ /**
1714
+ * The contents of the string. Mandatory.
1715
+ *
1716
+ * @generated from field: string text = 1;
1717
+ */
1718
+ this.text = "";
1719
+ /**
1720
+ * Whether the string is quoted or unquoted. Mandatory.
1721
+ *
1722
+ * @generated from field: bool quoted = 2;
1723
+ */
1724
+ this.quoted = false;
1725
+ protobuf_1.proto3.util.initPartial(data, this);
1726
+ }
1727
+ static fromBinary(bytes, options) {
1728
+ return new Value_String().fromBinary(bytes, options);
1729
+ }
1730
+ static fromJson(jsonValue, options) {
1731
+ return new Value_String().fromJson(jsonValue, options);
1732
+ }
1733
+ static fromJsonString(jsonString, options) {
1734
+ return new Value_String().fromJsonString(jsonString, options);
1735
+ }
1736
+ static equals(a, b) {
1737
+ return protobuf_1.proto3.util.equals(Value_String, a, b);
1738
+ }
1739
+ }
1740
+ exports.Value_String = Value_String;
1741
+ Value_String.runtime = protobuf_1.proto3;
1742
+ Value_String.typeName = "sass.embedded_protocol.Value.String";
1743
+ Value_String.fields = protobuf_1.proto3.util.newFieldList(() => [
1744
+ { no: 1, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1745
+ { no: 2, name: "quoted", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1746
+ ]);
1747
+ /**
1748
+ * A SassScript number value.
1749
+ *
1750
+ * @generated from message sass.embedded_protocol.Value.Number
1751
+ */
1752
+ class Value_Number extends protobuf_1.Message {
1753
+ constructor(data) {
1754
+ super();
1755
+ /**
1756
+ * The number's numeric value. Mandatory.
1757
+ *
1758
+ * @generated from field: double value = 1;
1759
+ */
1760
+ this.value = 0;
1761
+ /**
1762
+ * The number's numerator units.
1763
+ *
1764
+ * The endpoint sending the number must ensure that no numerator units are
1765
+ * [compatible][] with any denominator units. Such compatible units must be
1766
+ * simplified away according to the multiplicative factor between them
1767
+ * defined in the CSS Values and Units spec.
1768
+ *
1769
+ * [compatible]: https://www.w3.org/TR/css-values-4/#compat
1770
+ *
1771
+ * @generated from field: repeated string numerators = 2;
1772
+ */
1773
+ this.numerators = [];
1774
+ /**
1775
+ * The number's denominator units.
1776
+ *
1777
+ * @generated from field: repeated string denominators = 3;
1778
+ */
1779
+ this.denominators = [];
1780
+ protobuf_1.proto3.util.initPartial(data, this);
1781
+ }
1782
+ static fromBinary(bytes, options) {
1783
+ return new Value_Number().fromBinary(bytes, options);
1784
+ }
1785
+ static fromJson(jsonValue, options) {
1786
+ return new Value_Number().fromJson(jsonValue, options);
1787
+ }
1788
+ static fromJsonString(jsonString, options) {
1789
+ return new Value_Number().fromJsonString(jsonString, options);
1790
+ }
1791
+ static equals(a, b) {
1792
+ return protobuf_1.proto3.util.equals(Value_Number, a, b);
1793
+ }
1794
+ }
1795
+ exports.Value_Number = Value_Number;
1796
+ Value_Number.runtime = protobuf_1.proto3;
1797
+ Value_Number.typeName = "sass.embedded_protocol.Value.Number";
1798
+ Value_Number.fields = protobuf_1.proto3.util.newFieldList(() => [
1799
+ { no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1800
+ { no: 2, name: "numerators", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1801
+ { no: 3, name: "denominators", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1802
+ ]);
1803
+ /**
1804
+ * A SassScript color value, represented as red, green, and blue channels.
1805
+ *
1806
+ * All Sass color values can be equivalently represented as `RgbColor`,
1807
+ * `HslColor`, and `HwbColor` messages without loss of color information that
1808
+ * can affect CSS rendering. As such, either endpoint may choose to send any
1809
+ * color value as any one of these three messages.
1810
+ *
1811
+ * @generated from message sass.embedded_protocol.Value.RgbColor
1812
+ */
1813
+ class Value_RgbColor extends protobuf_1.Message {
1814
+ constructor(data) {
1815
+ super();
1816
+ /**
1817
+ * The color's red channel. Mandatory. May not be above 255.
1818
+ *
1819
+ * @generated from field: uint32 red = 1;
1820
+ */
1821
+ this.red = 0;
1822
+ /**
1823
+ * The color's green channel. Mandatory. May not be above 255.
1824
+ *
1825
+ * @generated from field: uint32 green = 2;
1826
+ */
1827
+ this.green = 0;
1828
+ /**
1829
+ * The color's blue channel. Mandatory. May not be above 255.
1830
+ *
1831
+ * @generated from field: uint32 blue = 3;
1832
+ */
1833
+ this.blue = 0;
1834
+ /**
1835
+ * The color's alpha channel. Mandatory. Must be between 0 and 1,
1836
+ * inclusive.
1837
+ *
1838
+ * @generated from field: double alpha = 4;
1839
+ */
1840
+ this.alpha = 0;
1841
+ protobuf_1.proto3.util.initPartial(data, this);
1842
+ }
1843
+ static fromBinary(bytes, options) {
1844
+ return new Value_RgbColor().fromBinary(bytes, options);
1845
+ }
1846
+ static fromJson(jsonValue, options) {
1847
+ return new Value_RgbColor().fromJson(jsonValue, options);
1848
+ }
1849
+ static fromJsonString(jsonString, options) {
1850
+ return new Value_RgbColor().fromJsonString(jsonString, options);
1851
+ }
1852
+ static equals(a, b) {
1853
+ return protobuf_1.proto3.util.equals(Value_RgbColor, a, b);
1854
+ }
1855
+ }
1856
+ exports.Value_RgbColor = Value_RgbColor;
1857
+ Value_RgbColor.runtime = protobuf_1.proto3;
1858
+ Value_RgbColor.typeName = "sass.embedded_protocol.Value.RgbColor";
1859
+ Value_RgbColor.fields = protobuf_1.proto3.util.newFieldList(() => [
1860
+ { no: 1, name: "red", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1861
+ { no: 2, name: "green", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1862
+ { no: 3, name: "blue", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1863
+ { no: 4, name: "alpha", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1864
+ ]);
1865
+ /**
1866
+ * A SassScript color value, represented as hue, saturation, and lightness channels.
1867
+ *
1868
+ * @generated from message sass.embedded_protocol.Value.HslColor
1869
+ */
1870
+ class Value_HslColor extends protobuf_1.Message {
1871
+ constructor(data) {
1872
+ super();
1873
+ /**
1874
+ * The color's hue. Mandatory.
1875
+ *
1876
+ * @generated from field: double hue = 1;
1877
+ */
1878
+ this.hue = 0;
1879
+ /**
1880
+ * The color's percent saturation. Mandatory. Must be between 0 and 100,
1881
+ * inclusive.
1882
+ *
1883
+ * @generated from field: double saturation = 2;
1884
+ */
1885
+ this.saturation = 0;
1886
+ /**
1887
+ * The color's percent lightness. Mandatory. Must be between 0 and 100,
1888
+ * inclusive.
1889
+ *
1890
+ * @generated from field: double lightness = 3;
1891
+ */
1892
+ this.lightness = 0;
1893
+ /**
1894
+ * The color's alpha channel. Mandatory. Must be between 0 and 1,
1895
+ * inclusive.
1896
+ *
1897
+ * @generated from field: double alpha = 4;
1898
+ */
1899
+ this.alpha = 0;
1900
+ protobuf_1.proto3.util.initPartial(data, this);
1901
+ }
1902
+ static fromBinary(bytes, options) {
1903
+ return new Value_HslColor().fromBinary(bytes, options);
1904
+ }
1905
+ static fromJson(jsonValue, options) {
1906
+ return new Value_HslColor().fromJson(jsonValue, options);
1907
+ }
1908
+ static fromJsonString(jsonString, options) {
1909
+ return new Value_HslColor().fromJsonString(jsonString, options);
1910
+ }
1911
+ static equals(a, b) {
1912
+ return protobuf_1.proto3.util.equals(Value_HslColor, a, b);
1913
+ }
1914
+ }
1915
+ exports.Value_HslColor = Value_HslColor;
1916
+ Value_HslColor.runtime = protobuf_1.proto3;
1917
+ Value_HslColor.typeName = "sass.embedded_protocol.Value.HslColor";
1918
+ Value_HslColor.fields = protobuf_1.proto3.util.newFieldList(() => [
1919
+ { no: 1, name: "hue", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1920
+ { no: 2, name: "saturation", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1921
+ { no: 3, name: "lightness", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1922
+ { no: 4, name: "alpha", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1923
+ ]);
1924
+ /**
1925
+ * A SassScript color value, represented as hue, whiteness, and blackness
1926
+ * channels.
1927
+ *
1928
+ * @generated from message sass.embedded_protocol.Value.HwbColor
1929
+ */
1930
+ class Value_HwbColor extends protobuf_1.Message {
1931
+ constructor(data) {
1932
+ super();
1933
+ /**
1934
+ * The color's hue. Mandatory.
1935
+ *
1936
+ * @generated from field: double hue = 1;
1937
+ */
1938
+ this.hue = 0;
1939
+ /**
1940
+ * The color's percent whiteness. Mandatory. Must be between 0 and 100,
1941
+ * inclusive. The sum of `whiteness` and `blackness` must not exceed 100.
1942
+ *
1943
+ * @generated from field: double whiteness = 2;
1944
+ */
1945
+ this.whiteness = 0;
1946
+ /**
1947
+ * The color's percent blackness. Mandatory. Must be between 0 and 100,
1948
+ * inclusive. The sum of `whiteness` and `blackness` must not exceed 100.
1949
+ *
1950
+ * @generated from field: double blackness = 3;
1951
+ */
1952
+ this.blackness = 0;
1953
+ /**
1954
+ * The color's alpha channel. Mandatory. Must be between 0 and 1,
1955
+ * inclusive.
1956
+ *
1957
+ * @generated from field: double alpha = 4;
1958
+ */
1959
+ this.alpha = 0;
1960
+ protobuf_1.proto3.util.initPartial(data, this);
1961
+ }
1962
+ static fromBinary(bytes, options) {
1963
+ return new Value_HwbColor().fromBinary(bytes, options);
1964
+ }
1965
+ static fromJson(jsonValue, options) {
1966
+ return new Value_HwbColor().fromJson(jsonValue, options);
1967
+ }
1968
+ static fromJsonString(jsonString, options) {
1969
+ return new Value_HwbColor().fromJsonString(jsonString, options);
1970
+ }
1971
+ static equals(a, b) {
1972
+ return protobuf_1.proto3.util.equals(Value_HwbColor, a, b);
1973
+ }
1974
+ }
1975
+ exports.Value_HwbColor = Value_HwbColor;
1976
+ Value_HwbColor.runtime = protobuf_1.proto3;
1977
+ Value_HwbColor.typeName = "sass.embedded_protocol.Value.HwbColor";
1978
+ Value_HwbColor.fields = protobuf_1.proto3.util.newFieldList(() => [
1979
+ { no: 1, name: "hue", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1980
+ { no: 2, name: "whiteness", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1981
+ { no: 3, name: "blackness", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1982
+ { no: 4, name: "alpha", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1983
+ ]);
1984
+ /**
1985
+ * A SassScript list value.
1986
+ *
1987
+ * @generated from message sass.embedded_protocol.Value.List
1988
+ */
1989
+ class Value_List extends protobuf_1.Message {
1990
+ constructor(data) {
1991
+ super();
1992
+ /**
1993
+ * The type of separator for this list. Mandatory.
1994
+ *
1995
+ * @generated from field: sass.embedded_protocol.ListSeparator separator = 1;
1996
+ */
1997
+ this.separator = ListSeparator.COMMA;
1998
+ /**
1999
+ * Whether this list has square brackets. Mandatory.
2000
+ *
2001
+ * @generated from field: bool has_brackets = 2;
2002
+ */
2003
+ this.hasBrackets = false;
2004
+ /**
2005
+ * The elements of this list.
2006
+ *
2007
+ * @generated from field: repeated sass.embedded_protocol.Value contents = 3;
2008
+ */
2009
+ this.contents = [];
2010
+ protobuf_1.proto3.util.initPartial(data, this);
2011
+ }
2012
+ static fromBinary(bytes, options) {
2013
+ return new Value_List().fromBinary(bytes, options);
2014
+ }
2015
+ static fromJson(jsonValue, options) {
2016
+ return new Value_List().fromJson(jsonValue, options);
2017
+ }
2018
+ static fromJsonString(jsonString, options) {
2019
+ return new Value_List().fromJsonString(jsonString, options);
2020
+ }
2021
+ static equals(a, b) {
2022
+ return protobuf_1.proto3.util.equals(Value_List, a, b);
2023
+ }
2024
+ }
2025
+ exports.Value_List = Value_List;
2026
+ Value_List.runtime = protobuf_1.proto3;
2027
+ Value_List.typeName = "sass.embedded_protocol.Value.List";
2028
+ Value_List.fields = protobuf_1.proto3.util.newFieldList(() => [
2029
+ { no: 1, name: "separator", kind: "enum", T: protobuf_1.proto3.getEnumType(ListSeparator) },
2030
+ { no: 2, name: "has_brackets", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
2031
+ { no: 3, name: "contents", kind: "message", T: Value, repeated: true },
2032
+ ]);
2033
+ /**
2034
+ * A SassScript map value.
2035
+ *
2036
+ * @generated from message sass.embedded_protocol.Value.Map
2037
+ */
2038
+ class Value_Map extends protobuf_1.Message {
2039
+ constructor(data) {
2040
+ super();
2041
+ /**
2042
+ * The entries in this map. The sending endpoint must guarantee that no two
2043
+ * entries have the same key.
2044
+ *
2045
+ * @generated from field: repeated sass.embedded_protocol.Value.Map.Entry entries = 1;
2046
+ */
2047
+ this.entries = [];
2048
+ protobuf_1.proto3.util.initPartial(data, this);
2049
+ }
2050
+ static fromBinary(bytes, options) {
2051
+ return new Value_Map().fromBinary(bytes, options);
2052
+ }
2053
+ static fromJson(jsonValue, options) {
2054
+ return new Value_Map().fromJson(jsonValue, options);
2055
+ }
2056
+ static fromJsonString(jsonString, options) {
2057
+ return new Value_Map().fromJsonString(jsonString, options);
2058
+ }
2059
+ static equals(a, b) {
2060
+ return protobuf_1.proto3.util.equals(Value_Map, a, b);
2061
+ }
2062
+ }
2063
+ exports.Value_Map = Value_Map;
2064
+ Value_Map.runtime = protobuf_1.proto3;
2065
+ Value_Map.typeName = "sass.embedded_protocol.Value.Map";
2066
+ Value_Map.fields = protobuf_1.proto3.util.newFieldList(() => [
2067
+ { no: 1, name: "entries", kind: "message", T: Value_Map_Entry, repeated: true },
2068
+ ]);
2069
+ /**
2070
+ * A single key/value pair in the map.
2071
+ *
2072
+ * @generated from message sass.embedded_protocol.Value.Map.Entry
2073
+ */
2074
+ class Value_Map_Entry extends protobuf_1.Message {
2075
+ constructor(data) {
2076
+ super();
2077
+ protobuf_1.proto3.util.initPartial(data, this);
2078
+ }
2079
+ static fromBinary(bytes, options) {
2080
+ return new Value_Map_Entry().fromBinary(bytes, options);
2081
+ }
2082
+ static fromJson(jsonValue, options) {
2083
+ return new Value_Map_Entry().fromJson(jsonValue, options);
2084
+ }
2085
+ static fromJsonString(jsonString, options) {
2086
+ return new Value_Map_Entry().fromJsonString(jsonString, options);
2087
+ }
2088
+ static equals(a, b) {
2089
+ return protobuf_1.proto3.util.equals(Value_Map_Entry, a, b);
2090
+ }
2091
+ }
2092
+ exports.Value_Map_Entry = Value_Map_Entry;
2093
+ Value_Map_Entry.runtime = protobuf_1.proto3;
2094
+ Value_Map_Entry.typeName = "sass.embedded_protocol.Value.Map.Entry";
2095
+ Value_Map_Entry.fields = protobuf_1.proto3.util.newFieldList(() => [
2096
+ { no: 1, name: "key", kind: "message", T: Value },
2097
+ { no: 2, name: "value", kind: "message", T: Value },
2098
+ ]);
2099
+ /**
2100
+ * A first-class function defined in the compiler. New `CompilerFunction`s may
2101
+ * only be created by the compiler, but the host may pass `CompilerFunction`s
2102
+ * back to the compiler as long as their IDs match IDs of functions received
2103
+ * by the host during that same compilation.
2104
+ *
2105
+ * @generated from message sass.embedded_protocol.Value.CompilerFunction
2106
+ */
2107
+ class Value_CompilerFunction extends protobuf_1.Message {
2108
+ constructor(data) {
2109
+ super();
2110
+ /**
2111
+ * A unique ID for this function. The compiler is responsible for generating
2112
+ * this ID and ensuring it's unique across all functions passed to the host
2113
+ * for this compilation. Mandatory.
2114
+ *
2115
+ * @generated from field: uint32 id = 1;
2116
+ */
2117
+ this.id = 0;
2118
+ protobuf_1.proto3.util.initPartial(data, this);
2119
+ }
2120
+ static fromBinary(bytes, options) {
2121
+ return new Value_CompilerFunction().fromBinary(bytes, options);
2122
+ }
2123
+ static fromJson(jsonValue, options) {
2124
+ return new Value_CompilerFunction().fromJson(jsonValue, options);
2125
+ }
2126
+ static fromJsonString(jsonString, options) {
2127
+ return new Value_CompilerFunction().fromJsonString(jsonString, options);
2128
+ }
2129
+ static equals(a, b) {
2130
+ return protobuf_1.proto3.util.equals(Value_CompilerFunction, a, b);
2131
+ }
2132
+ }
2133
+ exports.Value_CompilerFunction = Value_CompilerFunction;
2134
+ Value_CompilerFunction.runtime = protobuf_1.proto3;
2135
+ Value_CompilerFunction.typeName = "sass.embedded_protocol.Value.CompilerFunction";
2136
+ Value_CompilerFunction.fields = protobuf_1.proto3.util.newFieldList(() => [
2137
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
2138
+ ]);
2139
+ /**
2140
+ * An anonymous custom function defined in the host. New `HostFunction`s may
2141
+ * only be created by the host, and `HostFunction`s may *never* be passed from
2142
+ * the compiler to the host. The compiler must instead pass a
2143
+ * `CompilerFunction` that wraps the `HostFunction`.
2144
+ *
2145
+ * @generated from message sass.embedded_protocol.Value.HostFunction
2146
+ */
2147
+ class Value_HostFunction extends protobuf_1.Message {
2148
+ constructor(data) {
2149
+ super();
2150
+ /**
2151
+ * A unique ID for this function. The compiler must pass this ID as
2152
+ * `OutboundRequest.FunctionCallRequest.id` when invoking this function. The
2153
+ * host is responsible for generating this ID and ensuring it's unique
2154
+ * across all functions for *all* compilations. Mandatory.
2155
+ *
2156
+ * @generated from field: uint32 id = 1;
2157
+ */
2158
+ this.id = 0;
2159
+ /**
2160
+ * The signature for this function. Mandatory.
2161
+ *
2162
+ * If this isn't a valid Sass function signature that could appear after
2163
+ * `@function` in a Sass stylesheet (such as `mix($color1, $color2, $weight:
2164
+ * 50%)`), the compiler must treat it as though the function that returned
2165
+ * this `HostFunction` threw an error.
2166
+ *
2167
+ * > This ensures that the host doesn't need to be able to correctly parse
2168
+ * > the entire function declaration syntax.
2169
+ *
2170
+ * The compiler may not invoke the function by its name, since it's not
2171
+ * guaranteed to be globally unique. However, it may use the name to
2172
+ * generate the string representation of this function.
2173
+ *
2174
+ * @generated from field: string signature = 2;
2175
+ */
2176
+ this.signature = "";
2177
+ protobuf_1.proto3.util.initPartial(data, this);
2178
+ }
2179
+ static fromBinary(bytes, options) {
2180
+ return new Value_HostFunction().fromBinary(bytes, options);
2181
+ }
2182
+ static fromJson(jsonValue, options) {
2183
+ return new Value_HostFunction().fromJson(jsonValue, options);
2184
+ }
2185
+ static fromJsonString(jsonString, options) {
2186
+ return new Value_HostFunction().fromJsonString(jsonString, options);
2187
+ }
2188
+ static equals(a, b) {
2189
+ return protobuf_1.proto3.util.equals(Value_HostFunction, a, b);
2190
+ }
2191
+ }
2192
+ exports.Value_HostFunction = Value_HostFunction;
2193
+ Value_HostFunction.runtime = protobuf_1.proto3;
2194
+ Value_HostFunction.typeName = "sass.embedded_protocol.Value.HostFunction";
2195
+ Value_HostFunction.fields = protobuf_1.proto3.util.newFieldList(() => [
2196
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
2197
+ { no: 2, name: "signature", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2198
+ ]);
2199
+ /**
2200
+ * A SassScript argument list value. This represents rest arguments passed to
2201
+ * a function's `$arg...` parameter. Unlike a normal `List`, an argument list
2202
+ * has an associated keywords map which tracks keyword arguments passed in
2203
+ * alongside positional arguments.
2204
+ *
2205
+ * For each `ArgumentList` in `FunctionCallRequest.arguments` (including those
2206
+ * nested within `List`s and `Map`s), the host must track whether its keyword
2207
+ * arguments were accessed by the user. If they were, it must add its
2208
+ * `ArgumentList.id` to `FunctionCallResponse.accessed_argument_lists`.
2209
+ *
2210
+ * The compiler must treat every `ArgumentList` whose `ArgumentList.id`
2211
+ * appears in `FunctionCallResponse.accessed_argument_lists` as though it had
2212
+ * been passed to `meta.keywords()`.
2213
+ *
2214
+ * @generated from message sass.embedded_protocol.Value.ArgumentList
2215
+ */
2216
+ class Value_ArgumentList extends protobuf_1.Message {
2217
+ constructor(data) {
2218
+ super();
2219
+ /**
2220
+ * An ID for this argument list that's unique within the scope of a given
2221
+ * `FunctionCallRequest`.
2222
+ *
2223
+ * The special ID `0` is reserved for `ArgumentList`s created by the host,
2224
+ * and may not be used by the compiler. These `ArgumentList`s do not need to
2225
+ * have their IDs added to `FunctionCallResponse.accessed_argument_lists`,
2226
+ * and the compiler should treat them as though their keywords have always
2227
+ * been accessed.
2228
+ *
2229
+ * @generated from field: uint32 id = 1;
2230
+ */
2231
+ this.id = 0;
2232
+ /**
2233
+ * The type of separator for this list. The compiler must set this, but
2234
+ * the host may omit it for `ArgumentList`s that were originally created by
2235
+ * the compiler (that is, those with a non-0 ID).
2236
+ *
2237
+ * @generated from field: sass.embedded_protocol.ListSeparator separator = 2;
2238
+ */
2239
+ this.separator = ListSeparator.COMMA;
2240
+ /**
2241
+ * The argument list's positional contents. The compiler must set this, but
2242
+ * the host may omit it for `ArgumentList`s that were originally created by
2243
+ * the compiler (that is, those with a non-0 ID).
2244
+ *
2245
+ * @generated from field: repeated sass.embedded_protocol.Value contents = 3;
2246
+ */
2247
+ this.contents = [];
2248
+ /**
2249
+ * The argument list's keywords. The compiler must set this, but the host
2250
+ * may omit it for `ArgumentList`s that were originally created by the
2251
+ * compiler (that is, those with a non-0 ID).
2252
+ *
2253
+ * @generated from field: map<string, sass.embedded_protocol.Value> keywords = 4;
2254
+ */
2255
+ this.keywords = {};
2256
+ protobuf_1.proto3.util.initPartial(data, this);
2257
+ }
2258
+ static fromBinary(bytes, options) {
2259
+ return new Value_ArgumentList().fromBinary(bytes, options);
2260
+ }
2261
+ static fromJson(jsonValue, options) {
2262
+ return new Value_ArgumentList().fromJson(jsonValue, options);
2263
+ }
2264
+ static fromJsonString(jsonString, options) {
2265
+ return new Value_ArgumentList().fromJsonString(jsonString, options);
2266
+ }
2267
+ static equals(a, b) {
2268
+ return protobuf_1.proto3.util.equals(Value_ArgumentList, a, b);
2269
+ }
2270
+ }
2271
+ exports.Value_ArgumentList = Value_ArgumentList;
2272
+ Value_ArgumentList.runtime = protobuf_1.proto3;
2273
+ Value_ArgumentList.typeName = "sass.embedded_protocol.Value.ArgumentList";
2274
+ Value_ArgumentList.fields = protobuf_1.proto3.util.newFieldList(() => [
2275
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
2276
+ { no: 2, name: "separator", kind: "enum", T: protobuf_1.proto3.getEnumType(ListSeparator) },
2277
+ { no: 3, name: "contents", kind: "message", T: Value, repeated: true },
2278
+ { no: 4, name: "keywords", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: Value } },
2279
+ ]);
2280
+ /**
2281
+ * A SassScript calculation value. The compiler must send fully [simplified]
2282
+ * calculations, meaning that simplifying it again will produce the same
2283
+ * calculation. The host is not required to simplify calculations.
2284
+ *
2285
+ * [simplified]: https://github.com/sass/sass/tree/main/spec/types/calculation.md#simplifying-a-calculation
2286
+ *
2287
+ * The compiler must simplify any calculations it receives from the host
2288
+ * before returning them from a function. If this simplification produces an
2289
+ * error, it should be treated as though the function call threw that error.
2290
+ * It should *not* be treated as a protocol error.
2291
+ *
2292
+ * @generated from message sass.embedded_protocol.Value.Calculation
2293
+ */
2294
+ class Value_Calculation extends protobuf_1.Message {
2295
+ constructor(data) {
2296
+ super();
2297
+ /**
2298
+ * The calculation's name. Mandatory. The host may only set this to names
2299
+ * that the Sass specification uses to create calculations.
2300
+ *
2301
+ * @generated from field: string name = 1;
2302
+ */
2303
+ this.name = "";
2304
+ /**
2305
+ * The calculation's arguments. Mandatory. The host must use exactly the
2306
+ * number of arguments used by the Sass specification for calculations with
2307
+ * the given `name`.
2308
+ *
2309
+ * @generated from field: repeated sass.embedded_protocol.Value.Calculation.CalculationValue arguments = 2;
2310
+ */
2311
+ this.arguments = [];
2312
+ protobuf_1.proto3.util.initPartial(data, this);
2313
+ }
2314
+ static fromBinary(bytes, options) {
2315
+ return new Value_Calculation().fromBinary(bytes, options);
2316
+ }
2317
+ static fromJson(jsonValue, options) {
2318
+ return new Value_Calculation().fromJson(jsonValue, options);
2319
+ }
2320
+ static fromJsonString(jsonString, options) {
2321
+ return new Value_Calculation().fromJsonString(jsonString, options);
2322
+ }
2323
+ static equals(a, b) {
2324
+ return protobuf_1.proto3.util.equals(Value_Calculation, a, b);
2325
+ }
2326
+ }
2327
+ exports.Value_Calculation = Value_Calculation;
2328
+ Value_Calculation.runtime = protobuf_1.proto3;
2329
+ Value_Calculation.typeName = "sass.embedded_protocol.Value.Calculation";
2330
+ Value_Calculation.fields = protobuf_1.proto3.util.newFieldList(() => [
2331
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2332
+ { no: 2, name: "arguments", kind: "message", T: Value_Calculation_CalculationValue, repeated: true },
2333
+ ]);
2334
+ /**
2335
+ * A single component of a calculation expression.
2336
+ *
2337
+ * @generated from message sass.embedded_protocol.Value.Calculation.CalculationValue
2338
+ */
2339
+ class Value_Calculation_CalculationValue extends protobuf_1.Message {
2340
+ constructor(data) {
2341
+ super();
2342
+ /**
2343
+ * The value of the component. Mandatory.
2344
+ *
2345
+ * @generated from oneof sass.embedded_protocol.Value.Calculation.CalculationValue.value
2346
+ */
2347
+ this.value = { case: undefined };
2348
+ protobuf_1.proto3.util.initPartial(data, this);
2349
+ }
2350
+ static fromBinary(bytes, options) {
2351
+ return new Value_Calculation_CalculationValue().fromBinary(bytes, options);
2352
+ }
2353
+ static fromJson(jsonValue, options) {
2354
+ return new Value_Calculation_CalculationValue().fromJson(jsonValue, options);
2355
+ }
2356
+ static fromJsonString(jsonString, options) {
2357
+ return new Value_Calculation_CalculationValue().fromJsonString(jsonString, options);
2358
+ }
2359
+ static equals(a, b) {
2360
+ return protobuf_1.proto3.util.equals(Value_Calculation_CalculationValue, a, b);
2361
+ }
2362
+ }
2363
+ exports.Value_Calculation_CalculationValue = Value_Calculation_CalculationValue;
2364
+ Value_Calculation_CalculationValue.runtime = protobuf_1.proto3;
2365
+ Value_Calculation_CalculationValue.typeName = "sass.embedded_protocol.Value.Calculation.CalculationValue";
2366
+ Value_Calculation_CalculationValue.fields = protobuf_1.proto3.util.newFieldList(() => [
2367
+ { no: 1, name: "number", kind: "message", T: Value_Number, oneof: "value" },
2368
+ { no: 2, name: "string", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" },
2369
+ { no: 3, name: "interpolation", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" },
2370
+ { no: 4, name: "operation", kind: "message", T: Value_Calculation_CalculationOperation, oneof: "value" },
2371
+ { no: 5, name: "calculation", kind: "message", T: Value_Calculation, oneof: "value" },
2372
+ ]);
2373
+ /**
2374
+ * A binary operation that appears in a calculation.
2375
+ *
2376
+ * @generated from message sass.embedded_protocol.Value.Calculation.CalculationOperation
2377
+ */
2378
+ class Value_Calculation_CalculationOperation extends protobuf_1.Message {
2379
+ constructor(data) {
2380
+ super();
2381
+ /**
2382
+ * The operator to perform.
2383
+ *
2384
+ * @generated from field: sass.embedded_protocol.CalculationOperator operator = 1;
2385
+ */
2386
+ this.operator = CalculationOperator.PLUS;
2387
+ protobuf_1.proto3.util.initPartial(data, this);
2388
+ }
2389
+ static fromBinary(bytes, options) {
2390
+ return new Value_Calculation_CalculationOperation().fromBinary(bytes, options);
2391
+ }
2392
+ static fromJson(jsonValue, options) {
2393
+ return new Value_Calculation_CalculationOperation().fromJson(jsonValue, options);
2394
+ }
2395
+ static fromJsonString(jsonString, options) {
2396
+ return new Value_Calculation_CalculationOperation().fromJsonString(jsonString, options);
2397
+ }
2398
+ static equals(a, b) {
2399
+ return protobuf_1.proto3.util.equals(Value_Calculation_CalculationOperation, a, b);
2400
+ }
2401
+ }
2402
+ exports.Value_Calculation_CalculationOperation = Value_Calculation_CalculationOperation;
2403
+ Value_Calculation_CalculationOperation.runtime = protobuf_1.proto3;
2404
+ Value_Calculation_CalculationOperation.typeName = "sass.embedded_protocol.Value.Calculation.CalculationOperation";
2405
+ Value_Calculation_CalculationOperation.fields = protobuf_1.proto3.util.newFieldList(() => [
2406
+ { no: 1, name: "operator", kind: "enum", T: protobuf_1.proto3.getEnumType(CalculationOperator) },
2407
+ { no: 2, name: "left", kind: "message", T: Value_Calculation_CalculationValue },
2408
+ { no: 3, name: "right", kind: "message", T: Value_Calculation_CalculationValue },
2409
+ ]);
2410
+ //# sourceMappingURL=embedded_sass_pb.js.map