sass 1.45.1 → 1.47.0
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.
- package/package.json +1 -1
- package/sass.dart.js +9 -6
- package/types/index.d.ts +4 -1
- package/types/legacy/function.d.ts +100 -6
- package/types/legacy/plugin_this.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=8.9.0"},"dependencies":{"chokidar":">=3.0.0 <4.0.0","immutable":"^4.0.0","source-map-js":">=0.6.2 <2.0.0"},"keywords":["style","scss","sass","preprocessor","css"],"types":"types/index.d.ts","version":"1.
|
|
1
|
+
{"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=8.9.0"},"dependencies":{"chokidar":">=3.0.0 <4.0.0","immutable":"^4.0.0","source-map-js":">=0.6.2 <2.0.0"},"keywords":["style","scss","sass","preprocessor","css"],"types":"types/index.d.ts","version":"1.47.0","bin":{"sass":"sass.js"},"main":"sass.default.dart.js","exports":{"default":"./sass.default.dart.js"}}
|
package/sass.dart.js
CHANGED
|
@@ -20773,7 +20773,7 @@ self.readline = _cli_pkg_requires.readline;
|
|
|
20773
20773
|
J.set$sassFalse$x(self.exports, B.SassBoolean_false0);
|
|
20774
20774
|
J.set$Exception$x(self.exports, $.$get$exceptionClass());
|
|
20775
20775
|
J.set$Logger$x(self.exports, {silent: {warn: A.allowInteropNamed("sass.Logger.silent.warn", new A.main_closure0()), debug: A.allowInteropNamed("sass.Logger.silent.debug", new A.main_closure1())}});
|
|
20776
|
-
J.set$info$x(self.exports, "dart-sass\t1.
|
|
20776
|
+
J.set$info$x(self.exports, "dart-sass\t1.47.0\t(Sass Compiler)\t[Dart]\ndart2js\t2.15.1\t(Dart Compiler)\t[Dart]");
|
|
20777
20777
|
A.updateSourceSpanPrototype();
|
|
20778
20778
|
J.set$render$x(self.exports, A.allowInteropNamed("sass.render", A.legacy__render$closure()));
|
|
20779
20779
|
J.set$renderSync$x(self.exports, A.allowInteropNamed("sass.renderSync", A.legacy__renderSync$closure()));
|
|
@@ -21432,7 +21432,7 @@ self.readline = _cli_pkg_requires.readline;
|
|
|
21432
21432
|
switch ($async$goto) {
|
|
21433
21433
|
case 0:
|
|
21434
21434
|
// Function start
|
|
21435
|
-
$async$returnValue = "1.
|
|
21435
|
+
$async$returnValue = "1.47.0 compiled with dart2js 2.15.1";
|
|
21436
21436
|
// goto return
|
|
21437
21437
|
$async$goto = 1;
|
|
21438
21438
|
break;
|
|
@@ -66802,12 +66802,12 @@ self.readline = _cli_pkg_requires.readline;
|
|
|
66802
66802
|
return A.SassArgumentList$0(t1, t3.cast$2$0(0, type$.String, t2), A.jsToDartSeparator(separator));
|
|
66803
66803
|
},
|
|
66804
66804
|
call$3($self, contents, keywords) {
|
|
66805
|
-
return this.call$4($self, contents, keywords,
|
|
66805
|
+
return this.call$4($self, contents, keywords, ",");
|
|
66806
66806
|
},
|
|
66807
66807
|
"call*": "call$4",
|
|
66808
66808
|
$requiredArgCount: 3,
|
|
66809
66809
|
$defaultValues() {
|
|
66810
|
-
return [
|
|
66810
|
+
return [","];
|
|
66811
66811
|
},
|
|
66812
66812
|
$signature: 301
|
|
66813
66813
|
};
|
|
@@ -86834,8 +86834,10 @@ self.readline = _cli_pkg_requires.readline;
|
|
|
86834
86834
|
warn = t1 == null ? null : J.get$warn$x(t1);
|
|
86835
86835
|
if (warn == null)
|
|
86836
86836
|
this._withAscii$1(new A.NodeToDartLogger_warn_closure(this, message, span, trace, deprecation));
|
|
86837
|
-
else
|
|
86838
|
-
|
|
86837
|
+
else {
|
|
86838
|
+
t1 = span == null ? type$.nullable_SourceSpan._as(self.undefined) : span;
|
|
86839
|
+
warn.call$2(message, {deprecation: deprecation, span: t1, stack: J.toString$0$(trace)});
|
|
86840
|
+
}
|
|
86839
86841
|
},
|
|
86840
86842
|
warn$1($receiver, message) {
|
|
86841
86843
|
return this.warn$4$deprecation$span$trace($receiver, message, false, null, null);
|
|
@@ -97963,6 +97965,7 @@ self.readline = _cli_pkg_requires.readline;
|
|
|
97963
97965
|
nullable_List_ComplexSelector_2: findType("List<ComplexSelector0>?"),
|
|
97964
97966
|
nullable_Object: findType("Object?"),
|
|
97965
97967
|
nullable_SourceFile: findType("SourceFile?"),
|
|
97968
|
+
nullable_SourceSpan: findType("SourceSpan?"),
|
|
97966
97969
|
nullable_StreamSubscription_WatchEvent: findType("StreamSubscription<WatchEvent>?"),
|
|
97967
97970
|
nullable_String: findType("String?"),
|
|
97968
97971
|
nullable_Stylesheet: findType("Stylesheet?"),
|
package/types/index.d.ts
CHANGED
|
@@ -41,10 +41,13 @@ export {
|
|
|
41
41
|
// Legacy APIs
|
|
42
42
|
export {LegacyException} from './legacy/exception';
|
|
43
43
|
export {
|
|
44
|
+
FALSE,
|
|
44
45
|
LegacyAsyncFunction,
|
|
45
|
-
|
|
46
|
+
LegacyAsyncFunctionDone,
|
|
46
47
|
LegacyFunction,
|
|
48
|
+
LegacySyncFunction,
|
|
47
49
|
LegacyValue,
|
|
50
|
+
TRUE,
|
|
48
51
|
types,
|
|
49
52
|
} from './legacy/function';
|
|
50
53
|
export {
|
|
@@ -68,9 +68,10 @@ export type LegacySyncFunction = (
|
|
|
68
68
|
* });
|
|
69
69
|
* ```
|
|
70
70
|
*
|
|
71
|
-
*
|
|
72
|
-
* that's passed to [[LegacySharedOptions.functions]]. If the
|
|
73
|
-
*
|
|
71
|
+
* This is passed one argument for each argument that's declared in the
|
|
72
|
+
* signature that's passed to [[LegacySharedOptions.functions]]. If the
|
|
73
|
+
* signature [takes arbitrary
|
|
74
|
+
* arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments),
|
|
74
75
|
* they're passed as a single argument list in the last argument before the
|
|
75
76
|
* callback.
|
|
76
77
|
*
|
|
@@ -79,9 +80,73 @@ export type LegacySyncFunction = (
|
|
|
79
80
|
* APIs. Use [[CustomFunction]] with [[compile]], [[compileString]],
|
|
80
81
|
* [[compileAsync]], and [[compileStringAsync]] instead.
|
|
81
82
|
*/
|
|
82
|
-
export type LegacyAsyncFunction =
|
|
83
|
-
this: LegacyPluginThis,
|
|
84
|
-
|
|
83
|
+
export type LegacyAsyncFunction =
|
|
84
|
+
| ((this: LegacyPluginThis, done: (result: LegacyValue) => void) => void)
|
|
85
|
+
| ((
|
|
86
|
+
this: LegacyPluginThis,
|
|
87
|
+
arg1: LegacyValue,
|
|
88
|
+
done: LegacyAsyncFunctionDone
|
|
89
|
+
) => void)
|
|
90
|
+
| ((
|
|
91
|
+
this: LegacyPluginThis,
|
|
92
|
+
arg1: LegacyValue,
|
|
93
|
+
arg2: LegacyValue,
|
|
94
|
+
done: LegacyAsyncFunctionDone
|
|
95
|
+
) => void)
|
|
96
|
+
| ((
|
|
97
|
+
this: LegacyPluginThis,
|
|
98
|
+
arg1: LegacyValue,
|
|
99
|
+
arg2: LegacyValue,
|
|
100
|
+
arg3: LegacyValue,
|
|
101
|
+
done: LegacyAsyncFunctionDone
|
|
102
|
+
) => void)
|
|
103
|
+
| ((
|
|
104
|
+
this: LegacyPluginThis,
|
|
105
|
+
arg1: LegacyValue,
|
|
106
|
+
arg2: LegacyValue,
|
|
107
|
+
arg3: LegacyValue,
|
|
108
|
+
arg4: LegacyValue,
|
|
109
|
+
done: LegacyAsyncFunctionDone
|
|
110
|
+
) => void)
|
|
111
|
+
| ((
|
|
112
|
+
this: LegacyPluginThis,
|
|
113
|
+
arg1: LegacyValue,
|
|
114
|
+
arg2: LegacyValue,
|
|
115
|
+
arg3: LegacyValue,
|
|
116
|
+
arg4: LegacyValue,
|
|
117
|
+
arg5: LegacyValue,
|
|
118
|
+
done: LegacyAsyncFunctionDone
|
|
119
|
+
) => void)
|
|
120
|
+
| ((
|
|
121
|
+
this: LegacyPluginThis,
|
|
122
|
+
arg1: LegacyValue,
|
|
123
|
+
arg2: LegacyValue,
|
|
124
|
+
arg3: LegacyValue,
|
|
125
|
+
arg4: LegacyValue,
|
|
126
|
+
arg5: LegacyValue,
|
|
127
|
+
arg6: LegacyValue,
|
|
128
|
+
done: LegacyAsyncFunctionDone
|
|
129
|
+
) => void)
|
|
130
|
+
| ((
|
|
131
|
+
this: LegacyPluginThis,
|
|
132
|
+
...args: [...LegacyValue[], LegacyAsyncFunctionDone]
|
|
133
|
+
) => void);
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The function called by a [[LegacyAsyncFunction]] to indicate that it's
|
|
137
|
+
* finished.
|
|
138
|
+
*
|
|
139
|
+
* @param result - If this is a [[LegacyValue]], that indicates that the
|
|
140
|
+
* function call completed successfully. If it's a [[types.Error]], that
|
|
141
|
+
* indicates that the function call failed.
|
|
142
|
+
*
|
|
143
|
+
* @category Legacy
|
|
144
|
+
* @deprecated This only works with the legacy [[render]] and [[renderSync]]
|
|
145
|
+
* APIs. Use [[CustomFunction]] with [[compile]], [[compileString]],
|
|
146
|
+
* [[compileAsync]], and [[compileStringAsync]] instead.
|
|
147
|
+
*/
|
|
148
|
+
export type LegacyAsyncFunctionDone = (
|
|
149
|
+
result: LegacyValue | types.Error
|
|
85
150
|
) => void;
|
|
86
151
|
|
|
87
152
|
/**
|
|
@@ -119,6 +184,26 @@ export type LegacyValue =
|
|
|
119
184
|
| types.List
|
|
120
185
|
| types.Map;
|
|
121
186
|
|
|
187
|
+
/**
|
|
188
|
+
* A shorthand for `sass.types.TRUE`.
|
|
189
|
+
*
|
|
190
|
+
* @category Legacy
|
|
191
|
+
* @deprecated This only works with the legacy [[render]] and [[renderSync]]
|
|
192
|
+
* APIs. Use [[sassTrue]] with [[compile]], [[compileString]], [[compileAsync]],
|
|
193
|
+
* and [[compileStringAsync]] instead.
|
|
194
|
+
*/
|
|
195
|
+
export const TRUE: types.Boolean<true>;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* A shorthand for `sass.types.FALSE`.
|
|
199
|
+
*
|
|
200
|
+
* @category Legacy
|
|
201
|
+
* @deprecated This only works with the legacy [[render]] and [[renderSync]]
|
|
202
|
+
* APIs. Use [[sassFalse]] with [[compile]], [[compileString]], [[compileAsync]],
|
|
203
|
+
* and [[compileStringAsync]] instead.
|
|
204
|
+
*/
|
|
205
|
+
export const FALSE: types.Boolean<false>;
|
|
206
|
+
|
|
122
207
|
/**
|
|
123
208
|
* The namespace for value types used in the legacy function API.
|
|
124
209
|
*
|
|
@@ -649,4 +734,13 @@ export namespace types {
|
|
|
649
734
|
*/
|
|
650
735
|
getLength(): number;
|
|
651
736
|
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* An error that can be returned from a Sass function to signal that it
|
|
740
|
+
* encountered an error. This is the only way to signal an error
|
|
741
|
+
* asynchronously from a [[LegacyAsyncFunction]].
|
|
742
|
+
*/
|
|
743
|
+
export class Error {
|
|
744
|
+
constructor(message: string);
|
|
745
|
+
}
|
|
652
746
|
}
|
|
@@ -13,6 +13,9 @@ export interface LegacyPluginThis {
|
|
|
13
13
|
* [[renderSync]].
|
|
14
14
|
*/
|
|
15
15
|
options: {
|
|
16
|
+
/** The same [[LegacyPluginThis]] instance that contains this object. */
|
|
17
|
+
context: LegacyPluginThis;
|
|
18
|
+
|
|
16
19
|
/**
|
|
17
20
|
* The value passed to [[LegacyFileOptions.file]] or
|
|
18
21
|
* [[LegacyStringOptions.file]].
|