Socket
Socket
Sign inDemoInstall

less

Package Overview
Dependencies
Maintainers
7
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less - npm Package Compare versions

Comparing version 3.13.1-alpha.1 to 4.0.1-alpha.0

2

index.js

@@ -1,1 +0,1 @@

module.exports = require('./lib/less-node').default;
module.exports = require('./lib/less-node').default;

@@ -0,5 +1,8 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var utils_1 = require("./utils");
var browser_1 = tslib_1.__importDefault(require("./browser"));
var browser_1 = __importDefault(require("./browser"));
exports.default = (function (window, options) {

@@ -6,0 +9,0 @@ // use options from the current script tag data attribues

@@ -0,1 +1,2 @@

"use strict";
/**

@@ -7,7 +8,9 @@ * Kicks off less and compiles any stylesheets

/* global window, document */
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var default_options_1 = tslib_1.__importDefault(require("../less/default-options"));
var add_default_options_1 = tslib_1.__importDefault(require("./add-default-options"));
var index_1 = tslib_1.__importDefault(require("./index"));
var default_options_1 = __importDefault(require("../less/default-options"));
var add_default_options_1 = __importDefault(require("./add-default-options"));
var index_1 = __importDefault(require("./index"));
var options = default_options_1.default();

@@ -14,0 +17,0 @@ if (window.less) {

@@ -0,4 +1,23 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var utils = tslib_1.__importStar(require("./utils"));
var utils = __importStar(require("./utils"));
exports.default = {

@@ -5,0 +24,0 @@ createCSS: function (document, styles, sheet) {

@@ -0,1 +1,2 @@

"use strict";
// Cache system is a bit outdated and could do with work

@@ -2,0 +3,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -0,5 +1,27 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var utils = tslib_1.__importStar(require("./utils"));
var browser_1 = tslib_1.__importDefault(require("./browser"));
var utils = __importStar(require("./utils"));
var browser_1 = __importDefault(require("./browser"));
exports.default = (function (window, less, options) {

@@ -6,0 +28,0 @@ function errorHTML(e, rootHref) {

@@ -0,5 +1,21 @@

"use strict";
/* global window, XMLHttpRequest */
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var abstract_file_manager_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-file-manager.js"));
var abstract_file_manager_js_1 = __importDefault(require("../less/environment/abstract-file-manager.js"));
var options;

@@ -10,3 +26,3 @@ var logger;

var FileManager = /** @class */ (function (_super) {
tslib_1.__extends(FileManager, _super);
__extends(FileManager, _super);
function FileManager() {

@@ -13,0 +29,0 @@ return _super !== null && _super.apply(this, arguments) || this;

@@ -0,4 +1,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var function_registry_1 = tslib_1.__importDefault(require("./../less/functions/function-registry"));
var function_registry_1 = __importDefault(require("./../less/functions/function-registry"));
exports.default = (function () {

@@ -5,0 +8,0 @@ function imageSize() {

@@ -0,3 +1,6 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
//

@@ -8,10 +11,10 @@ // index.js

var utils_1 = require("./utils");
var less_1 = tslib_1.__importDefault(require("../less"));
var browser_1 = tslib_1.__importDefault(require("./browser"));
var file_manager_1 = tslib_1.__importDefault(require("./file-manager"));
var plugin_loader_1 = tslib_1.__importDefault(require("./plugin-loader"));
var log_listener_1 = tslib_1.__importDefault(require("./log-listener"));
var error_reporting_1 = tslib_1.__importDefault(require("./error-reporting"));
var cache_1 = tslib_1.__importDefault(require("./cache"));
var image_size_1 = tslib_1.__importDefault(require("./image-size"));
var less_1 = __importDefault(require("../less"));
var browser_1 = __importDefault(require("./browser"));
var file_manager_1 = __importDefault(require("./file-manager"));
var plugin_loader_1 = __importDefault(require("./plugin-loader"));
var log_listener_1 = __importDefault(require("./log-listener"));
var error_reporting_1 = __importDefault(require("./error-reporting"));
var cache_1 = __importDefault(require("./cache"));
var image_size_1 = __importDefault(require("./image-size"));
exports.default = (function (window, options) {

@@ -18,0 +21,0 @@ var document = window.document;

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ exports.default = (function (less, options) {

@@ -0,6 +1,22 @@

"use strict";
// TODO: Add tests for browser @plugin
/* global window */
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var abstract_plugin_loader_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-plugin-loader.js"));
var abstract_plugin_loader_js_1 = __importDefault(require("../less/environment/abstract-plugin-loader.js"));
/**

@@ -10,3 +26,3 @@ * Browser Plugin Loader

var PluginLoader = /** @class */ (function (_super) {
tslib_1.__extends(PluginLoader, _super);
__extends(PluginLoader, _super);
function PluginLoader(less) {

@@ -13,0 +29,0 @@ var _this = _super.call(this) || this;

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ exports.addDataAttr = exports.extractId = void 0;

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ exports.default = {

@@ -0,8 +1,24 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var path = tslib_1.__importStar(require("path"));
var fs_1 = tslib_1.__importDefault(require("./fs"));
var abstract_file_manager_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-file-manager.js"));
var path_1 = __importDefault(require("path"));
var fs_1 = __importDefault(require("./fs"));
var abstract_file_manager_js_1 = __importDefault(require("../less/environment/abstract-file-manager.js"));
var FileManager = /** @class */ (function (_super) {
tslib_1.__extends(FileManager, _super);
__extends(FileManager, _super);
function FileManager() {

@@ -68,3 +84,3 @@ return _super !== null && _super.apply(this, arguments) || this;

if (paths[i]) {
fullFilename = path.join(paths[i], fullFilename);
fullFilename = path_1.default.join(paths[i], fullFilename);
}

@@ -71,0 +87,0 @@ if (!explicit && paths[i] === '.') {

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ var fs;

@@ -0,6 +1,9 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var dimension_1 = tslib_1.__importDefault(require("../less/tree/dimension"));
var expression_1 = tslib_1.__importDefault(require("../less/tree/expression"));
var function_registry_1 = tslib_1.__importDefault(require("./../less/functions/function-registry"));
var dimension_1 = __importDefault(require("../less/tree/dimension"));
var expression_1 = __importDefault(require("../less/tree/expression"));
var function_registry_1 = __importDefault(require("./../less/functions/function-registry"));
exports.default = (function (environment) {

@@ -7,0 +10,0 @@ function imageSize(functionContext, filePathNode) {

@@ -0,25 +1,24 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var environment_1 = tslib_1.__importDefault(require("./environment"));
var file_manager_1 = tslib_1.__importDefault(require("./file-manager"));
var url_file_manager_1 = tslib_1.__importDefault(require("./url-file-manager"));
var less_1 = tslib_1.__importDefault(require("../less"));
var lessc_helper_1 = tslib_1.__importDefault(require("./lessc-helper"));
var plugin_loader_1 = tslib_1.__importDefault(require("./plugin-loader"));
var fs_1 = tslib_1.__importDefault(require("./fs"));
var default_options_1 = tslib_1.__importDefault(require("../less/default-options"));
var image_size_1 = tslib_1.__importDefault(require("./image-size"));
var environment_1 = __importDefault(require("./environment"));
var file_manager_1 = __importDefault(require("./file-manager"));
var url_file_manager_1 = __importDefault(require("./url-file-manager"));
var less_1 = __importDefault(require("../less"));
var less = less_1.default(environment_1.default, [new file_manager_1.default(), new url_file_manager_1.default()]);
var lessc_helper_1 = __importDefault(require("./lessc-helper"));
// allow people to create less with their own environment
less.createFromEnvironment = less_1.default;
less.lesscHelper = lessc_helper_1.default;
less.PluginLoader = plugin_loader_1.default;
less.fs = fs_1.default;
less.PluginLoader = require('./plugin-loader').default;
less.fs = require('./fs').default;
less.FileManager = file_manager_1.default;
less.UrlFileManager = url_file_manager_1.default;
// Set up options
less.options = default_options_1.default();
less.options = require('../less/default-options').default();
// provide image-size functionality
image_size_1.default(less.environment);
require('./image-size').default(less.environment);
exports.default = less;
//# sourceMappingURL=index.js.map

@@ -0,5 +1,21 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var path = tslib_1.__importStar(require("path"));
var abstract_plugin_loader_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-plugin-loader.js"));
var path_1 = __importDefault(require("path"));
var abstract_plugin_loader_js_1 = __importDefault(require("../less/environment/abstract-plugin-loader.js"));
/**

@@ -9,3 +25,3 @@ * Node Plugin Loader

var PluginLoader = /** @class */ (function (_super) {
tslib_1.__extends(PluginLoader, _super);
__extends(PluginLoader, _super);
function PluginLoader(less) {

@@ -15,7 +31,7 @@ var _this = _super.call(this) || this;

_this.require = function (prefix) {
prefix = path.dirname(prefix);
prefix = path_1.default.dirname(prefix);
return function (id) {
var str = id.substr(0, 2);
if (str === '..' || str === './') {
return require(path.join(prefix, id));
return require(path_1.default.join(prefix, id));
}

@@ -22,0 +38,0 @@ else {

@@ -0,10 +1,26 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var isUrlRe = /^(?:https?:)?\/\//i;
var url_1 = tslib_1.__importDefault(require("url"));
var url_1 = __importDefault(require("url"));
var request;
var abstract_file_manager_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-file-manager.js"));
var logger_1 = tslib_1.__importDefault(require("../less/logger"));
var abstract_file_manager_js_1 = __importDefault(require("../less/environment/abstract-file-manager.js"));
var logger_1 = __importDefault(require("../less/logger"));
var UrlFileManager = /** @class */ (function (_super) {
tslib_1.__extends(UrlFileManager, _super);
__extends(UrlFileManager, _super);
function UrlFileManager() {

@@ -11,0 +27,0 @@ return _super !== null && _super.apply(this, arguments) || this;

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -7,3 +8,2 @@ exports.RewriteUrls = exports.Math = void 0;

PARENS: 2,
STRICT_LEGACY: 3
};

@@ -10,0 +10,0 @@ exports.RewriteUrls = {

@@ -0,6 +1,25 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var contexts = {};
exports.default = contexts;
var Constants = tslib_1.__importStar(require("./constants"));
var Constants = __importStar(require("./constants"));
var copyFromOriginal = function copyFromOriginal(original, destination, propertiesToCopy) {

@@ -56,2 +75,87 @@ if (!original) {

];
contexts.Eval = function (options, frames) {
copyFromOriginal(options, this, evalCopyProperties);
if (typeof this.paths === 'string') {
this.paths = [this.paths];
}
this.frames = frames || [];
this.importantScope = this.importantScope || [];
};
contexts.Eval.prototype.enterCalc = function () {
if (!this.calcStack) {
this.calcStack = [];
}
this.calcStack.push(true);
this.inCalc = true;
};
contexts.Eval.prototype.exitCalc = function () {
this.calcStack.pop();
if (!this.calcStack.length) {
this.inCalc = false;
}
};
contexts.Eval.prototype.inParenthesis = function () {
if (!this.parensStack) {
this.parensStack = [];
}
this.parensStack.push(true);
};
contexts.Eval.prototype.outOfParenthesis = function () {
this.parensStack.pop();
};
contexts.Eval.prototype.inCalc = false;
contexts.Eval.prototype.mathOn = true;
contexts.Eval.prototype.isMathOn = function (op) {
if (!this.mathOn) {
return false;
}
if (op === '/' && this.math !== Constants.Math.ALWAYS && (!this.parensStack || !this.parensStack.length)) {
return false;
}
if (this.math > Constants.Math.PARENS_DIVISION) {
return this.parensStack && this.parensStack.length;
}
return true;
};
contexts.Eval.prototype.pathRequiresRewrite = function (path) {
var isRelative = this.rewriteUrls === Constants.RewriteUrls.LOCAL ? isPathLocalRelative : isPathRelative;
return isRelative(path);
};
contexts.Eval.prototype.rewritePath = function (path, rootpath) {
var newPath;
rootpath = rootpath || '';
newPath = this.normalizePath(rootpath + path);
// If a path was explicit relative and the rootpath was not an absolute path
// we must ensure that the new path is also explicit relative.
if (isPathLocalRelative(path) &&
isPathRelative(rootpath) &&
isPathLocalRelative(newPath) === false) {
newPath = "./" + newPath;
}
return newPath;
};
contexts.Eval.prototype.normalizePath = function (path) {
var segments = path.split('/').reverse();
var segment;
path = [];
while (segments.length !== 0) {
segment = segments.pop();
switch (segment) {
case '.':
break;
case '..':
if ((path.length === 0) || (path[path.length - 1] === '..')) {
path.push(segment);
}
else {
path.pop();
}
break;
default:
path.push(segment);
break;
}
}
return path.join('/');
};
function isPathRelative(path) {

@@ -63,92 +167,3 @@ return !/^(?:[a-z-]+:|\/|#)/i.test(path);

}
contexts.Eval = /** @class */ (function () {
function Eval(options, frames) {
copyFromOriginal(options, this, evalCopyProperties);
if (typeof this.paths === 'string') {
this.paths = [this.paths];
}
this.frames = frames || [];
this.importantScope = this.importantScope || [];
this.inCalc = false;
this.mathOn = true;
}
Eval.prototype.enterCalc = function () {
if (!this.calcStack) {
this.calcStack = [];
}
this.calcStack.push(true);
this.inCalc = true;
};
Eval.prototype.exitCalc = function () {
this.calcStack.pop();
if (!this.calcStack.length) {
this.inCalc = false;
}
};
Eval.prototype.inParenthesis = function () {
if (!this.parensStack) {
this.parensStack = [];
}
this.parensStack.push(true);
};
;
Eval.prototype.outOfParenthesis = function () {
this.parensStack.pop();
};
;
Eval.prototype.isMathOn = function (op) {
if (!this.mathOn) {
return false;
}
if (op === '/' && this.math !== Constants.Math.ALWAYS && (!this.parensStack || !this.parensStack.length)) {
return false;
}
if (this.math > Constants.Math.PARENS_DIVISION) {
return this.parensStack && this.parensStack.length;
}
return true;
};
Eval.prototype.pathRequiresRewrite = function (path) {
var isRelative = this.rewriteUrls === Constants.RewriteUrls.LOCAL ? isPathLocalRelative : isPathRelative;
return isRelative(path);
};
Eval.prototype.rewritePath = function (path, rootpath) {
var newPath;
rootpath = rootpath || '';
newPath = this.normalizePath(rootpath + path);
// If a path was explicit relative and the rootpath was not an absolute path
// we must ensure that the new path is also explicit relative.
if (isPathLocalRelative(path) &&
isPathRelative(rootpath) &&
isPathLocalRelative(newPath) === false) {
newPath = "./" + newPath;
}
return newPath;
};
Eval.prototype.normalizePath = function (path) {
var segments = path.split('/').reverse();
var segment;
path = [];
while (segments.length !== 0) {
segment = segments.pop();
switch (segment) {
case '.':
break;
case '..':
if ((path.length === 0) || (path[path.length - 1] === '..')) {
path.push(segment);
}
else {
path.pop();
}
break;
default:
path.push(segment);
break;
}
}
return path.join('/');
};
return Eval;
}());
// todo - do the same for the toCSS ?
//# sourceMappingURL=contexts.js.map

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ exports.default = {

@@ -0,6 +1,9 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var colors_1 = tslib_1.__importDefault(require("./colors"));
var unit_conversions_1 = tslib_1.__importDefault(require("./unit-conversions"));
var colors_1 = __importDefault(require("./colors"));
var unit_conversions_1 = __importDefault(require("./unit-conversions"));
exports.default = { colors: colors_1.default, unitConversions: unit_conversions_1.default };
//# sourceMappingURL=index.js.map

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ exports.default = {

@@ -0,56 +1,61 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Export a new default each time
exports.default = (function () { return ({
/* Inline Javascript - @plugin still allowed */
javascriptEnabled: false,
/* Outputs a makefile import dependency list to stdout. */
depends: false,
/* (DEPRECATED) Compress using less built-in compression.
* This does an okay job but does not utilise all the tricks of
* dedicated css compression. */
compress: false,
/* Runs the less parser and just reports errors without any output. */
lint: false,
/* Sets available include paths.
* If the file in an @import rule does not exist at that exact location,
* less will look for it at the location(s) passed to this option.
* You might use this for instance to specify a path to a library which
* you want to be referenced simply and relatively in the less files. */
paths: [],
/* color output in the terminal */
color: true,
/* The strictImports controls whether the compiler will allow an @import inside of either
* @media blocks or (a later addition) other selector blocks.
* See: https://github.com/less/less.js/issues/656 */
strictImports: false,
/* Allow Imports from Insecure HTTPS Hosts */
insecure: false,
/* Allows you to add a path to every generated import and url in your css.
* This does not affect less import statements that are processed, just ones
* that are left in the output css. */
rootpath: '',
/* By default URLs are kept as-is, so if you import a file in a sub-directory
* that references an image, exactly the same URL will be output in the css.
* This option allows you to re-write URL's in imported files so that the
* URL is always relative to the base imported file */
rewriteUrls: false,
/* How to process math
* 0 always - eagerly try to solve all operations
* 1 parens-division - require parens for division "/"
* 2 parens | strict - require parens for all operations
* 3 strict-legacy - legacy strict behavior (super-strict)
*/
math: 0,
/* Without this option, less attempts to guess at the output unit when it does maths. */
strictUnits: false,
/* Effectively the declaration is put at the top of your base Less file,
* meaning it can be used but it also can be overridden if this variable
* is defined in the file. */
globalVars: null,
/* As opposed to the global variable option, this puts the declaration at the
* end of your base file, meaning it will override anything defined in your Less file. */
modifyVars: null,
/* This option allows you to specify a argument to go on to every URL. */
urlArgs: ''
}); });
function default_1() {
return {
/* Inline Javascript - @plugin still allowed */
javascriptEnabled: false,
/* Outputs a makefile import dependency list to stdout. */
depends: false,
/* (DEPRECATED) Compress using less built-in compression.
* This does an okay job but does not utilise all the tricks of
* dedicated css compression. */
compress: false,
/* Runs the less parser and just reports errors without any output. */
lint: false,
/* Sets available include paths.
* If the file in an @import rule does not exist at that exact location,
* less will look for it at the location(s) passed to this option.
* You might use this for instance to specify a path to a library which
* you want to be referenced simply and relatively in the less files. */
paths: [],
/* color output in the terminal */
color: true,
/* The strictImports controls whether the compiler will allow an @import inside of either
* @media blocks or (a later addition) other selector blocks.
* See: https://github.com/less/less.js/issues/656 */
strictImports: false,
/* Allow Imports from Insecure HTTPS Hosts */
insecure: false,
/* Allows you to add a path to every generated import and url in your css.
* This does not affect less import statements that are processed, just ones
* that are left in the output css. */
rootpath: '',
/* By default URLs are kept as-is, so if you import a file in a sub-directory
* that references an image, exactly the same URL will be output in the css.
* This option allows you to re-write URL's in imported files so that the
* URL is always relative to the base imported file */
rewriteUrls: false,
/* How to process math
* 0 always - eagerly try to solve all operations
* 1 parens-division - require parens for division "/"
* 2 parens | strict - require parens for all operations
* 3 strict-legacy - legacy strict behavior (super-strict)
*/
math: 1,
/* Without this option, less attempts to guess at the output unit when it does maths. */
strictUnits: false,
/* Effectively the declaration is put at the top of your base Less file,
* meaning it can be used but it also can be overridden if this variable
* is defined in the file. */
globalVars: null,
/* As opposed to the global variable option, this puts the declaration at the
* end of your base file, meaning it will override anything defined in your Less file. */
modifyVars: null,
/* This option allows you to specify a argument to go on to every URL. */
urlArgs: ''
};
}
exports.default = default_1;
;
//# sourceMappingURL=default-options.js.map

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -25,5 +26,8 @@ var AbstractFileManager = /** @class */ (function () {

};
;
AbstractFileManager.prototype.supportsSync = function () { return false; };
AbstractFileManager.prototype.alwaysMakePathsAbsolute = function () { return false; };
AbstractFileManager.prototype.supportsSync = function () {
return false;
};
AbstractFileManager.prototype.alwaysMakePathsAbsolute = function () {
return false;
};
AbstractFileManager.prototype.isPathAbsolute = function (filename) {

@@ -39,3 +43,2 @@ return (/^(?:[a-z-]+:|\/|\\|#)/i).test(filename);

};
;
AbstractFileManager.prototype.pathDiff = function (url, baseUrl) {

@@ -69,3 +72,2 @@ // diff between two paths to create a relative path

};
;
// helper function, not part of API

@@ -120,3 +122,2 @@ AbstractFileManager.prototype.extractUrlParts = function (url, baseUrl) {

};
;
return AbstractFileManager;

@@ -123,0 +124,0 @@ }());

@@ -0,18 +1,17 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var function_registry_1 = tslib_1.__importDefault(require("../functions/function-registry"));
var less_error_1 = tslib_1.__importDefault(require("../less-error"));
var function_registry_1 = __importDefault(require("../functions/function-registry"));
var less_error_1 = __importDefault(require("../less-error"));
var AbstractPluginLoader = /** @class */ (function () {
function AbstractPluginLoader() {
// Implemented by Node.js plugin loader
this.require = function () { return null; };
this.require = function () {
return null;
};
}
AbstractPluginLoader.prototype.evalPlugin = function (contents, context, imports, pluginOptions, fileInfo) {
var loader;
var registry;
var pluginObj;
var localModule;
var pluginManager;
var filename;
var result;
var loader, registry, pluginObj, localModule, pluginManager, filename, result;
pluginManager = context.pluginManager;

@@ -19,0 +18,0 @@ if (fileInfo) {

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ exports.default = {

@@ -0,1 +1,2 @@

"use strict";
/**

@@ -5,7 +6,9 @@ * @todo Document why this abstraction exists, and the relationship between

*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var logger_1 = tslib_1.__importDefault(require("../logger"));
var environment = /** @class */ (function () {
function environment(externalEnvironment, fileManagers) {
var logger_1 = __importDefault(require("../logger"));
var Environment = /** @class */ (function () {
function Environment(externalEnvironment, fileManagers) {
this.fileManagers = fileManagers || [];

@@ -27,3 +30,3 @@ externalEnvironment = externalEnvironment || {};

}
environment.prototype.getFileManager = function (filename, currentDirectory, options, environment, isSync) {
Environment.prototype.getFileManager = function (filename, currentDirectory, options, environment, isSync) {
if (!filename) {

@@ -47,11 +50,11 @@ logger_1.default.warn('getFileManager called with no filename.. Please report this issue. continuing.');

};
environment.prototype.addFileManager = function (fileManager) {
Environment.prototype.addFileManager = function (fileManager) {
this.fileManagers.push(fileManager);
};
environment.prototype.clearFileManagers = function () {
Environment.prototype.clearFileManagers = function () {
this.fileManagers = [];
};
return environment;
return Environment;
}());
exports.default = environment;
exports.default = Environment;
//# sourceMappingURL=environment.js.map

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ exports.default = {

@@ -0,5 +1,8 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
var keyword_1 = tslib_1.__importDefault(require("../tree/keyword"));
var anonymous_1 = __importDefault(require("../tree/anonymous"));
var keyword_1 = __importDefault(require("../tree/keyword"));
function boolean(condition) {

@@ -6,0 +9,0 @@ return condition ? keyword_1.default.True : keyword_1.default.False;

@@ -0,4 +1,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var color_1 = tslib_1.__importDefault(require("../tree/color"));
var color_1 = __importDefault(require("../tree/color"));
// Color Blending

@@ -5,0 +8,0 @@ // ref: http://www.w3.org/TR/compositing-1

@@ -0,7 +1,12 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
var color_1 = tslib_1.__importDefault(require("../tree/color"));
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
var dimension_1 = __importDefault(require("../tree/dimension"));
var color_1 = __importDefault(require("../tree/color"));
var quoted_1 = __importDefault(require("../tree/quoted"));
var anonymous_1 = __importDefault(require("../tree/anonymous"));
var expression_1 = __importDefault(require("../tree/expression"));
var operation_1 = __importDefault(require("../tree/operation"));
var colorFunctions;

@@ -64,3 +69,23 @@ function clamp(val) {

rgb: function (r, g, b) {
var color = colorFunctions.rgba(r, g, b, 1.0);
var a = 1;
/**
* Comma-less syntax
* e.g. rgb(0 128 255 / 50%)
*/
if (r instanceof expression_1.default) {
var val = r.value;
r = val[0];
g = val[1];
b = val[2];
/**
* @todo - should this be normalized in
* function caller? Or parsed differently?
*/
if (b instanceof operation_1.default) {
var op = b;
b = op.operands[0];
a = op.operands[1];
}
}
var color = colorFunctions.rgba(r, g, b, a);
if (color) {

@@ -89,3 +114,15 @@ color.value = 'rgb';

hsl: function (h, s, l) {
var color = colorFunctions.hsla(h, s, l, 1.0);
var a = 1;
if (h instanceof expression_1.default) {
var val = h.value;
h = val[0];
s = val[1];
l = val[2];
if (l instanceof operation_1.default) {
var op = l;
l = op.operands[0];
a = op.operands[1];
}
}
var color = colorFunctions.hsla(h, s, l, a);
if (color) {

@@ -92,0 +129,0 @@ color.value = 'hsl';

@@ -0,7 +1,29 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
var url_1 = tslib_1.__importDefault(require("../tree/url"));
var utils = tslib_1.__importStar(require("../utils"));
var logger_1 = tslib_1.__importDefault(require("../logger"));
var quoted_1 = __importDefault(require("../tree/quoted"));
var url_1 = __importDefault(require("../tree/url"));
var utils = __importStar(require("../utils"));
var logger_1 = __importDefault(require("../logger"));
exports.default = (function (environment) {

@@ -8,0 +30,0 @@ var fallback = function (functionThis, node) { return new url_1.default(node, functionThis.index, functionThis.currentFileInfo).eval(functionThis.context); };

@@ -0,4 +1,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var keyword_1 = tslib_1.__importDefault(require("../tree/keyword"));
var keyword_1 = __importDefault(require("../tree/keyword"));
var defaultFunc = {

@@ -5,0 +8,0 @@ eval: function () {

@@ -0,4 +1,14 @@

"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var expression_1 = tslib_1.__importDefault(require("../tree/expression"));
var expression_1 = __importDefault(require("../tree/expression"));
var functionCaller = /** @class */ (function () {

@@ -17,2 +27,5 @@ function functionCaller(name, context, index, currentFileInfo) {

var _this = this;
if (!(Array.isArray(args))) {
args = [args];
}
var evalArgs = this.func.evalArgs;

@@ -22,31 +35,21 @@ if (evalArgs !== false) {

}
var commentFilter = function (item) { return !(item.type === 'Comment'); };
// This code is terrible and should be replaced as per this issue...
// https://github.com/less/less.js/issues/2477
if (Array.isArray(args)) {
args = args.filter(function (item) {
if (item.type === 'Comment') {
return false;
args = args
.filter(commentFilter)
.map(function (item) {
if (item.type === 'Expression') {
var subNodes = item.value.filter(commentFilter);
if (subNodes.length === 1) {
return subNodes[0];
}
return true;
})
.map(function (item) {
if (item.type === 'Expression') {
var subNodes = item.value.filter(function (item) {
if (item.type === 'Comment') {
return false;
}
return true;
});
if (subNodes.length === 1) {
return subNodes[0];
}
else {
return new expression_1.default(subNodes);
}
else {
return new expression_1.default(subNodes);
}
return item;
});
}
}
return item;
});
if (evalArgs === false) {
return this.func.apply(this, tslib_1.__spreadArrays([this.context], args));
return this.func.apply(this, __spreadArrays([this.context], args));
}

@@ -53,0 +56,0 @@ return this.func.apply(this, args);

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ function makeRegistry(base) {

@@ -0,16 +1,19 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var function_registry_1 = tslib_1.__importDefault(require("./function-registry"));
var function_caller_1 = tslib_1.__importDefault(require("./function-caller"));
var boolean_1 = tslib_1.__importDefault(require("./boolean"));
var default_1 = tslib_1.__importDefault(require("./default"));
var color_1 = tslib_1.__importDefault(require("./color"));
var color_blending_1 = tslib_1.__importDefault(require("./color-blending"));
var data_uri_1 = tslib_1.__importDefault(require("./data-uri"));
var list_1 = tslib_1.__importDefault(require("./list"));
var math_1 = tslib_1.__importDefault(require("./math"));
var number_1 = tslib_1.__importDefault(require("./number"));
var string_1 = tslib_1.__importDefault(require("./string"));
var svg_1 = tslib_1.__importDefault(require("./svg"));
var types_1 = tslib_1.__importDefault(require("./types"));
var function_registry_1 = __importDefault(require("./function-registry"));
var function_caller_1 = __importDefault(require("./function-caller"));
var boolean_1 = __importDefault(require("./boolean"));
var default_1 = __importDefault(require("./default"));
var color_1 = __importDefault(require("./color"));
var color_blending_1 = __importDefault(require("./color-blending"));
var data_uri_1 = __importDefault(require("./data-uri"));
var list_1 = __importDefault(require("./list"));
var math_1 = __importDefault(require("./math"));
var number_1 = __importDefault(require("./number"));
var string_1 = __importDefault(require("./string"));
var svg_1 = __importDefault(require("./svg"));
var types_1 = __importDefault(require("./types"));
exports.default = (function (environment) {

@@ -17,0 +20,0 @@ var functions = { functionRegistry: function_registry_1.default, functionCaller: function_caller_1.default };

@@ -0,12 +1,16 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var comment_1 = tslib_1.__importDefault(require("../tree/comment"));
var node_1 = tslib_1.__importDefault(require("../tree/node"));
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
var declaration_1 = tslib_1.__importDefault(require("../tree/declaration"));
var expression_1 = tslib_1.__importDefault(require("../tree/expression"));
var ruleset_1 = tslib_1.__importDefault(require("../tree/ruleset"));
var selector_1 = tslib_1.__importDefault(require("../tree/selector"));
var element_1 = tslib_1.__importDefault(require("../tree/element"));
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
var comment_1 = __importDefault(require("../tree/comment"));
var node_1 = __importDefault(require("../tree/node"));
var dimension_1 = __importDefault(require("../tree/dimension"));
var declaration_1 = __importDefault(require("../tree/declaration"));
var expression_1 = __importDefault(require("../tree/expression"));
var ruleset_1 = __importDefault(require("../tree/ruleset"));
var selector_1 = __importDefault(require("../tree/selector"));
var element_1 = __importDefault(require("../tree/element"));
var quoted_1 = __importDefault(require("../tree/quoted"));
var value_1 = __importDefault(require("../tree/value"));
var getItemsFromNode = function (node) {

@@ -23,2 +27,12 @@ // handle non-array values as an array of length 1

},
'~': function () {
var expr = [];
for (var _i = 0; _i < arguments.length; _i++) {
expr[_i] = arguments[_i];
}
if (expr.length === 1) {
return expr[0];
}
return new value_1.default(expr);
},
extract: function (values, index) {

@@ -25,0 +39,0 @@ // (1-based index)

@@ -0,4 +1,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
var dimension_1 = __importDefault(require("../tree/dimension"));
var MathHelper = function (fn, unit, n) {

@@ -5,0 +8,0 @@ if (!(n instanceof dimension_1.default)) {

@@ -0,4 +1,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var math_helper_js_1 = tslib_1.__importDefault(require("./math-helper.js"));
var math_helper_js_1 = __importDefault(require("./math-helper.js"));
var mathFunctions = {

@@ -5,0 +8,0 @@ // name, unit

@@ -0,6 +1,9 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
var math_helper_js_1 = tslib_1.__importDefault(require("./math-helper.js"));
var dimension_1 = __importDefault(require("../tree/dimension"));
var anonymous_1 = __importDefault(require("../tree/anonymous"));
var math_helper_js_1 = __importDefault(require("./math-helper.js"));
var minMax = function (isMin, args) {

@@ -62,3 +65,6 @@ args = Array.prototype.slice.call(args);

}
return minMax(true, args);
try {
return minMax(true, args);
}
catch (e) { }
},

@@ -70,3 +76,6 @@ max: function () {

}
return minMax(false, args);
try {
return minMax(false, args);
}
catch (e) { }
},

@@ -73,0 +82,0 @@ convert: function (val, unit) {

@@ -0,6 +1,9 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
var javascript_1 = tslib_1.__importDefault(require("../tree/javascript"));
var quoted_1 = __importDefault(require("../tree/quoted"));
var anonymous_1 = __importDefault(require("../tree/anonymous"));
var javascript_1 = __importDefault(require("../tree/javascript"));
exports.default = {

@@ -7,0 +10,0 @@ e: function (str) {

@@ -0,8 +1,11 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
var color_1 = tslib_1.__importDefault(require("../tree/color"));
var expression_1 = tslib_1.__importDefault(require("../tree/expression"));
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
var url_1 = tslib_1.__importDefault(require("../tree/url"));
var dimension_1 = __importDefault(require("../tree/dimension"));
var color_1 = __importDefault(require("../tree/color"));
var expression_1 = __importDefault(require("../tree/expression"));
var quoted_1 = __importDefault(require("../tree/quoted"));
var url_1 = __importDefault(require("../tree/url"));
exports.default = (function (environment) {

@@ -9,0 +12,0 @@ return { 'svg-gradient': function (direction) {

@@ -0,11 +1,14 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var keyword_1 = tslib_1.__importDefault(require("../tree/keyword"));
var detached_ruleset_1 = tslib_1.__importDefault(require("../tree/detached-ruleset"));
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
var color_1 = tslib_1.__importDefault(require("../tree/color"));
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
var url_1 = tslib_1.__importDefault(require("../tree/url"));
var operation_1 = tslib_1.__importDefault(require("../tree/operation"));
var keyword_1 = __importDefault(require("../tree/keyword"));
var detached_ruleset_1 = __importDefault(require("../tree/detached-ruleset"));
var dimension_1 = __importDefault(require("../tree/dimension"));
var color_1 = __importDefault(require("../tree/color"));
var quoted_1 = __importDefault(require("../tree/quoted"));
var anonymous_1 = __importDefault(require("../tree/anonymous"));
var url_1 = __importDefault(require("../tree/url"));
var operation_1 = __importDefault(require("../tree/operation"));
var isa = function (n, Type) { return (n instanceof Type) ? keyword_1.default.True : keyword_1.default.False; };

@@ -12,0 +15,0 @@ var isunit = function (n, unit) {

@@ -0,9 +1,31 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var contexts_1 = tslib_1.__importDefault(require("./contexts"));
var parser_1 = tslib_1.__importDefault(require("./parser/parser"));
var less_error_1 = tslib_1.__importDefault(require("./less-error"));
var utils = tslib_1.__importStar(require("./utils"));
var logger_1 = tslib_1.__importDefault(require("./logger"));
exports.default = (function (environment) {
var contexts_1 = __importDefault(require("./contexts"));
var parser_1 = __importDefault(require("./parser/parser"));
var less_error_1 = __importDefault(require("./less-error"));
var utils = __importStar(require("./utils"));
var logger_1 = __importDefault(require("./logger"));
function default_1(environment) {
// FileInfo = {

@@ -29,4 +51,3 @@ // 'rewriteUrls' - option - whether to adjust URL's to be relative

this.queue = []; // Files which haven't been imported yet
this.files = []; // List of files imported
this.fileCache = {}; // Holds the imported parse trees.
this.files = {}; // Holds the imported parse trees.
}

@@ -42,4 +63,3 @@ /**

ImportManager.prototype.push = function (path, tryAppendExtension, currentFileInfo, importOptions, callback) {
var importManager = this;
var pluginLoader = this.context.pluginManager.Loader;
var importManager = this, pluginLoader = this.context.pluginManager.Loader;
this.queue.push(path);

@@ -54,12 +74,7 @@ var fileParsedFunc = function (e, root, fullPath) {

else {
var files = importManager.files;
var cache = importManager.fileCache;
if (files.indexOf(fullPath) === -1) {
files.push(fullPath);
}
// Inline imports aren't cached here.
// If we start to cache them, please make sure they won't conflict with non-inline imports of the
// same name as they used to do before this comment and the condition below have been added.
if (!cache[fullPath] && !importOptions.inline) {
cache[fullPath] = { root: root, options: importOptions };
if (!importManager.files[fullPath] && !importOptions.inline) {
importManager.files[fullPath] = { root: root, options: importOptions };
}

@@ -122,9 +137,8 @@ if (e && !importManager.error) {

else {
var cache = importManager.fileCache;
// import (multiple) parse trees apparently get altered and can't be cached.
// TODO: investigate why this is
if (cache[resolvedFilename]
&& !cache[resolvedFilename].options.multiple
if (importManager.files[resolvedFilename]
&& !importManager.files[resolvedFilename].options.multiple
&& !importOptions.multiple) {
fileParsedFunc(null, cache[resolvedFilename].root, resolvedFilename);
fileParsedFunc(null, importManager.files[resolvedFilename].root, resolvedFilename);
}

@@ -183,3 +197,5 @@ else {

return ImportManager;
});
}
exports.default = default_1;
;
//# sourceMappingURL=import-manager.js.map

@@ -0,45 +1,56 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var data_1 = tslib_1.__importDefault(require("./data"));
var tree_1 = tslib_1.__importDefault(require("./tree"));
var environment_1 = tslib_1.__importDefault(require("./environment/environment"));
var abstract_file_manager_1 = tslib_1.__importDefault(require("./environment/abstract-file-manager"));
var abstract_plugin_loader_1 = tslib_1.__importDefault(require("./environment/abstract-plugin-loader"));
var visitors_1 = tslib_1.__importDefault(require("./visitors"));
var parser_1 = tslib_1.__importDefault(require("./parser/parser"));
var functions_1 = tslib_1.__importDefault(require("./functions"));
var contexts_1 = tslib_1.__importDefault(require("./contexts"));
var source_map_output_1 = tslib_1.__importDefault(require("./source-map-output"));
var source_map_builder_1 = tslib_1.__importDefault(require("./source-map-builder"));
var parse_tree_1 = tslib_1.__importDefault(require("./parse-tree"));
var import_manager_1 = tslib_1.__importDefault(require("./import-manager"));
var render_1 = tslib_1.__importDefault(require("./render"));
var parse_1 = tslib_1.__importDefault(require("./parse"));
var less_error_1 = tslib_1.__importDefault(require("./less-error"));
var transform_tree_1 = tslib_1.__importDefault(require("./transform-tree"));
var utils = tslib_1.__importStar(require("./utils"));
var plugin_manager_1 = tslib_1.__importDefault(require("./plugin-manager"));
var logger_1 = tslib_1.__importDefault(require("./logger"));
exports.default = (function (environment, fileManagers) {
/**
* @todo
* This original code could be improved quite a bit.
* Many classes / modules currently add side-effects / mutations to passed in objects,
* which makes it hard to refactor and reason about.
*/
var environment_1 = __importDefault(require("./environment/environment"));
var data_1 = __importDefault(require("./data"));
var tree_1 = __importDefault(require("./tree"));
var abstract_file_manager_1 = __importDefault(require("./environment/abstract-file-manager"));
var abstract_plugin_loader_1 = __importDefault(require("./environment/abstract-plugin-loader"));
var visitors_1 = __importDefault(require("./visitors"));
var parser_1 = __importDefault(require("./parser/parser"));
var functions_1 = __importDefault(require("./functions"));
var contexts_1 = __importDefault(require("./contexts"));
var less_error_1 = __importDefault(require("./less-error"));
var transform_tree_1 = __importDefault(require("./transform-tree"));
var utils = __importStar(require("./utils"));
var plugin_manager_1 = __importDefault(require("./plugin-manager"));
var logger_1 = __importDefault(require("./logger"));
var source_map_output_1 = __importDefault(require("./source-map-output"));
var source_map_builder_1 = __importDefault(require("./source-map-builder"));
var parse_tree_1 = __importDefault(require("./parse-tree"));
var import_manager_1 = __importDefault(require("./import-manager"));
var parse_1 = __importDefault(require("./parse"));
var render_1 = __importDefault(require("./render"));
function default_1(environment, fileManagers) {
var sourceMapOutput, sourceMapBuilder, parseTree, importManager;
environment = new environment_1.default(environment, fileManagers);
var SourceMapOutput = source_map_output_1.default(environment);
var SourceMapBuilder = source_map_builder_1.default(SourceMapOutput, environment);
var ParseTree = parse_tree_1.default(SourceMapBuilder);
var ImportManager = import_manager_1.default(environment);
var render = render_1.default(environment, ParseTree, ImportManager);
var parse = parse_1.default(environment, ParseTree, ImportManager);
var functions = functions_1.default(environment);
/**
* @todo
* This root properties / methods need to be organized.
* It's not clear what should / must be public and why.
*/
sourceMapOutput = source_map_output_1.default(environment);
sourceMapBuilder = source_map_builder_1.default(sourceMapOutput, environment);
parseTree = parse_tree_1.default(sourceMapBuilder);
importManager = import_manager_1.default(environment);
var render = render_1.default(environment, parseTree, importManager);
var parse = parse_1.default(environment, parseTree, importManager);
var initial = {
version: [3, 12, 2],
version: [4, 0, 0],
data: data_1.default,

@@ -53,8 +64,8 @@ tree: tree_1.default,

Parser: parser_1.default,
functions: functions,
functions: functions_1.default(environment),
contexts: contexts_1.default,
SourceMapOutput: SourceMapOutput,
SourceMapBuilder: SourceMapBuilder,
ParseTree: ParseTree,
ImportManager: ImportManager,
SourceMapOutput: sourceMapOutput,
SourceMapBuilder: sourceMapBuilder,
ParseTree: parseTree,
ImportManager: importManager,
render: render,

@@ -69,9 +80,9 @@ parse: parse,

// Create a public API
var ctor = function (t) { return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return new (t.bind.apply(t, tslib_1.__spreadArrays([void 0], args)))();
}; };
var ctor = function (t) {
return function () {
var obj = Object.create(t.prototype);
t.apply(obj, Array.prototype.slice.call(arguments, 0));
return obj;
};
};
var t;

@@ -102,3 +113,5 @@ var api = Object.create(initial);

return api;
});
}
exports.default = default_1;
;
//# sourceMappingURL=index.js.map

@@ -0,4 +1,23 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var utils = tslib_1.__importStar(require("./utils"));
var utils = __importStar(require("./utils"));
var anonymousFunc = /(<anonymous>|Function):(\d+):(\d+)/;

@@ -27,3 +46,3 @@ /**

*/
var LessError = function LessError(e, fileContentMap, currentFilename) {
var LessError = function (e, fileContentMap, currentFilename) {
Error.call(this);

@@ -61,4 +80,4 @@ var filename = e.filename || currentFilename;

var match = e.stack.match(anonymousFunc);
var line_1 = parseInt(match[2]);
lineAdjust = 1 - line_1;
var line = parseInt(match[2]);
lineAdjust = 1 - line;
}

@@ -100,3 +119,3 @@ if (found) {

LessError.prototype.toString = function (options) {
if (options === void 0) { options = {}; }
options = options || {};
var message = '';

@@ -103,0 +122,0 @@ var extract = this.extract || [];

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ exports.default = {

@@ -0,7 +1,10 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var less_error_1 = tslib_1.__importDefault(require("./less-error"));
var transform_tree_1 = tslib_1.__importDefault(require("./transform-tree"));
var logger_1 = tslib_1.__importDefault(require("./logger"));
exports.default = (function (SourceMapBuilder) {
var less_error_1 = __importDefault(require("./less-error"));
var transform_tree_1 = __importDefault(require("./transform-tree"));
var logger_1 = __importDefault(require("./logger"));
function default_1(SourceMapBuilder) {
var ParseTree = /** @class */ (function () {

@@ -54,4 +57,8 @@ function ParseTree(root, imports) {

}
var rootFilename = this.imports.rootFilename;
result.imports = this.imports.files.filter(function (file) { return file !== rootFilename; });
result.imports = [];
for (var file in this.imports.files) {
if (this.imports.files.hasOwnProperty(file) && file !== this.imports.rootFilename) {
result.imports.push(file);
}
}
return result;

@@ -62,3 +69,5 @@ };

return ParseTree;
});
}
exports.default = default_1;
;
//# sourceMappingURL=parse-tree.js.map

@@ -0,10 +1,31 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var PromiseConstructor;
var contexts_1 = tslib_1.__importDefault(require("./contexts"));
var parser_1 = tslib_1.__importDefault(require("./parser/parser"));
var plugin_manager_1 = tslib_1.__importDefault(require("./plugin-manager"));
var less_error_1 = tslib_1.__importDefault(require("./less-error"));
var utils = tslib_1.__importStar(require("./utils"));
exports.default = (function (environment, ParseTree, ImportManager) {
var contexts_1 = __importDefault(require("./contexts"));
var parser_1 = __importDefault(require("./parser/parser"));
var plugin_manager_1 = __importDefault(require("./plugin-manager"));
var less_error_1 = __importDefault(require("./less-error"));
var utils = __importStar(require("./utils"));
function default_1(environment, ParseTree, ImportManager) {
var parse = function (input, options, callback) {

@@ -62,4 +83,3 @@ if (typeof options === 'function') {

options.plugins.forEach(function (plugin) {
var evalResult;
var contents;
var evalResult, contents;
if (plugin.fileContent) {

@@ -87,3 +107,5 @@ contents = plugin.fileContent.replace(/^\uFEFF/, '');

return parse;
});
}
exports.default = default_1;
;
//# sourceMappingURL=parse.js.map

@@ -0,4 +1,5 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Split the input into chunks.
exports.default = (function (input, fail) {
function default_1(input, fail) {
var len = input.length;

@@ -145,3 +146,5 @@ var level = 0;

return chunks;
});
}
exports.default = default_1;
;
//# sourceMappingURL=chunker.js.map

@@ -0,4 +1,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var chunker_1 = tslib_1.__importDefault(require("./chunker"));
var chunker_1 = __importDefault(require("./chunker"));
exports.default = (function () {

@@ -5,0 +8,0 @@ var // Less input string

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -148,3 +149,3 @@ /**

var pm;
function PluginManagerFactory(less, newFactory) {
var PluginManagerFactory = function (less, newFactory) {
if (newFactory || !pm) {

@@ -154,6 +155,5 @@ pm = new PluginManager(less);

return pm;
}
;
};
//
exports.default = PluginManagerFactory;
//# sourceMappingURL=plugin-manager.js.map

@@ -0,6 +1,24 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var PromiseConstructor;
var utils = tslib_1.__importStar(require("./utils"));
exports.default = (function (environment, ParseTree, ImportManager) {
var utils = __importStar(require("./utils"));
function default_1(environment, ParseTree, ImportManager) {
var render = function (input, options, callback) {

@@ -45,3 +63,5 @@ if (typeof options === 'function') {

return render;
});
}
exports.default = default_1;
;
//# sourceMappingURL=render.js.map

@@ -0,3 +1,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (function (SourceMapOutput, environment) {
function default_1(SourceMapOutput, environment) {
var SourceMapBuilder = /** @class */ (function () {

@@ -70,3 +71,5 @@ function SourceMapBuilder(options) {

return SourceMapBuilder;
});
}
exports.default = default_1;
;
//# sourceMappingURL=source-map-builder.js.map

@@ -0,3 +1,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (function (environment) {
function default_1(environment) {
var SourceMapOutput = /** @class */ (function () {

@@ -50,7 +51,3 @@ function SourceMapOutput(options) {

}
var lines;
var sourceLines;
var columns;
var sourceColumns;
var i;
var lines, sourceLines, columns, sourceColumns, i;
if (fileInfo && fileInfo.filename) {

@@ -135,3 +132,5 @@ var inputSource = this._contentsMap[fileInfo.filename];

return SourceMapOutput;
});
}
exports.default = default_1;
;
//# sourceMappingURL=source-map-output.js.map

@@ -0,8 +1,11 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var contexts_1 = tslib_1.__importDefault(require("./contexts"));
var visitors_1 = tslib_1.__importDefault(require("./visitors"));
var tree_1 = tslib_1.__importDefault(require("./tree"));
exports.default = (function (root, options) {
if (options === void 0) { options = {}; }
var contexts_1 = __importDefault(require("./contexts"));
var visitors_1 = __importDefault(require("./visitors"));
var tree_1 = __importDefault(require("./tree"));
function default_1(root, options) {
options = options || {};
var evaldRoot;

@@ -89,3 +92,5 @@ var variables = options.variables;

return evaldRoot;
});
}
exports.default = default_1;
;
//# sourceMappingURL=transform-tree.js.map

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var Anonymous = /** @class */ (function (_super) {
tslib_1.__extends(Anonymous, _super);
__extends(Anonymous, _super);
function Anonymous(value, index, currentFileInfo, mapLines, rulesetLike, visibilityInfo) {

@@ -7,0 +23,0 @@ var _this = _super.call(this) || this;

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var Assignment = /** @class */ (function (_super) {
tslib_1.__extends(Assignment, _super);
__extends(Assignment, _super);
function Assignment(key, val) {

@@ -7,0 +23,0 @@ var _this = _super.call(this) || this;

@@ -0,9 +1,25 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var selector_1 = tslib_1.__importDefault(require("./selector"));
var ruleset_1 = tslib_1.__importDefault(require("./ruleset"));
var anonymous_1 = tslib_1.__importDefault(require("./anonymous"));
var node_1 = __importDefault(require("./node"));
var selector_1 = __importDefault(require("./selector"));
var ruleset_1 = __importDefault(require("./ruleset"));
var anonymous_1 = __importDefault(require("./anonymous"));
var AtRule = /** @class */ (function (_super) {
tslib_1.__extends(AtRule, _super);
__extends(AtRule, _super);
function AtRule(name, value, rules, index, currentFileInfo, debugInfo, isRooted, visibilityInfo) {

@@ -36,4 +52,3 @@ var _this = _super.call(this) || this;

AtRule.prototype.accept = function (visitor) {
var value = this.value;
var rules = this.rules;
var value = this.value, rules = this.rules;
if (rules) {

@@ -53,4 +68,3 @@ this.rules = visitor.visitArray(rules);

AtRule.prototype.genCSS = function (context, output) {
var value = this.value;
var rules = this.rules;
var value = this.value, rules = this.rules;
output.add(this.name, this.fileInfo(), this.getIndex());

@@ -69,6 +83,3 @@ if (value) {

AtRule.prototype.eval = function (context) {
var mediaPathBackup;
var mediaBlocksBackup;
var value = this.value;
var rules = this.rules;
var mediaPathBackup, mediaBlocksBackup, value = this.value, rules = this.rules;
// media stored inside other atrule should not bubble over it

@@ -101,9 +112,5 @@ // backpup media bubbling information

AtRule.prototype.find = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this.rules) {
// assuming that there is only one rule at this point - that is how parser constructs the rule
return ruleset_1.default.prototype.find.apply(this.rules[0], args);
return ruleset_1.default.prototype.find.apply(this.rules[0], arguments);
}

@@ -132,4 +139,3 @@ };

// Non-compressed
var tabSetStr = "\n" + Array(context.tabLevel).join(' ');
var tabRuleStr = tabSetStr + " ";
var tabSetStr = "\n" + Array(context.tabLevel).join(' '), tabRuleStr = tabSetStr + " ";
if (!ruleCnt) {

@@ -136,0 +142,0 @@ output.add(" {" + tabSetStr + "}");

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var Attribute = /** @class */ (function (_super) {
tslib_1.__extends(Attribute, _super);
__extends(Attribute, _super);
function Attribute(key, op, value) {

@@ -7,0 +23,0 @@ var _this = _super.call(this) || this;

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var anonymous_1 = tslib_1.__importDefault(require("./anonymous"));
var function_caller_1 = tslib_1.__importDefault(require("../functions/function-caller"));
var node_1 = __importDefault(require("./node"));
var anonymous_1 = __importDefault(require("./anonymous"));
var function_caller_1 = __importDefault(require("../functions/function-caller"));
//

@@ -10,3 +26,3 @@ // A function call node.

var Call = /** @class */ (function (_super) {
tslib_1.__extends(Call, _super);
__extends(Call, _super);
function Call(name, args, index, currentFileInfo) {

@@ -66,3 +82,3 @@ var _this = _super.call(this) || this;

type: e.type || 'Runtime',
message: "error evaluating function `" + this.name + "`" + (e.message ? ": " + e.message : ''),
message: "Error evaluating function `" + this.name + "`" + (e.message ? ": " + e.message : ''),
index: this.getIndex(),

@@ -74,17 +90,17 @@ filename: this.fileInfo().filename,

}
if (result !== null && result !== undefined) {
// Results that that are not nodes are cast as Anonymous nodes
// Falsy values or booleans are returned as empty nodes
if (!(result instanceof node_1.default)) {
if (!result || result === true) {
result = new anonymous_1.default(null);
}
else {
result = new anonymous_1.default(result.toString());
}
}
if (result !== null && result !== undefined) {
// Results that that are not nodes are cast as Anonymous nodes
// Falsy values or booleans are returned as empty nodes
if (!(result instanceof node_1.default)) {
if (!result || result === true) {
result = new anonymous_1.default(null);
}
result._index = this._index;
result._fileInfo = this._fileInfo;
return result;
else {
result = new anonymous_1.default(result.toString());
}
}
result._index = this._index;
result._fileInfo = this._fileInfo;
return result;
}

@@ -91,0 +107,0 @@ var args = this.args.map(function (a) { return a.eval(context); });

@@ -0,5 +1,21 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var colors_1 = tslib_1.__importDefault(require("../data/colors"));
var node_1 = __importDefault(require("./node"));
var colors_1 = __importDefault(require("../data/colors"));
//

@@ -9,3 +25,3 @@ // RGB Colors - #ff0014, #eee

var Color = /** @class */ (function (_super) {
tslib_1.__extends(Color, _super);
__extends(Color, _super);
function Color(rgb, a, originalForm) {

@@ -52,5 +68,3 @@ var _this = _super.call(this) || this;

Color.prototype.luma = function () {
var r = this.rgb[0] / 255;
var g = this.rgb[1] / 255;
var b = this.rgb[2] / 255;
var r = this.rgb[0] / 255, g = this.rgb[1] / 255, b = this.rgb[2] / 255;
r = (r <= 0.03928) ? r / 12.92 : Math.pow(((r + 0.055) / 1.055), 2.4);

@@ -99,3 +113,5 @@ g = (g <= 0.03928) ? g / 12.92 : Math.pow(((g + 0.055) / 1.055), 2.4);

case 'rgba':
args = this.rgb.map(function (c) { return clamp(Math.round(c), 255); }).concat(clamp(alpha, 1));
args = this.rgb.map(function (c) {
return clamp(Math.round(c), 255);
}).concat(clamp(alpha, 1));
break;

@@ -144,8 +160,4 @@ case 'hsla':

Color.prototype.toHSL = function () {
var r = this.rgb[0] / 255;
var g = this.rgb[1] / 255;
var b = this.rgb[2] / 255;
var a = this.alpha;
var max = Math.max(r, g, b);
var min = Math.min(r, g, b);
var r = this.rgb[0] / 255, g = this.rgb[1] / 255, b = this.rgb[2] / 255, a = this.alpha;
var max = Math.max(r, g, b), min = Math.min(r, g, b);
var h;

@@ -177,8 +189,4 @@ var s;

Color.prototype.toHSV = function () {
var r = this.rgb[0] / 255;
var g = this.rgb[1] / 255;
var b = this.rgb[2] / 255;
var a = this.alpha;
var max = Math.max(r, g, b);
var min = Math.min(r, g, b);
var r = this.rgb[0] / 255, g = this.rgb[1] / 255, b = this.rgb[2] / 255, a = this.alpha;
var max = Math.max(r, g, b), min = Math.min(r, g, b);
var h;

@@ -223,2 +231,16 @@ var s;

};
Color.fromKeyword = function (keyword) {
var c;
var key = keyword.toLowerCase();
if (colors_1.default.hasOwnProperty(key)) {
c = new Color(colors_1.default[key].slice(1));
}
else if (key === 'transparent') {
c = new Color([0, 0, 0], 0);
}
if (c) {
c.value = keyword;
return c;
}
};
return Color;

@@ -236,17 +258,3 @@ }(node_1.default));

}
Color.fromKeyword = function (keyword) {
var c;
var key = keyword.toLowerCase();
if (colors_1.default.hasOwnProperty(key)) {
c = new Color(colors_1.default[key].slice(1));
}
else if (key === 'transparent') {
c = new Color([0, 0, 0], 0);
}
if (c) {
c.value = keyword;
return c;
}
};
exports.default = Color;
//# sourceMappingURL=color.js.map

@@ -0,4 +1,20 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var _noSpaceCombinators = {

@@ -10,3 +26,3 @@ '': true,

var Combinator = /** @class */ (function (_super) {
tslib_1.__extends(Combinator, _super);
__extends(Combinator, _super);
function Combinator(value) {

@@ -13,0 +29,0 @@ var _this = _super.call(this) || this;

@@ -0,7 +1,23 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var debug_info_1 = tslib_1.__importDefault(require("./debug-info"));
var node_1 = __importDefault(require("./node"));
var debug_info_1 = __importDefault(require("./debug-info"));
var Comment = /** @class */ (function (_super) {
tslib_1.__extends(Comment, _super);
__extends(Comment, _super);
function Comment(value, isLineComment, index, currentFileInfo) {

@@ -8,0 +24,0 @@ var _this = _super.call(this) || this;

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var Condition = /** @class */ (function (_super) {
tslib_1.__extends(Condition, _super);
__extends(Condition, _super);
function Condition(op, l, r, i, negate) {

@@ -7,0 +23,0 @@ var _this = _super.call(this) || this;

@@ -0,36 +1,39 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var debugInfo = function (context, ctx, lineSeparator) {
var result = '';
if (context.dumpLineNumbers && !context.compress) {
switch (context.dumpLineNumbers) {
case 'comments':
result = debugInfo.asComment(ctx);
break;
case 'mediaquery':
result = debugInfo.asMediaQuery(ctx);
break;
case 'all':
result = debugInfo.asComment(ctx) + (lineSeparator || '') + debugInfo.asMediaQuery(ctx);
break;
var debugInfo = /** @class */ (function () {
function debugInfo(context, ctx, lineSeparator) {
var result = '';
if (context.dumpLineNumbers && !context.compress) {
switch (context.dumpLineNumbers) {
case 'comments':
result = debugInfo.asComment(ctx);
break;
case 'mediaquery':
result = debugInfo.asMediaQuery(ctx);
break;
case 'all':
result = debugInfo.asComment(ctx) + (lineSeparator || '') + debugInfo.asMediaQuery(ctx);
break;
}
}
return result;
}
return result;
};
debugInfo.asComment = function (ctx) { return ctx.debugInfo ? "/* line " + ctx.debugInfo.lineNumber + ", " + ctx.debugInfo.fileName + " */\n" : ''; };
debugInfo.asMediaQuery = function (ctx) {
if (!ctx.debugInfo) {
return '';
}
var filenameWithProtocol = ctx.debugInfo.fileName;
if (!/^[a-z]+:\/\//i.test(filenameWithProtocol)) {
filenameWithProtocol = "file://" + filenameWithProtocol;
}
return "@media -sass-debug-info{filename{font-family:" + filenameWithProtocol.replace(/([.:\/\\])/g, function (a) {
if (a == '\\') {
a = '\/';
debugInfo.asComment = function (ctx) {
return "/* line " + ctx.debugInfo.lineNumber + ", " + ctx.debugInfo.fileName + " */\n";
};
debugInfo.asMediaQuery = function (ctx) {
var filenameWithProtocol = ctx.debugInfo.fileName;
if (!/^[a-z]+:\/\//i.test(filenameWithProtocol)) {
filenameWithProtocol = "file://" + filenameWithProtocol;
}
return "\\" + a;
}) + "}line{font-family:\\00003" + ctx.debugInfo.lineNumber + "}}\n";
};
return "@media -sass-debug-info{filename{font-family:" + filenameWithProtocol.replace(/([.:\/\\])/g, function (a) {
if (a == '\\') {
a = '\/';
}
return "\\" + a;
}) + "}line{font-family:\\00003" + ctx.debugInfo.lineNumber + "}}\n";
};
return debugInfo;
}());
exports.default = debugInfo;
//# sourceMappingURL=debug-info.js.map

@@ -0,11 +1,46 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var value_1 = tslib_1.__importDefault(require("./value"));
var keyword_1 = tslib_1.__importDefault(require("./keyword"));
var anonymous_1 = tslib_1.__importDefault(require("./anonymous"));
var Constants = tslib_1.__importStar(require("../constants"));
var node_1 = __importDefault(require("./node"));
var value_1 = __importDefault(require("./value"));
var keyword_1 = __importDefault(require("./keyword"));
var anonymous_1 = __importDefault(require("./anonymous"));
var Constants = __importStar(require("../constants"));
var MATH = Constants.Math;
var Declaration = /** @class */ (function (_super) {
tslib_1.__extends(Declaration, _super);
__extends(Declaration, _super);
function Declaration(name, value, important, merge, index, currentFileInfo, inline, variable) {

@@ -39,7 +74,3 @@ var _this = _super.call(this) || this;

Declaration.prototype.eval = function (context) {
var mathBypass = false;
var prevMath;
var name = this.name;
var evaldValue;
var variable = this.variable;
var mathBypass = false, prevMath, name = this.name, evaldValue, variable = this.variable;
if (typeof name !== 'string') {

@@ -46,0 +77,0 @@ // expand 'primitive' name directly to get

@@ -0,8 +1,43 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var contexts_1 = tslib_1.__importDefault(require("../contexts"));
var utils = tslib_1.__importStar(require("../utils"));
var node_1 = __importDefault(require("./node"));
var contexts_1 = __importDefault(require("../contexts"));
var utils = __importStar(require("../utils"));
var DetachedRuleset = /** @class */ (function (_super) {
tslib_1.__extends(DetachedRuleset, _super);
__extends(DetachedRuleset, _super);
function DetachedRuleset(ruleset, frames) {

@@ -9,0 +44,0 @@ var _this = _super.call(this) || this;

@@ -0,7 +1,23 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var unit_conversions_1 = tslib_1.__importDefault(require("../data/unit-conversions"));
var unit_1 = tslib_1.__importDefault(require("./unit"));
var color_1 = tslib_1.__importDefault(require("./color"));
var node_1 = __importDefault(require("./node"));
var unit_conversions_1 = __importDefault(require("../data/unit-conversions"));
var unit_1 = __importDefault(require("./unit"));
var color_1 = __importDefault(require("./color"));
//

@@ -11,3 +27,3 @@ // A number with a unit

var Dimension = /** @class */ (function (_super) {
tslib_1.__extends(Dimension, _super);
__extends(Dimension, _super);
function Dimension(value, unit) {

@@ -62,4 +78,3 @@ var _this = _super.call(this) || this;

/* jshint noempty:false */
var value = this._operate(context, op, this.value, other.value);
var unit = this.unit.clone();
var value = this._operate(context, op, this.value, other.value), unit = this.unit.clone();
if (op === '+' || op === '-') {

@@ -78,4 +93,3 @@ if (unit.numerator.length === 0 && unit.denominator.length === 0) {

if (context.strictUnits && other.unit.toString() !== unit.toString()) {
throw new Error("Incompatible units. Change the units or use the unit function. " +
("Bad units: '" + unit.toString() + "' and '" + other.unit.toString() + "'."));
throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '" + unit.toString() + "' and '" + other.unit.toString() + "'.");
}

@@ -98,4 +112,3 @@ value = this._operate(context, op, this.value, other.value);

Dimension.prototype.compare = function (other) {
var a;
var b;
var a, b;
if (!(other instanceof Dimension)) {

@@ -102,0 +115,0 @@ return undefined;

@@ -0,8 +1,24 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var paren_1 = tslib_1.__importDefault(require("./paren"));
var combinator_1 = tslib_1.__importDefault(require("./combinator"));
var node_1 = __importDefault(require("./node"));
var paren_1 = __importDefault(require("./paren"));
var combinator_1 = __importDefault(require("./combinator"));
var Element = /** @class */ (function (_super) {
tslib_1.__extends(Element, _super);
__extends(Element, _super);
function Element(combinator, value, isVariable, index, currentFileInfo, visibilityInfo) {

@@ -45,3 +61,3 @@ var _this = _super.call(this) || this;

Element.prototype.toCSS = function (context) {
if (context === void 0) { context = {}; }
context = context || {};
var value = this.value;

@@ -48,0 +64,0 @@ var firstSelector = context.firstSelector;

@@ -0,11 +1,46 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var paren_1 = tslib_1.__importDefault(require("./paren"));
var comment_1 = tslib_1.__importDefault(require("./comment"));
var dimension_1 = tslib_1.__importDefault(require("./dimension"));
var Constants = tslib_1.__importStar(require("../constants"));
var node_1 = __importDefault(require("./node"));
var paren_1 = __importDefault(require("./paren"));
var comment_1 = __importDefault(require("./comment"));
var dimension_1 = __importDefault(require("./dimension"));
var Constants = __importStar(require("../constants"));
var MATH = Constants.Math;
var Expression = /** @class */ (function (_super) {
tslib_1.__extends(Expression, _super);
__extends(Expression, _super);
function Expression(value, noSpacing) {

@@ -26,4 +61,3 @@ var _this = _super.call(this) || this;

var mathOn = context.isMathOn();
var inParenthesis = this.parens &&
(context.math !== MATH.STRICT_LEGACY || !this.parensInOp);
var inParenthesis = this.parens;
var doubleParen = false;

@@ -68,3 +102,5 @@ if (inParenthesis) {

Expression.prototype.throwAwayComments = function () {
this.value = this.value.filter(function (v) { return !(v instanceof comment_1.default); });
this.value = this.value.filter(function (v) {
return !(v instanceof comment_1.default);
});
};

@@ -71,0 +107,0 @@ return Expression;

@@ -0,7 +1,23 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var selector_1 = tslib_1.__importDefault(require("./selector"));
var node_1 = __importDefault(require("./node"));
var selector_1 = __importDefault(require("./selector"));
var Extend = /** @class */ (function (_super) {
tslib_1.__extends(Extend, _super);
__extends(Extend, _super);
function Extend(selector, option, index, currentFileInfo, visibilityInfo) {

@@ -41,5 +57,3 @@ var _this = _super.call(this) || this;

Extend.prototype.findSelfSelectors = function (selectors) {
var selfElements = [];
var i;
var selectorElements;
var selfElements = [], i, selectorElements;
for (i = 0; i < selectors.length; i++) {

@@ -46,0 +60,0 @@ selectorElements = selectors[i].elements;

@@ -0,11 +1,46 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var media_1 = tslib_1.__importDefault(require("./media"));
var url_1 = tslib_1.__importDefault(require("./url"));
var quoted_1 = tslib_1.__importDefault(require("./quoted"));
var ruleset_1 = tslib_1.__importDefault(require("./ruleset"));
var anonymous_1 = tslib_1.__importDefault(require("./anonymous"));
var utils = tslib_1.__importStar(require("../utils"));
var less_error_1 = tslib_1.__importDefault(require("../less-error"));
var node_1 = __importDefault(require("./node"));
var media_1 = __importDefault(require("./media"));
var url_1 = __importDefault(require("./url"));
var quoted_1 = __importDefault(require("./quoted"));
var ruleset_1 = __importDefault(require("./ruleset"));
var anonymous_1 = __importDefault(require("./anonymous"));
var utils = __importStar(require("../utils"));
var less_error_1 = __importDefault(require("../less-error"));
//

@@ -24,3 +59,3 @@ // CSS @import node

var Import = /** @class */ (function (_super) {
tslib_1.__extends(Import, _super);
__extends(Import, _super);
function Import(path, features, options, index, currentFileInfo, visibilityInfo) {

@@ -27,0 +62,0 @@ var _this = _super.call(this) || this;

@@ -0,41 +1,43 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var tree = Object.create(null);
var node_1 = tslib_1.__importDefault(require("./node"));
var color_1 = tslib_1.__importDefault(require("./color"));
var atrule_1 = tslib_1.__importDefault(require("./atrule"));
var detached_ruleset_1 = tslib_1.__importDefault(require("./detached-ruleset"));
var operation_1 = tslib_1.__importDefault(require("./operation"));
var dimension_1 = tslib_1.__importDefault(require("./dimension"));
var unit_1 = tslib_1.__importDefault(require("./unit"));
var keyword_1 = tslib_1.__importDefault(require("./keyword"));
var variable_1 = tslib_1.__importDefault(require("./variable"));
var property_1 = tslib_1.__importDefault(require("./property"));
var ruleset_1 = tslib_1.__importDefault(require("./ruleset"));
var element_1 = tslib_1.__importDefault(require("./element"));
var attribute_1 = tslib_1.__importDefault(require("./attribute"));
var combinator_1 = tslib_1.__importDefault(require("./combinator"));
var selector_1 = tslib_1.__importDefault(require("./selector"));
var quoted_1 = tslib_1.__importDefault(require("./quoted"));
var expression_1 = tslib_1.__importDefault(require("./expression"));
var declaration_1 = tslib_1.__importDefault(require("./declaration"));
var call_1 = tslib_1.__importDefault(require("./call"));
var url_1 = tslib_1.__importDefault(require("./url"));
var import_1 = tslib_1.__importDefault(require("./import"));
var comment_1 = tslib_1.__importDefault(require("./comment"));
var anonymous_1 = tslib_1.__importDefault(require("./anonymous"));
var value_1 = tslib_1.__importDefault(require("./value"));
var javascript_1 = tslib_1.__importDefault(require("./javascript"));
var assignment_1 = tslib_1.__importDefault(require("./assignment"));
var condition_1 = tslib_1.__importDefault(require("./condition"));
var paren_1 = tslib_1.__importDefault(require("./paren"));
var media_1 = tslib_1.__importDefault(require("./media"));
var unicode_descriptor_1 = tslib_1.__importDefault(require("./unicode-descriptor"));
var negative_1 = tslib_1.__importDefault(require("./negative"));
var extend_1 = tslib_1.__importDefault(require("./extend"));
var variable_call_1 = tslib_1.__importDefault(require("./variable-call"));
var namespace_value_1 = tslib_1.__importDefault(require("./namespace-value"));
var node_1 = __importDefault(require("./node"));
var color_1 = __importDefault(require("./color"));
var atrule_1 = __importDefault(require("./atrule"));
var detached_ruleset_1 = __importDefault(require("./detached-ruleset"));
var operation_1 = __importDefault(require("./operation"));
var dimension_1 = __importDefault(require("./dimension"));
var unit_1 = __importDefault(require("./unit"));
var keyword_1 = __importDefault(require("./keyword"));
var variable_1 = __importDefault(require("./variable"));
var property_1 = __importDefault(require("./property"));
var ruleset_1 = __importDefault(require("./ruleset"));
var element_1 = __importDefault(require("./element"));
var attribute_1 = __importDefault(require("./attribute"));
var combinator_1 = __importDefault(require("./combinator"));
var selector_1 = __importDefault(require("./selector"));
var quoted_1 = __importDefault(require("./quoted"));
var expression_1 = __importDefault(require("./expression"));
var declaration_1 = __importDefault(require("./declaration"));
var call_1 = __importDefault(require("./call"));
var url_1 = __importDefault(require("./url"));
var import_1 = __importDefault(require("./import"));
var comment_1 = __importDefault(require("./comment"));
var anonymous_1 = __importDefault(require("./anonymous"));
var value_1 = __importDefault(require("./value"));
var javascript_1 = __importDefault(require("./javascript"));
var assignment_1 = __importDefault(require("./assignment"));
var condition_1 = __importDefault(require("./condition"));
var paren_1 = __importDefault(require("./paren"));
var media_1 = __importDefault(require("./media"));
var unicode_descriptor_1 = __importDefault(require("./unicode-descriptor"));
var negative_1 = __importDefault(require("./negative"));
var extend_1 = __importDefault(require("./extend"));
var variable_call_1 = __importDefault(require("./variable-call"));
var namespace_value_1 = __importDefault(require("./namespace-value"));
// mixins
var mixin_call_1 = tslib_1.__importDefault(require("./mixin-call"));
var mixin_definition_1 = tslib_1.__importDefault(require("./mixin-definition"));
var mixin_call_1 = __importDefault(require("./mixin-call"));
var mixin_definition_1 = __importDefault(require("./mixin-definition"));
exports.default = {

@@ -42,0 +44,0 @@ Node: node_1.default, Color: color_1.default, AtRule: atrule_1.default, DetachedRuleset: detached_ruleset_1.default, Operation: operation_1.default,

@@ -0,9 +1,25 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var js_eval_node_1 = tslib_1.__importDefault(require("./js-eval-node"));
var dimension_1 = tslib_1.__importDefault(require("./dimension"));
var quoted_1 = tslib_1.__importDefault(require("./quoted"));
var anonymous_1 = tslib_1.__importDefault(require("./anonymous"));
var js_eval_node_1 = __importDefault(require("./js-eval-node"));
var dimension_1 = __importDefault(require("./dimension"));
var quoted_1 = __importDefault(require("./quoted"));
var anonymous_1 = __importDefault(require("./anonymous"));
var JavaScript = /** @class */ (function (_super) {
tslib_1.__extends(JavaScript, _super);
__extends(JavaScript, _super);
function JavaScript(string, escaped, index, currentFileInfo) {

@@ -10,0 +26,0 @@ var _this = _super.call(this) || this;

@@ -0,7 +1,23 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var variable_1 = tslib_1.__importDefault(require("./variable"));
var node_1 = __importDefault(require("./node"));
var variable_1 = __importDefault(require("./variable"));
var JsEvalNode = /** @class */ (function (_super) {
tslib_1.__extends(JsEvalNode, _super);
__extends(JsEvalNode, _super);
function JsEvalNode() {

@@ -19,3 +35,5 @@ return _super !== null && _super.apply(this, arguments) || this;

}
expression = expression.replace(/@\{([\w-]+)\}/g, function (_, name) { return that.jsify(new variable_1.default("@" + name, that.getIndex(), that.fileInfo()).eval(context)); });
expression = expression.replace(/@\{([\w-]+)\}/g, function (_, name) {
return that.jsify(new variable_1.default("@" + name, that.getIndex(), that.fileInfo()).eval(context));
});
try {

@@ -22,0 +40,0 @@ expression = new Function("return (" + expression + ")");

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var Keyword = /** @class */ (function (_super) {
tslib_1.__extends(Keyword, _super);
__extends(Keyword, _super);
function Keyword(value) {

@@ -7,0 +23,0 @@ var _this = _super.call(this) || this;

@@ -0,12 +1,47 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var ruleset_1 = tslib_1.__importDefault(require("./ruleset"));
var value_1 = tslib_1.__importDefault(require("./value"));
var selector_1 = tslib_1.__importDefault(require("./selector"));
var anonymous_1 = tslib_1.__importDefault(require("./anonymous"));
var expression_1 = tslib_1.__importDefault(require("./expression"));
var atrule_1 = tslib_1.__importDefault(require("./atrule"));
var utils = tslib_1.__importStar(require("../utils"));
var ruleset_1 = __importDefault(require("./ruleset"));
var value_1 = __importDefault(require("./value"));
var selector_1 = __importDefault(require("./selector"));
var anonymous_1 = __importDefault(require("./anonymous"));
var expression_1 = __importDefault(require("./expression"));
var atrule_1 = __importDefault(require("./atrule"));
var utils = __importStar(require("../utils"));
var Media = /** @class */ (function (_super) {
tslib_1.__extends(Media, _super);
__extends(Media, _super);
function Media(value, features, index, currentFileInfo, visibilityInfo) {

@@ -13,0 +48,0 @@ var _this = _super.call(this) || this;

@@ -0,9 +1,25 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var selector_1 = tslib_1.__importDefault(require("./selector"));
var mixin_definition_1 = tslib_1.__importDefault(require("./mixin-definition"));
var default_1 = tslib_1.__importDefault(require("../functions/default"));
var node_1 = __importDefault(require("./node"));
var selector_1 = __importDefault(require("./selector"));
var mixin_definition_1 = __importDefault(require("./mixin-definition"));
var default_1 = __importDefault(require("../functions/default"));
var MixinCall = /** @class */ (function (_super) {
tslib_1.__extends(MixinCall, _super);
__extends(MixinCall, _super);
function MixinCall(elements, args, index, currentFileInfo, important) {

@@ -55,5 +71,3 @@ var _this = _super.call(this) || this;

function calcDefGroup(mixin, mixinPath) {
var f;
var p;
var namespace;
var f, p, namespace;
for (f = 0; f < 2; f++) {

@@ -169,4 +183,3 @@ conditionResult[f] = true;

MixinCall.prototype._setVisibilityToReplacement = function (replacement) {
var i;
var rule;
var i, rule;
if (this.blocksVisibility()) {

@@ -173,0 +186,0 @@ for (i = 0; i < replacement.length; i++) {

@@ -0,13 +1,48 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var selector_1 = tslib_1.__importDefault(require("./selector"));
var element_1 = tslib_1.__importDefault(require("./element"));
var ruleset_1 = tslib_1.__importDefault(require("./ruleset"));
var declaration_1 = tslib_1.__importDefault(require("./declaration"));
var detached_ruleset_1 = tslib_1.__importDefault(require("./detached-ruleset"));
var expression_1 = tslib_1.__importDefault(require("./expression"));
var contexts_1 = tslib_1.__importDefault(require("../contexts"));
var utils = tslib_1.__importStar(require("../utils"));
var selector_1 = __importDefault(require("./selector"));
var element_1 = __importDefault(require("./element"));
var ruleset_1 = __importDefault(require("./ruleset"));
var declaration_1 = __importDefault(require("./declaration"));
var detached_ruleset_1 = __importDefault(require("./detached-ruleset"));
var expression_1 = __importDefault(require("./expression"));
var contexts_1 = __importDefault(require("../contexts"));
var utils = __importStar(require("../utils"));
var Definition = /** @class */ (function (_super) {
tslib_1.__extends(Definition, _super);
__extends(Definition, _super);
function Definition(name, params, rules, condition, variadic, frames, visibilityInfo) {

@@ -14,0 +49,0 @@ var _this = _super.call(this) || this;

@@ -0,9 +1,25 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var variable_1 = tslib_1.__importDefault(require("./variable"));
var ruleset_1 = tslib_1.__importDefault(require("./ruleset"));
var selector_1 = tslib_1.__importDefault(require("./selector"));
var node_1 = __importDefault(require("./node"));
var variable_1 = __importDefault(require("./variable"));
var ruleset_1 = __importDefault(require("./ruleset"));
var selector_1 = __importDefault(require("./selector"));
var NamespaceValue = /** @class */ (function (_super) {
tslib_1.__extends(NamespaceValue, _super);
__extends(NamespaceValue, _super);
function NamespaceValue(ruleCall, lookups, index, fileInfo) {

@@ -18,6 +34,3 @@ var _this = _super.call(this) || this;

NamespaceValue.prototype.eval = function (context) {
var i;
var j;
var name;
var rules = this.value.eval(context);
var i, j, name, rules = this.value.eval(context);
for (i = 0; i < this.lookups.length; i++) {

@@ -24,0 +37,0 @@ name = this.lookups[i];

@@ -0,8 +1,24 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var operation_1 = tslib_1.__importDefault(require("./operation"));
var dimension_1 = tslib_1.__importDefault(require("./dimension"));
var node_1 = __importDefault(require("./node"));
var operation_1 = __importDefault(require("./operation"));
var dimension_1 = __importDefault(require("./dimension"));
var Negative = /** @class */ (function (_super) {
tslib_1.__extends(Negative, _super);
__extends(Negative, _super);
function Negative(node) {

@@ -9,0 +25,0 @@ var _this = _super.call(this) || this;

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -36,5 +37,3 @@ var Node = /** @class */ (function () {

};
Node.prototype.isRulesetLike = function () {
return false;
};
Node.prototype.isRulesetLike = function () { return false; };
Node.prototype.toCSS = function (context) {

@@ -72,2 +71,40 @@ var strs = [];

};
Node.compare = function (a, b) {
/* returns:
-1: a < b
0: a = b
1: a > b
and *any* other value for a != b (e.g. undefined, NaN, -2 etc.) */
if ((a.compare) &&
// for "symmetric results" force toCSS-based comparison
// of Quoted or Anonymous if either value is one of those
!(b.type === 'Quoted' || b.type === 'Anonymous')) {
return a.compare(b);
}
else if (b.compare) {
return -b.compare(a);
}
else if (a.type !== b.type) {
return undefined;
}
a = a.value;
b = b.value;
if (!Array.isArray(a)) {
return a === b ? 0 : undefined;
}
if (a.length !== b.length) {
return undefined;
}
for (var i = 0; i < a.length; i++) {
if (Node.compare(a[i], b[i]) !== 0) {
return undefined;
}
}
return 0;
};
Node.numericCompare = function (a, b) {
return a < b ? -1
: a === b ? 0
: a > b ? 1 : undefined;
};
// Returns true if this node represents root of ast imported by reference

@@ -124,39 +161,3 @@ Node.prototype.blocksVisibility = function () {

}());
Node.compare = function (a, b) {
/* returns:
-1: a < b
0: a = b
1: a > b
and *any* other value for a != b (e.g. undefined, NaN, -2 etc.) */
if ((a.compare) &&
// for "symmetric results" force toCSS-based comparison
// of Quoted or Anonymous if either value is one of those
!(b.type === 'Quoted' || b.type === 'Anonymous')) {
return a.compare(b);
}
else if (b.compare) {
return -b.compare(a);
}
else if (a.type !== b.type) {
return undefined;
}
a = a.value;
b = b.value;
if (!Array.isArray(a)) {
return a === b ? 0 : undefined;
}
if (a.length !== b.length) {
return undefined;
}
for (var i = 0; i < a.length; i++) {
if (Node.compare(a[i], b[i]) !== 0) {
return undefined;
}
}
return 0;
};
Node.numericCompare = function (a, b) { return a < b ? -1
: a === b ? 0
: a > b ? 1 : undefined; };
exports.default = Node;
//# sourceMappingURL=node.js.map

@@ -0,10 +1,45 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var color_1 = tslib_1.__importDefault(require("./color"));
var dimension_1 = tslib_1.__importDefault(require("./dimension"));
var Constants = tslib_1.__importStar(require("../constants"));
var node_1 = __importDefault(require("./node"));
var color_1 = __importDefault(require("./color"));
var dimension_1 = __importDefault(require("./dimension"));
var Constants = __importStar(require("../constants"));
var MATH = Constants.Math;
var Operation = /** @class */ (function (_super) {
tslib_1.__extends(Operation, _super);
__extends(Operation, _super);
function Operation(op, operands, isSpaced) {

@@ -21,5 +56,3 @@ var _this = _super.call(this) || this;

Operation.prototype.eval = function (context) {
var a = this.operands[0].eval(context);
var b = this.operands[1].eval(context);
var op;
var a = this.operands[0].eval(context), b = this.operands[1].eval(context), op;
if (context.isMathOn(this.op)) {

@@ -26,0 +59,0 @@ op = this.op === './' ? '/' : this.op;

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var Paren = /** @class */ (function (_super) {
tslib_1.__extends(Paren, _super);
__extends(Paren, _super);
function Paren(node) {

@@ -7,0 +23,0 @@ var _this = _super.call(this) || this;

@@ -0,7 +1,23 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var declaration_1 = tslib_1.__importDefault(require("./declaration"));
var node_1 = __importDefault(require("./node"));
var declaration_1 = __importDefault(require("./declaration"));
var Property = /** @class */ (function (_super) {
tslib_1.__extends(Property, _super);
__extends(Property, _super);
function Property(name, index, currentFileInfo) {

@@ -8,0 +24,0 @@ var _this = _super.call(this) || this;

@@ -0,8 +1,24 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var variable_1 = tslib_1.__importDefault(require("./variable"));
var property_1 = tslib_1.__importDefault(require("./property"));
var node_1 = __importDefault(require("./node"));
var variable_1 = __importDefault(require("./variable"));
var property_1 = __importDefault(require("./property"));
var Quoted = /** @class */ (function (_super) {
tslib_1.__extends(Quoted, _super);
__extends(Quoted, _super);
function Quoted(str, content, escaped, index, currentFileInfo) {

@@ -9,0 +25,0 @@ var _this = _super.call(this) || this;

@@ -0,18 +1,53 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var declaration_1 = tslib_1.__importDefault(require("./declaration"));
var keyword_1 = tslib_1.__importDefault(require("./keyword"));
var comment_1 = tslib_1.__importDefault(require("./comment"));
var paren_1 = tslib_1.__importDefault(require("./paren"));
var selector_1 = tslib_1.__importDefault(require("./selector"));
var element_1 = tslib_1.__importDefault(require("./element"));
var anonymous_1 = tslib_1.__importDefault(require("./anonymous"));
var contexts_1 = tslib_1.__importDefault(require("../contexts"));
var function_registry_1 = tslib_1.__importDefault(require("../functions/function-registry"));
var default_1 = tslib_1.__importDefault(require("../functions/default"));
var debug_info_1 = tslib_1.__importDefault(require("./debug-info"));
var utils = tslib_1.__importStar(require("../utils"));
var node_1 = __importDefault(require("./node"));
var declaration_1 = __importDefault(require("./declaration"));
var keyword_1 = __importDefault(require("./keyword"));
var comment_1 = __importDefault(require("./comment"));
var paren_1 = __importDefault(require("./paren"));
var selector_1 = __importDefault(require("./selector"));
var element_1 = __importDefault(require("./element"));
var anonymous_1 = __importDefault(require("./anonymous"));
var contexts_1 = __importDefault(require("../contexts"));
var function_registry_1 = __importDefault(require("../functions/function-registry"));
var default_1 = __importDefault(require("../functions/default"));
var debug_info_1 = __importDefault(require("./debug-info"));
var utils = __importStar(require("../utils"));
var Ruleset = /** @class */ (function (_super) {
tslib_1.__extends(Ruleset, _super);
__extends(Ruleset, _super);
function Ruleset(selectors, rules, strictImports, visibilityInfo) {

@@ -32,5 +67,3 @@ var _this = _super.call(this) || this;

}
Ruleset.prototype.isRulesetLike = function () {
return true;
};
Ruleset.prototype.isRulesetLike = function () { return true; };
Ruleset.prototype.accept = function (visitor) {

@@ -118,3 +151,3 @@ if (this.paths) {

return function_registry_1.default;
})(context.frames).inherit();
}(context.frames)).inherit();
// push the current ruleset to the frames stack

@@ -383,3 +416,3 @@ var ctxFrames = context.frames;

Ruleset.prototype.find = function (selector, self, filter) {
if (self === void 0) { self = this; }
self = self || this;
var rules = [];

@@ -523,4 +556,3 @@ var match;

function createParenthesis(elementsToPak, originalElement) {
var replacementParen;
var j;
var replacementParen, j;
if (elementsToPak.length === 0) {

@@ -539,4 +571,3 @@ replacementParen = new paren_1.default(elementsToPak[0]);

function createSelector(containedElement, originalElement) {
var element;
var selector;
var element, selector;
element = new element_1.default(null, containedElement, originalElement.isVariable, originalElement._index, originalElement._fileInfo);

@@ -550,5 +581,3 @@ selector = new selector_1.default([element]);

function addReplacementIntoPath(beginningPath, addPath, replacedElement, originalSelector) {
var newSelectorPath;
var lastSelector;
var newJoinedSelector;
var newSelectorPath, lastSelector, newJoinedSelector;
// our new selector path

@@ -588,3 +617,5 @@ newSelectorPath = [];

var restOfPath = addPath.slice(1);
restOfPath = restOfPath.map(function (selector) { return selector.createDerived(selector.elements, []); });
restOfPath = restOfPath.map(function (selector) {
return selector.createDerived(selector.elements, []);
});
newSelectorPath = newSelectorPath.concat(restOfPath);

@@ -606,4 +637,3 @@ }

function mergeElementsOnToSelectors(elements, selectors) {
var i;
var sel;
var i, sel;
if (elements.length === 0) {

@@ -640,13 +670,3 @@ return;

//
var i;
var j;
var k;
var currentElements;
var newSelectors;
var selectorsMultiplied;
var sel;
var el;
var hadParentSelector = false;
var length;
var lastSelector;
var i, j, k, currentElements, newSelectors, selectorsMultiplied, sel, el, hadParentSelector = false, length, lastSelector;
function findNestedSelector(element) {

@@ -751,5 +771,3 @@ var maybeSelector;

// joinSelector code follows
var i;
var newPaths;
var hadParentSelector;
var i, newPaths, hadParentSelector;
newPaths = [];

@@ -756,0 +774,0 @@ hadParentSelector = replaceParentSelector(newPaths, context, selector);

@@ -0,8 +1,24 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var element_1 = tslib_1.__importDefault(require("./element"));
var less_error_1 = tslib_1.__importDefault(require("../less-error"));
var node_1 = __importDefault(require("./node"));
var element_1 = __importDefault(require("./element"));
var less_error_1 = __importDefault(require("../less-error"));
var Selector = /** @class */ (function (_super) {
tslib_1.__extends(Selector, _super);
__extends(Selector, _super);
function Selector(elements, extendList, condition, index, currentFileInfo, visibilityInfo) {

@@ -57,4 +73,3 @@ var _this = _super.call(this) || this;

Selector.prototype.createEmptySelectors = function () {
var el = new element_1.default('', '&', false, this._index, this._fileInfo);
var sels = [new Selector([el], null, null, this._index, this._fileInfo)];
var el = new element_1.default('', '&', false, this._index, this._fileInfo), sels = [new Selector([el], null, null, this._index, this._fileInfo)];
sels[0].mediaEmpty = true;

@@ -86,3 +101,5 @@ return sels;

}
var elements = this.elements.map(function (v) { return v.combinator.value + (v.value.value || v.value); }).join('').match(/[,&#\*\.\w-]([\w-]|(\\.))*/g);
var elements = this.elements.map(function (v) {
return v.combinator.value + (v.value.value || v.value);
}).join('').match(/[,&#\*\.\w-]([\w-]|(\\.))*/g);
if (elements) {

@@ -113,4 +130,3 @@ if (elements[0] === '&') {

Selector.prototype.genCSS = function (context, output) {
var i;
var element;
var i, element;
if ((!context || !context.firstSelector) && this.elements[0].combinator.value === '') {

@@ -117,0 +133,0 @@ output.add(' ', this.fileInfo(), this.getIndex());

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var UnicodeDescriptor = /** @class */ (function (_super) {
tslib_1.__extends(UnicodeDescriptor, _super);
__extends(UnicodeDescriptor, _super);
function UnicodeDescriptor(value) {

@@ -7,0 +23,0 @@ var _this = _super.call(this) || this;

@@ -0,8 +1,43 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var unit_conversions_1 = tslib_1.__importDefault(require("../data/unit-conversions"));
var utils = tslib_1.__importStar(require("../utils"));
var node_1 = __importDefault(require("./node"));
var unit_conversions_1 = __importDefault(require("../data/unit-conversions"));
var utils = __importStar(require("../utils"));
var Unit = /** @class */ (function (_super) {
tslib_1.__extends(Unit, _super);
__extends(Unit, _super);
function Unit(numerator, denominator, backupUnit) {

@@ -37,4 +72,3 @@ var _this = _super.call(this) || this;

Unit.prototype.toString = function () {
var i;
var returnStr = this.numerator.join('*');
var i, returnStr = this.numerator.join('*');
for (i = 0; i < this.denominator.length; i++) {

@@ -41,0 +75,0 @@ returnStr += "/" + this.denominator[i];

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var URL = /** @class */ (function (_super) {
tslib_1.__extends(URL, _super);
__extends(URL, _super);
function URL(val, index, currentFileInfo, isEvald) {

@@ -7,0 +23,0 @@ var _this = _super.call(this) || this;

@@ -0,6 +1,22 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var node_1 = __importDefault(require("./node"));
var Value = /** @class */ (function (_super) {
tslib_1.__extends(Value, _super);
__extends(Value, _super);
function Value(value) {

@@ -29,3 +45,5 @@ var _this = _super.call(this) || this;

else {
return new Value(this.value.map(function (v) { return v.eval(context); }));
return new Value(this.value.map(function (v) {
return v.eval(context);
}));
}

@@ -32,0 +50,0 @@ };

@@ -0,10 +1,26 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var variable_1 = tslib_1.__importDefault(require("./variable"));
var ruleset_1 = tslib_1.__importDefault(require("./ruleset"));
var detached_ruleset_1 = tslib_1.__importDefault(require("./detached-ruleset"));
var less_error_1 = tslib_1.__importDefault(require("../less-error"));
var node_1 = __importDefault(require("./node"));
var variable_1 = __importDefault(require("./variable"));
var ruleset_1 = __importDefault(require("./ruleset"));
var detached_ruleset_1 = __importDefault(require("./detached-ruleset"));
var less_error_1 = __importDefault(require("../less-error"));
var VariableCall = /** @class */ (function (_super) {
tslib_1.__extends(VariableCall, _super);
__extends(VariableCall, _super);
function VariableCall(variable, index, currentFileInfo) {

@@ -11,0 +27,0 @@ var _this = _super.call(this) || this;

@@ -0,7 +1,23 @@

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var node_1 = tslib_1.__importDefault(require("./node"));
var call_1 = tslib_1.__importDefault(require("./call"));
var node_1 = __importDefault(require("./node"));
var call_1 = __importDefault(require("./call"));
var Variable = /** @class */ (function (_super) {
tslib_1.__extends(Variable, _super);
__extends(Variable, _super);
function Variable(name, index, currentFileInfo) {

@@ -15,4 +31,3 @@ var _this = _super.call(this) || this;

Variable.prototype.eval = function (context) {
var variable;
var name = this.name;
var variable, name = this.name;
if (name.indexOf('@@') === 0) {

@@ -19,0 +34,0 @@ name = "@" + new Variable(name.slice(1), this.getIndex(), this.fileInfo()).eval(context).value;

@@ -0,6 +1,36 @@

"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.flattenArray = exports.merge = exports.copyOptions = exports.defaults = exports.clone = exports.copyArray = exports.getLocation = void 0;
var tslib_1 = require("tslib");
/* jshint proto: true */
var Constants = tslib_1.__importStar(require("./constants"));
var Constants = __importStar(require("./constants"));
function getLocation(index, inputStream) {

@@ -46,5 +76,5 @@ var n = index + 1;

newObj = {};
var defaults_1 = tslib_1.__assign({}, obj1);
var defaults_1 = __assign({}, obj1);
newObj._defaults = defaults_1;
var cloned = obj2 ? tslib_1.__assign({}, obj2) : {};
var cloned = obj2 ? __assign({}, obj2) : {};
Object.assign(newObj, defaults_1, cloned);

@@ -61,3 +91,3 @@ }

if (opts.strictMath) {
opts.math = Constants.Math.STRICT_LEGACY;
opts.math = Constants.Math.PARENS;
}

@@ -80,4 +110,4 @@ // Back compat with changed relativeUrls option

break;
case 'strict-legacy':
opts.math = Constants.Math.STRICT_LEGACY;
default:
opts.math = Constants.Math.PARENS;
}

@@ -84,0 +114,0 @@ }

@@ -0,7 +1,29 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var tree_1 = tslib_1.__importDefault(require("../tree"));
var visitor_1 = tslib_1.__importDefault(require("./visitor"));
var logger_1 = tslib_1.__importDefault(require("../logger"));
var utils = tslib_1.__importStar(require("../utils"));
var tree_1 = __importDefault(require("../tree"));
var visitor_1 = __importDefault(require("./visitor"));
var logger_1 = __importDefault(require("../logger"));
var utils = __importStar(require("../utils"));
/* jshint loopfunc:true */

@@ -35,4 +57,3 @@ var ExtendFinderVisitor = /** @class */ (function () {

// get &:extend(.a); rules which apply to all selectors in this ruleset
var rules = rulesetNode.rules;
var ruleCnt = rules ? rules.length : 0;
var rules = rulesetNode.rules, ruleCnt = rules ? rules.length : 0;
for (i = 0; i < ruleCnt; i++) {

@@ -48,9 +69,9 @@ if (rulesetNode.rules[i] instanceof tree_1.default.Extend) {

for (i = 0; i < paths.length; i++) {
var selectorPath = paths[i];
var selector = selectorPath[selectorPath.length - 1];
var selExtendList = selector.extendList;
var selectorPath = paths[i], selector = selectorPath[selectorPath.length - 1], selExtendList = selector.extendList;
extendList = selExtendList ? utils.copyArray(selExtendList).concat(allSelectorsExtendList)
: allSelectorsExtendList;
if (extendList) {
extendList = extendList.map(function (allSelectorsExtend) { return allSelectorsExtend.clone(); });
extendList = extendList.map(function (allSelectorsExtend) {
return allSelectorsExtend.clone();
});
}

@@ -110,3 +131,5 @@ for (j = 0; j < extendList.length; j++) {

var indices = this.extendIndices;
extendList.filter(function (extend) { return !extend.hasFoundMatches && extend.parent_ids.length == 1; }).forEach(function (extend) {
extendList.filter(function (extend) {
return !extend.hasFoundMatches && extend.parent_ids.length == 1;
}).forEach(function (extend) {
var selector = '_unknown_';

@@ -366,10 +389,3 @@ try {

// for a set of matches, replace each match with the replacement selector
var currentSelectorPathIndex = 0;
var currentSelectorPathElementIndex = 0;
var path = [];
var matchIndex;
var selector;
var firstElement;
var match;
var newElements;
var currentSelectorPathIndex = 0, currentSelectorPathElementIndex = 0, path = [], matchIndex, selector, firstElement, match, newElements;
for (matchIndex = 0; matchIndex < matches.length; matchIndex++) {

@@ -376,0 +392,0 @@ match = matches[matchIndex];

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -10,4 +11,3 @@ var ImportSequencer = /** @class */ (function () {

ImportSequencer.prototype.addImport = function (callback) {
var importSequencer = this;
var importItem = {
var importSequencer = this, importItem = {
callback: callback,

@@ -19,7 +19,3 @@ args: null,

return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
importItem.args = Array.prototype.slice.call(args, 0);
importItem.args = Array.prototype.slice.call(arguments, 0);
importItem.isReady = true;

@@ -26,0 +22,0 @@ importSequencer.tryRun();

@@ -0,7 +1,29 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var contexts_1 = tslib_1.__importDefault(require("../contexts"));
var visitor_1 = tslib_1.__importDefault(require("./visitor"));
var import_sequencer_1 = tslib_1.__importDefault(require("./import-sequencer"));
var utils = tslib_1.__importStar(require("../utils"));
var contexts_1 = __importDefault(require("../contexts"));
var visitor_1 = __importDefault(require("./visitor"));
var import_sequencer_1 = __importDefault(require("./import-sequencer"));
var utils = __importStar(require("../utils"));
var ImportVisitor = function (importer, finish) {

@@ -79,4 +101,3 @@ this._visitor = new visitor_1.default(this);

}
var onImported = this.onImported.bind(this, evaldImportNode, context);
var sequencedOnImported = this._sequencer.addImport(onImported);
var onImported = this.onImported.bind(this, evaldImportNode, context), sequencedOnImported = this._sequencer.addImport(onImported);
this._importer.push(evaldImportNode.getPath(), tryAppendLessExtension, evaldImportNode.fileInfo(), evaldImportNode.options, sequencedOnImported);

@@ -99,7 +120,3 @@ }

}
var importVisitor = this;
var inlineCSS = importNode.options.inline;
var isPlugin = importNode.options.isPlugin;
var isOptional = importNode.options.optional;
var duplicateImport = importedAtRoot || fullPath in importVisitor.recursionDetector;
var importVisitor = this, inlineCSS = importNode.options.inline, isPlugin = importNode.options.isPlugin, isOptional = importNode.options.optional, duplicateImport = importedAtRoot || fullPath in importVisitor.recursionDetector;
if (!context.importMultiple) {

@@ -106,0 +123,0 @@ if (duplicateImport) {

@@ -0,9 +1,12 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var visitor_1 = tslib_1.__importDefault(require("./visitor"));
var import_visitor_1 = tslib_1.__importDefault(require("./import-visitor"));
var set_tree_visibility_visitor_1 = tslib_1.__importDefault(require("./set-tree-visibility-visitor"));
var extend_visitor_1 = tslib_1.__importDefault(require("./extend-visitor"));
var join_selector_visitor_1 = tslib_1.__importDefault(require("./join-selector-visitor"));
var to_css_visitor_1 = tslib_1.__importDefault(require("./to-css-visitor"));
var visitor_1 = __importDefault(require("./visitor"));
var import_visitor_1 = __importDefault(require("./import-visitor"));
var set_tree_visibility_visitor_1 = __importDefault(require("./set-tree-visibility-visitor"));
var extend_visitor_1 = __importDefault(require("./extend-visitor"));
var join_selector_visitor_1 = __importDefault(require("./join-selector-visitor"));
var to_css_visitor_1 = __importDefault(require("./to-css-visitor"));
exports.default = {

@@ -10,0 +13,0 @@ Visitor: visitor_1.default,

@@ -0,4 +1,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var visitor_1 = tslib_1.__importDefault(require("./visitor"));
var visitor_1 = __importDefault(require("./visitor"));
var JoinSelectorVisitor = /** @class */ (function () {

@@ -5,0 +8,0 @@ function JoinSelectorVisitor() {

@@ -0,1 +1,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -2,0 +3,0 @@ var SetTreeVisibilityVisitor = /** @class */ (function () {

@@ -0,5 +1,8 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var tree_1 = tslib_1.__importDefault(require("../tree"));
var visitor_1 = tslib_1.__importDefault(require("./visitor"));
var tree_1 = __importDefault(require("../tree"));
var visitor_1 = __importDefault(require("./visitor"));
var CSSVisitorUtils = /** @class */ (function () {

@@ -179,3 +182,3 @@ function CSSVisitorUtils(context) {

if (ruleNode instanceof tree_1.default.Call) {
throw { message: "Function '" + ruleNode.name + "' is undefined", index: ruleNode.getIndex(), filename: ruleNode.fileInfo() && ruleNode.fileInfo().filename };
throw { message: "Function '" + ruleNode.name + "' did not return a root node", index: ruleNode.getIndex(), filename: ruleNode.fileInfo() && ruleNode.fileInfo().filename };
}

@@ -182,0 +185,0 @@ if (ruleNode.type && !ruleNode.allowRoot) {

@@ -0,4 +1,7 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var tree_1 = tslib_1.__importDefault(require("../tree"));
var tree_1 = __importDefault(require("../tree"));
var _visitArgs = { visitDeeper: true };

@@ -11,4 +14,3 @@ var _hasIndexed = false;

// add .typeIndex to tree node types for lookup table
var key;
var child;
var key, child;
for (key in parent) {

@@ -123,8 +125,3 @@ /* eslint guard-for-in: 0 */

}
var cnt;
var i;
var item;
var nestedCnt;
var j;
var nestedItem;
var cnt, i, item, nestedCnt, j, nestedItem;
for (i = 0, cnt = arr.length; i < cnt; i++) {

@@ -131,0 +128,0 @@ item = arr[i];

{
"name": "less",
"version": "3.13.1-alpha.1+84d40222",
"version": "4.0.1-alpha.0+70e242c5",
"description": "Leaner CSS",

@@ -57,4 +57,4 @@ "homepage": "http://lesscss.org",

"devDependencies": {
"@less/test-data": "^3.13.0",
"@less/test-import-module": "^3.13.0",
"@less/test-data": "^4.0.0",
"@less/test-import-module": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^3.3.0",

@@ -96,3 +96,3 @@ "@typescript-eslint/parser": "^3.3.0",

"rollup-plugin-terser": "^5.1.1",
"rollup-plugin-typescript2": "^0.27.3",
"rollup-plugin-typescript2": "^0.24.3",
"semver": "^6.3.0",

@@ -133,5 +133,5 @@ "shx": "^0.3.2",

"dependencies": {
"tslib": "^2.0.1"
"tslib": "^1.10.0"
},
"gitHead": "84d40222b65701cbda0d5a4c218c6fb35f0ac368"
"gitHead": "70e242c5bdb2245696f7ca63845b50a8d00cf5ac"
}

@@ -1,4 +0,4 @@

RuntimeError: error evaluating function `image-height`: Image size functions are not supported in browser version of less in image-height-error.less on line 2, column 11:
RuntimeError: Error evaluating function `image-height`: Image size functions are not supported in browser version of less in image-height-error.less on line 2, column 11:
1 .test-height{
2 height: image-height("../data/image.jpg")
3 }

@@ -1,4 +0,4 @@

RuntimeError: error evaluating function `image-size`: Image size functions are not supported in browser version of less in image-size-error.less on line 2, column 9:
RuntimeError: Error evaluating function `image-size`: Image size functions are not supported in browser version of less in image-size-error.less on line 2, column 9:
1 .test-size{
2 size: image-size("../data/image.jpg")
3 }

@@ -1,4 +0,4 @@

RuntimeError: error evaluating function `image-width`: Image size functions are not supported in browser version of less in image-width-error.less on line 2, column 10:
RuntimeError: Error evaluating function `image-width`: Image size functions are not supported in browser version of less in image-width-error.less on line 2, column 10:
1 .test-width{
2 width: image-width("../data/image.jpg")
3 }

@@ -17,5 +17,2 @@ var lessTest = require('./less-test'),

[{
math: 'strict-legacy'
}, 'math/strict-legacy/'],
[{
math: 'parens'

@@ -26,2 +23,5 @@ }, 'math/strict/'],

}, 'math/parens-division/'],
[{
math: 'always'
}, 'math/always/'],
// Use legacy strictMath: true here to demonstrate it still works

@@ -44,4 +44,6 @@ [{strictMath: true, strictUnits: true, javascriptEnabled: true}, '../errors/eval/',

[{math: 'strict', compress: true}, 'compression/'],
[{math: 0, strictUnits: true}, 'strict-units/'],
[{}, 'legacy/'],
[{math: 0, strictUnits: true}, 'units/strict/'],
[{math: 0, strictUnits: false}, 'units/no-strict/'],
[{math: 'strict', strictUnits: true, sourceMap: true, globalVars: true }, 'sourcemaps/',

@@ -80,4 +82,3 @@ lessTester.testSourcemap, null, null,

[{plugin: 'test/plugins/filemanager/'}, 'filemanagerPlugin/'],
[{}, 'no-strict-math/'],
[{}, '3rd-party/'],
[{math: 0}, '3rd-party/'],
[{ processImports: false }, 'process-imports/']

@@ -90,5 +91,5 @@ ];

lessTester.testSyncronous({syncImport: true}, '_main/plugin');
lessTester.testSyncronous({syncImport: true}, 'math/strict-legacy/css');
lessTester.testSyncronous({syncImport: true}, 'math/strict/css');
lessTester.testNoOptions();
lessTester.testJSImport();
lessTester.finished();

@@ -9,4 +9,2 @@ {

"esModuleInterop": true,
"importHelpers": true,
"noImplicitUseStrict": true,
"target": "ES5"

@@ -13,0 +11,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc