@@ -10038,6 +10038,22 @@ System.register("npm:extend@2.0.1/index", [], true, function(require, exports, m
10038
10038
return module.exports;
10039
10039
});
10040
10040
10041
+ System.register("npm:escape-string-regexp@1.0.3/index", [], true, function(require, exports, module) {
10042
+ var global = System.global,
10043
+ __define = global.define;
10044
+ global.define = undefined;
10045
+ 'use strict';
10046
+ var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
10047
+ module.exports = function(str) {
10048
+ if (typeof str !== 'string') {
10049
+ throw new TypeError('Expected a string');
10050
+ }
10051
+ return str.replace(matchOperatorsRe, '\\$&');
10052
+ };
10053
+ global.define = __define;
10054
+ return module.exports;
10055
+ });
10056
+
10041
10057
System.register("npm:babel-runtime@5.2.6/helpers/define-property", ["npm:babel-runtime@5.2.6/core-js/object/define-property"], true, function(require, exports, module) {
10042
10058
var global = System.global,
10043
10059
__define = global.define;
@@ -14854,6 +14870,15 @@ System.register("npm:extend@2.0.1", ["npm:extend@2.0.1/index"], true, function(r
14854
14870
return module.exports;
14855
14871
});
14856
14872
14873
+ System.register("npm:escape-string-regexp@1.0.3", ["npm:escape-string-regexp@1.0.3/index"], true, function(require, exports, module) {
14874
+ var global = System.global,
14875
+ __define = global.define;
14876
+ global.define = undefined;
14877
+ module.exports = require("npm:escape-string-regexp@1.0.3/index");
14878
+ global.define = __define;
14879
+ return module.exports;
14880
+ });
14881
+
14857
14882
System.register("npm:babel-runtime@5.2.6/core-js/object/keys", ["npm:core-js@0.9.6/library/fn/object/keys"], true, function(require, exports, module) {
14858
14883
var global = System.global,
14859
14884
__define = global.define;
@@ -19119,13 +19144,14 @@ System.register("npm:postcss@4.1.9/lib/previous-map", ["npm:js-base64@2.1.8", "n
19119
19144
return module.exports;
19120
19145
});
19121
19146
19122
- System.register("npm:postcss-css-variables@0.3.1 /index", ["npm:postcss@4.1.9", "npm:extend@2.0.1", "github:jspm/nodelibs-process@0.1.1"], true, function(require, exports, module) {
19147
+ System.register("npm:postcss-css-variables@0.3.3 /index", ["npm:postcss@4.1.9", "npm:extend@2.0.1", "npm:escape-string-regexp@1.0.3 ", "github:jspm/nodelibs-process@0.1.1"], true, function(require, exports, module) {
19123
19148
var global = System.global,
19124
19149
__define = global.define;
19125
19150
global.define = undefined;
19126
19151
(function(process) {
19127
19152
var postcss = require("npm:postcss@4.1.9");
19128
19153
var extend = require("npm:extend@2.0.1");
19154
+ var escapeStringRegexp = require("npm:escape-string-regexp@1.0.3");
19129
19155
var RE_VAR_PROP = (/(--(.+))/);
19130
19156
var RE_VAR_FUNC = (/var\((--[^,\s]+?)(?:\s*,\s*(.+))?\)/);
19131
19157
var RE_SELECTOR_DESCENDANT_SPLIT = (/(.*?(?:(?:\[[^\]]+\]|(?![><+~\s]).)+)(?:(?:(?:\s(?!>>))|(?:\t(?!>>))|(?:\s?>>\s?))(?!\s+))(?![><+~][\s]+?))/);
@@ -19185,6 +19211,18 @@ System.register("npm:postcss-css-variables@0.3.1/index", ["npm:postcss@4.1.9", "
19185
19211
}
19186
19212
return matchingNode;
19187
19213
}
19214
+ function generateDescendantPieces(selector) {
19215
+ return selector.split(RE_SELECTOR_DESCENDANT_SPLIT).filter(function(piece) {
19216
+ if (piece.length > 0) {
19217
+ return true;
19218
+ }
19219
+ return false;
19220
+ }).map(function(piece) {
19221
+ return piece.trim().replace(/\s*?>>\s*?/, function(match) {
19222
+ return '';
19223
+ });
19224
+ });
19225
+ }
19188
19226
function generateScopeList(node, includeSelf) {
19189
19227
includeSelf = includeSelf || false;
19190
19228
var selectorScopeList = [[]];
@@ -19213,16 +19251,7 @@ System.register("npm:postcss-css-variables@0.3.1/index", ["npm:postcss@4.1.9", "
19213
19251
branches[index] = branches[index].map(function(scopeStringPieces) {
19214
19252
var descendantPieces = [scopeObject.value];
19215
19253
if (scopeObject.type === 'selector') {
19216
- descendantPieces = scopeObject.value.split(RE_SELECTOR_DESCENDANT_SPLIT).filter(function(piece) {
19217
- if (piece.length > 0) {
19218
- return true;
19219
- }
19220
- return false;
19221
- }).map(function(piece) {
19222
- return piece.trim().replace(/\s*?>>\s*?/, function(match) {
19223
- return '';
19224
- });
19225
- });
19254
+ descendantPieces = generateDescendantPieces(scopeObject.value);
19226
19255
}
19227
19256
scopeStringPieces.unshift.apply(scopeStringPieces, descendantPieces);
19228
19257
return scopeStringPieces;
@@ -19236,15 +19265,21 @@ System.register("npm:postcss-css-variables@0.3.1/index", ["npm:postcss@4.1.9", "
19236
19265
}
19237
19266
return selectorScopeList;
19238
19267
}
19239
- function isUnderScope(node, scopeNode) {
19240
- var nodeScopeList = generateScopeList(node, true);
19241
- var scopeNodeList = generateScopeList(scopeNode, true);
19242
- var matchesScope = scopeNodeList.some(function(scopeNodeScopePieces) {
19268
+ function isUnderScope(nodeScopeList, scopeNodeScopeList) {
19269
+ var matchesScope = scopeNodeScopeList.some(function(scopeNodeScopePieces) {
19243
19270
return nodeScopeList.some(function(nodeScopePieces) {
19244
19271
var currentPieceOffset;
19245
19272
var wasEveryPieceFound = scopeNodeScopePieces.every(function(scopePiece) {
19246
19273
var pieceOffset = currentPieceOffset || 0;
19247
- var foundIndex = nodeScopePieces.indexOf(scopePiece, pieceOffset);
19274
+ var foundIndex = -1;
19275
+ var piecesWeCanMatch = nodeScopePieces.slice(pieceOffset);
19276
+ piecesWeCanMatch.some(function(nodeScopePiece, index) {
19277
+ if (new RegExp(escapeStringRegexp(scopePiece) + '$').test(nodeScopePiece)) {
19278
+ foundIndex = pieceOffset + index;
19279
+ return true;
19280
+ }
19281
+ return false;
19282
+ });
19248
19283
if (foundIndex < 0 && (scopePiece === '*' || scopePiece === ':root')) {
19249
19284
foundIndex = pieceOffset + 1;
19250
19285
}
@@ -19257,6 +19292,11 @@ System.register("npm:postcss-css-variables@0.3.1/index", ["npm:postcss@4.1.9", "
19257
19292
});
19258
19293
return matchesScope;
19259
19294
}
19295
+ function isNodeUnderNode(node, scopeNode) {
19296
+ var nodeScopeList = generateScopeList(node, true);
19297
+ var scopeNodeScopeList = generateScopeList(scopeNode, true);
19298
+ return isUnderScope(nodeScopeList, scopeNodeScopeList);
19299
+ }
19260
19300
var resolveValue = function(decl, map) {
19261
19301
var resultantValue = decl.value;
19262
19302
var variablesUsedInValue = [];
@@ -19267,8 +19307,7 @@ System.register("npm:postcss-css-variables@0.3.1/index", ["npm:postcss@4.1.9", "
19267
19307
var matchingVarDeclMapItem;
19268
19308
(map[variableName] || []).forEach(function(varDeclMapItem) {
19269
19309
var isRoot = varDeclMapItem.parent.type === 'root' || varDeclMapItem.parent.selectors[0] === ':root';
19270
- var mimicDeclParent = decl.parent;
19271
- if (isUnderScope(mimicDeclParent, varDeclMapItem.parent) && (!(matchingVarDeclMapItem || {}).isImportant || varDeclMapItem.isImportant)) {
19310
+ if (isNodeUnderNode(decl.parent, varDeclMapItem.parent) && (!(matchingVarDeclMapItem || {}).isImportant || varDeclMapItem.isImportant)) {
19272
19311
matchingVarDeclMapItem = varDeclMapItem;
19273
19312
}
19274
19313
});
@@ -19373,7 +19412,7 @@ System.register("npm:postcss-css-variables@0.3.1/index", ["npm:postcss@4.1.9", "
19373
19412
var mimicDecl = cloneSpliceParentOntoNodeWhen(decl, varDeclAtRule, function(ancestor) {
19374
19413
return ancestor === currentNodeToSpliceParentOnto;
19375
19414
});
19376
- if (isUnderScope (mimicDecl.parent, varDeclMapItem.parent)) {
19415
+ if (isNodeUnderNode (mimicDecl.parent, varDeclMapItem.parent)) {
19377
19416
var atRuleNode = varDeclMapItem.parent.parent.clone().removeAll();
19378
19417
var ruleClone = decl.parent.clone().removeAll();
19379
19418
var declClone = decl.clone();
@@ -21116,11 +21155,11 @@ System.register("npm:postcss@4.1.9/lib/input", ["npm:postcss@4.1.9/lib/css-synta
21116
21155
return module.exports;
21117
21156
});
21118
21157
21119
- System.register("npm:postcss-css-variables@0.3.1 ", ["npm:postcss-css-variables@0.3.1 /index"], true, function(require, exports, module) {
21158
+ System.register("npm:postcss-css-variables@0.3.3 ", ["npm:postcss-css-variables@0.3.3 /index"], true, function(require, exports, module) {
21120
21159
var global = System.global,
21121
21160
__define = global.define;
21122
21161
global.define = undefined;
21123
- module.exports = require("npm:postcss-css-variables@0.3.1 /index");
21162
+ module.exports = require("npm:postcss-css-variables@0.3.3 /index");
21124
21163
global.define = __define;
21125
21164
return module.exports;
21126
21165
});
@@ -25303,7 +25342,7 @@ System.register('src/js/components/PlaygroundHeader', ['npm:babel-runtime@5.2.6/
25303
25342
}
25304
25343
};
25305
25344
});
25306
- System.register('src/js/stores/PlaygroundStore', ['src/js/dispatcher/AppDispatcher', 'src/js/constants/PlaygroundConstants', 'src/js/stores/PlaygroundSettingsStore', 'npm:object-assign@2.0.0', 'npm:immutable@3.7.2', 'npm:events@1.0.2', 'npm:postcss@4.1.9', 'npm:postcss-css-variables@0.3.1 '], function (_export) {
25345
+ System.register('src/js/stores/PlaygroundStore', ['src/js/dispatcher/AppDispatcher', 'src/js/constants/PlaygroundConstants', 'src/js/stores/PlaygroundSettingsStore', 'npm:object-assign@2.0.0', 'npm:immutable@3.7.2', 'npm:events@1.0.2', 'npm:postcss@4.1.9', 'npm:postcss-css-variables@0.3.3 '], function (_export) {
25307
25346
var AppDispatcher, PlaygroundConstants, PlaygroundSettingsStore, assign, Immutable, events, postcss, cssvariables, EventEmitter, CHANGE_EVENT, keyboardActionStream, playgroundProcessor, postcssUnprocessedInputText, processingResult, PlaygroundStore;
25308
25347
25309
25348
function updateProcessor(settings) {
@@ -25349,8 +25388,8 @@ System.register('src/js/stores/PlaygroundStore', ['src/js/dispatcher/AppDispatch
25349
25388
events = _npmEvents102['default'];
25350
25389
}, function (_npmPostcss419) {
25351
25390
postcss = _npmPostcss419['default'];
25352
- }, function (_npmPostcssCssVariables031 ) {
25353
- cssvariables = _npmPostcssCssVariables031 ['default'];
25391
+ }, function (_npmPostcssCssVariables033 ) {
25392
+ cssvariables = _npmPostcssCssVariables033 ['default'];
25354
25393
}],
25355
25394
execute: function () {
25356
25395
'use strict';
0 commit comments