sass-embedded 1.0.0-beta.5 → 1.0.0-beta.7
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/CHANGELOG.md +18 -0
- package/dist/.gitignore +1 -1
- package/dist/lib/index.js +11 -4
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/src/{embedded-compiler/compiler.js → async-compiler.js} +9 -17
- package/dist/lib/src/async-compiler.js.map +1 -0
- package/dist/lib/src/compile.js +167 -79
- package/dist/lib/src/compile.js.map +1 -1
- package/dist/lib/src/compiler-path.js +18 -0
- package/dist/lib/src/compiler-path.js.map +1 -0
- package/dist/lib/src/{embedded-protocol/utils.js → deprotofy-span.js} +16 -18
- package/dist/lib/src/deprotofy-span.js.map +1 -0
- package/dist/lib/src/{embedded-protocol/dispatcher.js → dispatcher.js} +45 -40
- package/dist/lib/src/dispatcher.js.map +1 -0
- package/dist/lib/src/exception.js +20 -0
- package/dist/lib/src/exception.js.map +1 -0
- package/dist/lib/src/function-registry.js +81 -0
- package/dist/lib/src/function-registry.js.map +1 -0
- package/dist/lib/src/{node-sass/render.js → legacy.js} +45 -39
- package/dist/lib/src/legacy.js.map +1 -0
- package/dist/lib/src/{embedded-protocol/message-transformer.js → message-transformer.js} +2 -2
- package/dist/lib/src/message-transformer.js.map +1 -0
- package/dist/lib/src/{embedded-compiler/packet-transformer.js → packet-transformer.js} +0 -0
- package/dist/lib/src/packet-transformer.js.map +1 -0
- package/dist/lib/src/protofier.js +205 -0
- package/dist/lib/src/protofier.js.map +1 -0
- package/dist/lib/src/{embedded-protocol/request-tracker.js → request-tracker.js} +0 -0
- package/dist/lib/src/request-tracker.js.map +1 -0
- package/dist/lib/src/sync-compiler.js +52 -0
- package/dist/lib/src/sync-compiler.js.map +1 -0
- package/dist/lib/src/{exception/span.js → sync-process/event.js} +2 -2
- package/dist/lib/src/sync-process/event.js.map +1 -0
- package/dist/lib/src/sync-process/index.js +122 -0
- package/dist/lib/src/sync-process/index.js.map +1 -0
- package/dist/lib/src/sync-process/sync-message-port.js +128 -0
- package/dist/lib/src/sync-process/sync-message-port.js.map +1 -0
- package/dist/lib/src/sync-process/worker.js +51 -0
- package/dist/lib/src/sync-process/worker.js.map +1 -0
- package/dist/lib/src/utils.js +43 -1
- package/dist/lib/src/utils.js.map +1 -1
- package/dist/lib/src/value/boolean.js +3 -3
- package/dist/lib/src/value/boolean.js.map +1 -1
- package/dist/lib/src/value/color.js +89 -98
- package/dist/lib/src/value/color.js.map +1 -1
- package/dist/lib/src/value/{value.js → index.js} +5 -1
- package/dist/lib/src/value/index.js.map +1 -0
- package/dist/lib/src/value/list.js +15 -18
- package/dist/lib/src/value/list.js.map +1 -1
- package/dist/lib/src/value/map.js +17 -10
- package/dist/lib/src/value/map.js.map +1 -1
- package/dist/lib/src/value/null.js +2 -2
- package/dist/lib/src/value/number.js +20 -26
- package/dist/lib/src/value/number.js.map +1 -1
- package/dist/lib/src/value/string.js +14 -9
- package/dist/lib/src/value/string.js.map +1 -1
- package/dist/lib/src/value/utils.js +7 -1
- package/dist/lib/src/value/utils.js.map +1 -1
- package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.js +1395 -101
- package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.js.map +1 -1
- package/dist/package.json +6 -4
- package/dist/tool/utils.js +34 -9
- package/dist/tool/utils.js.map +1 -1
- package/dist/types/compile.d.ts +152 -0
- package/dist/types/exception.d.ts +41 -0
- package/dist/types/importer.d.ts +294 -0
- package/dist/types/index.d.ts +76 -0
- package/dist/types/legacy/exception.d.ts +54 -0
- package/dist/types/legacy/function.d.ts +652 -0
- package/dist/types/legacy/importer.d.ts +168 -0
- package/dist/types/legacy/options.d.ts +642 -0
- package/dist/types/legacy/plugin_this.d.ts +70 -0
- package/dist/types/legacy/render.d.ts +139 -0
- package/dist/types/logger/index.d.ts +94 -0
- package/dist/types/logger/source_location.d.ts +21 -0
- package/dist/types/logger/source_span.d.ts +34 -0
- package/dist/types/options.d.ts +408 -0
- package/dist/types/util/promise_or.d.ts +17 -0
- package/dist/types/value/argument_list.d.ts +47 -0
- package/dist/types/value/boolean.d.ts +29 -0
- package/dist/types/value/color.d.ts +107 -0
- package/dist/types/value/function.d.ts +22 -0
- package/dist/types/value/index.d.ts +173 -0
- package/dist/types/value/list.d.ts +54 -0
- package/dist/types/value/map.d.ts +41 -0
- package/dist/types/value/number.d.ts +305 -0
- package/dist/types/value/string.d.ts +84 -0
- package/package.json +6 -4
- package/dist/lib/index.d.ts +0 -10
- package/dist/lib/src/compile.d.ts +0 -22
- package/dist/lib/src/embedded-compiler/compiler.d.ts +0 -19
- package/dist/lib/src/embedded-compiler/compiler.js.map +0 -1
- package/dist/lib/src/embedded-compiler/packet-transformer.d.ts +0 -34
- package/dist/lib/src/embedded-compiler/packet-transformer.js.map +0 -1
- package/dist/lib/src/embedded-protocol/dispatcher.d.ts +0 -60
- package/dist/lib/src/embedded-protocol/dispatcher.js.map +0 -1
- package/dist/lib/src/embedded-protocol/message-transformer.d.ts +0 -47
- package/dist/lib/src/embedded-protocol/message-transformer.js.map +0 -1
- package/dist/lib/src/embedded-protocol/request-tracker.d.ts +0 -20
- package/dist/lib/src/embedded-protocol/request-tracker.js.map +0 -1
- package/dist/lib/src/embedded-protocol/utils.d.ts +0 -7
- package/dist/lib/src/embedded-protocol/utils.js.map +0 -1
- package/dist/lib/src/exception/exception.d.ts +0 -19
- package/dist/lib/src/exception/exception.js +0 -37
- package/dist/lib/src/exception/exception.js.map +0 -1
- package/dist/lib/src/exception/location.d.ts +0 -11
- package/dist/lib/src/exception/location.js +0 -6
- package/dist/lib/src/exception/location.js.map +0 -1
- package/dist/lib/src/exception/span.d.ts +0 -29
- package/dist/lib/src/exception/span.js.map +0 -1
- package/dist/lib/src/node-sass/render.d.ts +0 -61
- package/dist/lib/src/node-sass/render.js.map +0 -1
- package/dist/lib/src/utils.d.ts +0 -16
- package/dist/lib/src/value/boolean.d.ts +0 -25
- package/dist/lib/src/value/color.d.ts +0 -89
- package/dist/lib/src/value/list.d.ts +0 -41
- package/dist/lib/src/value/map.d.ts +0 -26
- package/dist/lib/src/value/null.d.ts +0 -12
- package/dist/lib/src/value/number.d.ts +0 -189
- package/dist/lib/src/value/string.d.ts +0 -56
- package/dist/lib/src/value/utils.d.ts +0 -44
- package/dist/lib/src/value/value.d.ts +0 -108
- package/dist/lib/src/value/value.js.map +0 -1
- package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.d.ts +0 -1
- package/dist/tool/utils.d.ts +0 -32
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// This is a mirror of the JS API definitions in `spec/js-api`, but with comments
|
|
2
|
+
// written to provide user-facing documentation rather than to specify behavior for
|
|
3
|
+
// implementations.
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
CompileResult,
|
|
7
|
+
compile,
|
|
8
|
+
compileAsync,
|
|
9
|
+
compileString,
|
|
10
|
+
compileStringAsync,
|
|
11
|
+
} from './compile';
|
|
12
|
+
export {Exception} from './exception';
|
|
13
|
+
export {FileImporter, Importer, ImporterResult} from './importer';
|
|
14
|
+
export {Logger, SourceSpan, SourceLocation} from './logger';
|
|
15
|
+
export {
|
|
16
|
+
CustomFunction,
|
|
17
|
+
Options,
|
|
18
|
+
OutputStyle,
|
|
19
|
+
StringOptions,
|
|
20
|
+
StringOptionsWithImporter,
|
|
21
|
+
StringOptionsWithoutImporter,
|
|
22
|
+
Syntax,
|
|
23
|
+
} from './options';
|
|
24
|
+
export {PromiseOr} from './util/promise_or';
|
|
25
|
+
export {
|
|
26
|
+
ListSeparator,
|
|
27
|
+
SassArgumentList,
|
|
28
|
+
SassBoolean,
|
|
29
|
+
SassColor,
|
|
30
|
+
SassFunction,
|
|
31
|
+
SassList,
|
|
32
|
+
SassMap,
|
|
33
|
+
SassNumber,
|
|
34
|
+
SassString,
|
|
35
|
+
Value,
|
|
36
|
+
sassFalse,
|
|
37
|
+
sassNull,
|
|
38
|
+
sassTrue,
|
|
39
|
+
} from './value';
|
|
40
|
+
|
|
41
|
+
// Legacy APIs
|
|
42
|
+
export {LegacyException} from './legacy/exception';
|
|
43
|
+
export {
|
|
44
|
+
LegacyAsyncFunction,
|
|
45
|
+
LegacySyncFunction,
|
|
46
|
+
LegacyFunction,
|
|
47
|
+
LegacyValue,
|
|
48
|
+
types,
|
|
49
|
+
} from './legacy/function';
|
|
50
|
+
export {
|
|
51
|
+
LegacyAsyncImporter,
|
|
52
|
+
LegacyImporter,
|
|
53
|
+
LegacyImporterResult,
|
|
54
|
+
LegacyImporterThis,
|
|
55
|
+
LegacySyncImporter,
|
|
56
|
+
} from './legacy/importer';
|
|
57
|
+
export {
|
|
58
|
+
LegacySharedOptions,
|
|
59
|
+
LegacyFileOptions,
|
|
60
|
+
LegacyStringOptions,
|
|
61
|
+
LegacyOptions,
|
|
62
|
+
} from './legacy/options';
|
|
63
|
+
export {LegacyPluginThis} from './legacy/plugin_this';
|
|
64
|
+
export {LegacyResult, render, renderSync} from './legacy/render';
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Information about the Sass implementation. This always begins with a unique
|
|
68
|
+
* identifier for the Sass implementation, followed by U+0009 TAB, followed by
|
|
69
|
+
* its npm package version. Some implementations include additional information
|
|
70
|
+
* as well, but not in any standardized format.
|
|
71
|
+
*
|
|
72
|
+
* * For Dart Sass, the implementation name is `dart-sass`.
|
|
73
|
+
* * For Node Sass, the implementation name is `node-sass`.
|
|
74
|
+
* * For the embedded host, the implementation name is `sass-embedded`.
|
|
75
|
+
*/
|
|
76
|
+
export const info: string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The exception type thrown by [[renderSync]] and passed as the error to
|
|
3
|
+
* [[render]]'s callback.
|
|
4
|
+
*
|
|
5
|
+
* @category Legacy
|
|
6
|
+
* @deprecated This is only thrown by the legacy [[render]] and [[renderSync]]
|
|
7
|
+
* APIs. Use [[compile]], [[compileString]], [[compileAsync]], and
|
|
8
|
+
* [[compileStringAsync]] instead.
|
|
9
|
+
*/
|
|
10
|
+
export interface LegacyException extends Error {
|
|
11
|
+
/**
|
|
12
|
+
* The error message. For Dart Sass, when possible this includes a highlighted
|
|
13
|
+
* indication of where in the source file the error occurred as well as the
|
|
14
|
+
* Sass stack trace.
|
|
15
|
+
*/
|
|
16
|
+
message: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The error message. For Dart Sass, this is the same as the result of calling
|
|
20
|
+
* [[toString]], which is itself the same as [[message]] but with the prefix
|
|
21
|
+
* "Error:".
|
|
22
|
+
*/
|
|
23
|
+
formatted: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The (1-based) line number on which the error occurred, if this exception is
|
|
27
|
+
* associated with a specific Sass file location.
|
|
28
|
+
*/
|
|
29
|
+
line?: number;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The (1-based) column number within [[line]] at which the error occurred, if
|
|
33
|
+
* this exception is associated with a specific Sass file location.
|
|
34
|
+
*/
|
|
35
|
+
column?: number;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Analogous to the exit code for an executable. `1` for an error caused by a
|
|
39
|
+
* Sass file, `3` for any other type of error.
|
|
40
|
+
*/
|
|
41
|
+
status: number;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* If this exception was caused by an error in a Sass file, this will
|
|
45
|
+
* represent the Sass file's location. It can be in one of three formats:
|
|
46
|
+
*
|
|
47
|
+
* * If the Sass file was loaded from disk, this is the path to that file.
|
|
48
|
+
* * If the Sass file was generated by an importer, this is its canonical URL.
|
|
49
|
+
* * If the Sass file was passed as [[LegacyStringOptions.data]] without a
|
|
50
|
+
* corresponding [[LegacyStringOptions.file]], this is the special string
|
|
51
|
+
* `"stdin"`.
|
|
52
|
+
*/
|
|
53
|
+
file?: string;
|
|
54
|
+
}
|