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.
Files changed (124) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/.gitignore +1 -1
  3. package/dist/lib/index.js +11 -4
  4. package/dist/lib/index.js.map +1 -1
  5. package/dist/lib/src/{embedded-compiler/compiler.js → async-compiler.js} +9 -17
  6. package/dist/lib/src/async-compiler.js.map +1 -0
  7. package/dist/lib/src/compile.js +167 -79
  8. package/dist/lib/src/compile.js.map +1 -1
  9. package/dist/lib/src/compiler-path.js +18 -0
  10. package/dist/lib/src/compiler-path.js.map +1 -0
  11. package/dist/lib/src/{embedded-protocol/utils.js → deprotofy-span.js} +16 -18
  12. package/dist/lib/src/deprotofy-span.js.map +1 -0
  13. package/dist/lib/src/{embedded-protocol/dispatcher.js → dispatcher.js} +45 -40
  14. package/dist/lib/src/dispatcher.js.map +1 -0
  15. package/dist/lib/src/exception.js +20 -0
  16. package/dist/lib/src/exception.js.map +1 -0
  17. package/dist/lib/src/function-registry.js +81 -0
  18. package/dist/lib/src/function-registry.js.map +1 -0
  19. package/dist/lib/src/{node-sass/render.js → legacy.js} +45 -39
  20. package/dist/lib/src/legacy.js.map +1 -0
  21. package/dist/lib/src/{embedded-protocol/message-transformer.js → message-transformer.js} +2 -2
  22. package/dist/lib/src/message-transformer.js.map +1 -0
  23. package/dist/lib/src/{embedded-compiler/packet-transformer.js → packet-transformer.js} +0 -0
  24. package/dist/lib/src/packet-transformer.js.map +1 -0
  25. package/dist/lib/src/protofier.js +205 -0
  26. package/dist/lib/src/protofier.js.map +1 -0
  27. package/dist/lib/src/{embedded-protocol/request-tracker.js → request-tracker.js} +0 -0
  28. package/dist/lib/src/request-tracker.js.map +1 -0
  29. package/dist/lib/src/sync-compiler.js +52 -0
  30. package/dist/lib/src/sync-compiler.js.map +1 -0
  31. package/dist/lib/src/{exception/span.js → sync-process/event.js} +2 -2
  32. package/dist/lib/src/sync-process/event.js.map +1 -0
  33. package/dist/lib/src/sync-process/index.js +122 -0
  34. package/dist/lib/src/sync-process/index.js.map +1 -0
  35. package/dist/lib/src/sync-process/sync-message-port.js +128 -0
  36. package/dist/lib/src/sync-process/sync-message-port.js.map +1 -0
  37. package/dist/lib/src/sync-process/worker.js +51 -0
  38. package/dist/lib/src/sync-process/worker.js.map +1 -0
  39. package/dist/lib/src/utils.js +43 -1
  40. package/dist/lib/src/utils.js.map +1 -1
  41. package/dist/lib/src/value/boolean.js +3 -3
  42. package/dist/lib/src/value/boolean.js.map +1 -1
  43. package/dist/lib/src/value/color.js +89 -98
  44. package/dist/lib/src/value/color.js.map +1 -1
  45. package/dist/lib/src/value/{value.js → index.js} +5 -1
  46. package/dist/lib/src/value/index.js.map +1 -0
  47. package/dist/lib/src/value/list.js +15 -18
  48. package/dist/lib/src/value/list.js.map +1 -1
  49. package/dist/lib/src/value/map.js +17 -10
  50. package/dist/lib/src/value/map.js.map +1 -1
  51. package/dist/lib/src/value/null.js +2 -2
  52. package/dist/lib/src/value/number.js +20 -26
  53. package/dist/lib/src/value/number.js.map +1 -1
  54. package/dist/lib/src/value/string.js +14 -9
  55. package/dist/lib/src/value/string.js.map +1 -1
  56. package/dist/lib/src/value/utils.js +7 -1
  57. package/dist/lib/src/value/utils.js.map +1 -1
  58. package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.js +1395 -101
  59. package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.js.map +1 -1
  60. package/dist/package.json +6 -4
  61. package/dist/tool/utils.js +34 -9
  62. package/dist/tool/utils.js.map +1 -1
  63. package/dist/types/compile.d.ts +152 -0
  64. package/dist/types/exception.d.ts +41 -0
  65. package/dist/types/importer.d.ts +294 -0
  66. package/dist/types/index.d.ts +76 -0
  67. package/dist/types/legacy/exception.d.ts +54 -0
  68. package/dist/types/legacy/function.d.ts +652 -0
  69. package/dist/types/legacy/importer.d.ts +168 -0
  70. package/dist/types/legacy/options.d.ts +642 -0
  71. package/dist/types/legacy/plugin_this.d.ts +70 -0
  72. package/dist/types/legacy/render.d.ts +139 -0
  73. package/dist/types/logger/index.d.ts +94 -0
  74. package/dist/types/logger/source_location.d.ts +21 -0
  75. package/dist/types/logger/source_span.d.ts +34 -0
  76. package/dist/types/options.d.ts +408 -0
  77. package/dist/types/util/promise_or.d.ts +17 -0
  78. package/dist/types/value/argument_list.d.ts +47 -0
  79. package/dist/types/value/boolean.d.ts +29 -0
  80. package/dist/types/value/color.d.ts +107 -0
  81. package/dist/types/value/function.d.ts +22 -0
  82. package/dist/types/value/index.d.ts +173 -0
  83. package/dist/types/value/list.d.ts +54 -0
  84. package/dist/types/value/map.d.ts +41 -0
  85. package/dist/types/value/number.d.ts +305 -0
  86. package/dist/types/value/string.d.ts +84 -0
  87. package/package.json +6 -4
  88. package/dist/lib/index.d.ts +0 -10
  89. package/dist/lib/src/compile.d.ts +0 -22
  90. package/dist/lib/src/embedded-compiler/compiler.d.ts +0 -19
  91. package/dist/lib/src/embedded-compiler/compiler.js.map +0 -1
  92. package/dist/lib/src/embedded-compiler/packet-transformer.d.ts +0 -34
  93. package/dist/lib/src/embedded-compiler/packet-transformer.js.map +0 -1
  94. package/dist/lib/src/embedded-protocol/dispatcher.d.ts +0 -60
  95. package/dist/lib/src/embedded-protocol/dispatcher.js.map +0 -1
  96. package/dist/lib/src/embedded-protocol/message-transformer.d.ts +0 -47
  97. package/dist/lib/src/embedded-protocol/message-transformer.js.map +0 -1
  98. package/dist/lib/src/embedded-protocol/request-tracker.d.ts +0 -20
  99. package/dist/lib/src/embedded-protocol/request-tracker.js.map +0 -1
  100. package/dist/lib/src/embedded-protocol/utils.d.ts +0 -7
  101. package/dist/lib/src/embedded-protocol/utils.js.map +0 -1
  102. package/dist/lib/src/exception/exception.d.ts +0 -19
  103. package/dist/lib/src/exception/exception.js +0 -37
  104. package/dist/lib/src/exception/exception.js.map +0 -1
  105. package/dist/lib/src/exception/location.d.ts +0 -11
  106. package/dist/lib/src/exception/location.js +0 -6
  107. package/dist/lib/src/exception/location.js.map +0 -1
  108. package/dist/lib/src/exception/span.d.ts +0 -29
  109. package/dist/lib/src/exception/span.js.map +0 -1
  110. package/dist/lib/src/node-sass/render.d.ts +0 -61
  111. package/dist/lib/src/node-sass/render.js.map +0 -1
  112. package/dist/lib/src/utils.d.ts +0 -16
  113. package/dist/lib/src/value/boolean.d.ts +0 -25
  114. package/dist/lib/src/value/color.d.ts +0 -89
  115. package/dist/lib/src/value/list.d.ts +0 -41
  116. package/dist/lib/src/value/map.d.ts +0 -26
  117. package/dist/lib/src/value/null.d.ts +0 -12
  118. package/dist/lib/src/value/number.d.ts +0 -189
  119. package/dist/lib/src/value/string.d.ts +0 -56
  120. package/dist/lib/src/value/utils.d.ts +0 -44
  121. package/dist/lib/src/value/value.d.ts +0 -108
  122. package/dist/lib/src/value/value.js.map +0 -1
  123. package/dist/lib/src/vendor/embedded-protocol/embedded_sass_pb.d.ts +0 -1
  124. 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
+ }