Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uifabric/merge-styles

Package Overview
Dependencies
Maintainers
2
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uifabric/merge-styles - npm Package Compare versions

Comparing version 5.8.0 to 5.8.1

14

CHANGELOG.json

@@ -5,2 +5,16 @@ {

{
"version": "5.8.1",
"tag": "@uifabric/merge-styles_v5.8.1",
"date": "Mon, 11 Dec 2017 11:24:05 GMT",
"comments": {
"patch": [
{
"author": "David Zearing <dzearing@microsoft.com>",
"commit": "a1c3530c60b1b1b90de33fb917d0f668f1055525",
"comment": "Fixing issues where child variables in selectors would not expand correctly. Also fixing a case where the same static class registered in two different sets will not show up multiple times in the result from `mergeStyleSets`."
}
]
}
},
{
"version": "5.8.0",

@@ -7,0 +21,0 @@ "tag": "@uifabric/merge-styles_v5.8.0",

9

CHANGELOG.md
# Change Log - @uifabric/merge-styles
This log was last generated on Fri, 01 Dec 2017 11:11:16 GMT and should not be manually modified.
This log was last generated on Mon, 11 Dec 2017 11:24:05 GMT and should not be manually modified.
## 5.8.1
Mon, 11 Dec 2017 11:24:05 GMT
### Patches
- Fixing issues where child variables in selectors would not expand correctly. Also fixing a case where the same static class registered in two different sets will not show up multiple times in the result from `mergeStyleSets`.
## 5.8.0

@@ -6,0 +13,0 @@ Fri, 01 Dec 2017 11:11:16 GMT

9

dist/merge-styles.js

@@ -472,3 +472,6 @@ var MergeStyles =

else {
classes.push(arg);
// Avoid adding the same class twice.
if (classes.indexOf(arg) === -1) {
classes.push(arg);
}
}

@@ -1006,2 +1009,3 @@ }

var classNameSet = {};
var classMap = {};
var cssSet = cssSets[0];

@@ -1021,2 +1025,3 @@ if (cssSet) {

if (registration) {
classMap[prop] = registration.className;
classNameSet[prop] = classes.concat([registration.className]).join(' ');

@@ -1029,3 +1034,3 @@ }

if (registration) {
styleToClassName_1.applyRegistration(registration, classNameSet);
styleToClassName_1.applyRegistration(registration, classMap);
}

@@ -1032,0 +1037,0 @@ }

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

var MergeStyles=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,r){"use strict";function n(e){var t=document.createElement("style");return t.setAttribute("data-merge-styles","true"),t.type="text/css",e&&t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}Object.defineProperty(t,"__esModule",{value:!0});var o=r(6);!function(e){e[e.none=0]="none",e[e.insertNode=1]="insertNode",e[e.appendChild=2]="appendChild"}(t.InjectionMode||(t.InjectionMode={}));var i,s=function(){function e(e){this._config=o.__assign({injectionMode:1},e),this.reset()}return e.getInstance=function(){var t="undefined"!=typeof window?window:{};if(!(i=t.__stylesheet__)){var r=t&&t.FabricConfig||{};i=t.__stylesheet__=new e(r.mergeStyles)}return i},e.prototype.setConfig=function(e){this._config=o.__assign({},this._config,e)},e.prototype.getClassName=function(e){return(e||"css")+"-"+this._counter++},e.prototype.cacheClassName=function(e,t,r,n){this._keyToClassName[t]=e,this._classNameToArgs[e]={args:r,rules:n}},e.prototype.classNameFromKey=function(e){return this._keyToClassName[e]},e.prototype.argsFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.args},e.prototype.insertedRulesFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.rules},e.prototype.insertRule=function(e){var t=this._getElement();switch(t?this._config.injectionMode:0){case 1:var r=t.sheet;try{r.insertRule(e,r.cssRules.length)}catch(e){}break;case 2:n(e);break;default:this._rules.push(e)}this._config.onInsertRule&&this._config.onInsertRule(e)},e.prototype.getRules=function(){return(this._rules.join("")||"")+(this._rulesToInsert.join("")||"")},e.prototype.reset=function(){this._rules=[],this._rulesToInsert=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._timerId&&(clearTimeout(this._timerId),this._timerId=0)},e.prototype._getElement=function(){return this._styleElement||"undefined"==typeof document||(this._styleElement=n()),this._styleElement},e}();t.Stylesheet=s},function(e,t,r){"use strict";function n(e){var t=e&&e["&"];return t?t.displayName:void 0}function o(e,t,r){void 0===t&&(t={__order:[]}),void 0===r&&(r="&");var n=f.Stylesheet.getInstance(),s=t[r];s||(s={},t[r]=s,t.__order.push(r));for(var a=0,u=e;a<u.length;a++){var c=u[a];if("string"==typeof c){var l=n.argsFromClassName(c);l&&o(l,t,r)}else if(Array.isArray(c))o(c,t,r);else for(var p in c)if("selectors"===p){var y=c.selectors;for(var d in y)if(y.hasOwnProperty(d)){var v=y[d];0===d.indexOf("@media")?d=d+"{"+r:0===d.indexOf(":")?d=r+d:d.indexOf("&")<0&&(d=r+" "+d),o([v],t,d)}}else"margin"===p||"padding"===p?i(s,p,c[p]):s[p]=c[p]}return t}function i(e,t,r){var n="string"==typeof r?r.split(" "):[r];e[t+"Top"]=n[0],e[t+"Right"]=n[1]||n[0],e[t+"Bottom"]=n[2]||n[0],e[t+"Left"]=n[3]||n[1]||n[0]}function s(e){for(var t=[],r=!1,n=0,o=e.__order;n<o.length;n++){var i=o[n];t.push(i);var s=e[i];for(var a in s)s.hasOwnProperty(a)&&(r=!0,t.push(a,s[a]))}return r?t.join(""):void 0}function a(e){if(!e)return"";var t=[];for(var r in e)e.hasOwnProperty(r)&&r!==h&&t.push(r,e[r]);for(var n=0;n<t.length;n+=2)p.kebabRules(t,n),d.provideUnits(t,n),v.rtlifyRules(t,n),y.prefixRules(t,n);for(var n=1;n<t.length;n+=4)t.splice(n,1,":",t[n],";");return t.join("")}function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o(e),i=s(r);if(i){var u=f.Stylesheet.getInstance(),c={className:u.classNameFromKey(i),key:i,args:e};if(!c.className){c.className=u.getClassName(n(r));for(var l=[],p=0,y=r.__order;p<y.length;p++){var d=y[p];l.push(d,a(r[d]))}c.rulesToInsert=l}return c}}function c(e,t){var r=f.Stylesheet.getInstance(),n=e.className,o=e.key,i=e.args,s=e.rulesToInsert;if(s){for(var a=0;a<s.length;a+=2){var u=s[a+1];if(u){var c=s[a];c=c.replace(/(&)|\$([\w-]+)\b/g,function(r,n,o){return n?"."+e.className:o?"."+(t&&t[o]||o):""});var l=c+"{"+u+"}"+(0===c.indexOf("@media")?"}":"");r.insertRule(l)}}r.cacheClassName(n,o,i,s)}}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.apply(void 0,e);return r?(c(r),r.className):""}Object.defineProperty(t,"__esModule",{value:!0});var f=r(0),p=r(7),y=r(8),d=r(10),v=r(11),h="displayName";t.serializeRuleEntries=a,t.styleToRegistration=u,t.applyRegistration=c,t.styleToClassName=l},function(e,t,r){"use strict";function n(){function e(t){for(var r=0,o=t;r<o.length;r++){var a=o[r];if(a)if("string"==typeof a)if(a.indexOf(" ")>=0)e(a.split(" "));else{var u=s.argsFromClassName(a);u?e(u):n.push(a)}else Array.isArray(a)?e(a):"object"==typeof a&&i.push(a)}}for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=[],i=[],s=o.Stylesheet.getInstance();return e(t),{classes:n,objects:i}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0);t.extractStyleParts=n},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r={},n=0,o=e;n<o.length;n++){var i=o[n];if(i)for(var s in i)if(i.hasOwnProperty(s)){var a=r[s],u=i[s];r[s]=void 0===a?u:(Array.isArray(a)?a:[a]).concat(Array.isArray(u)?u:[u])}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.concatStyleSets=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5);t.mergeStyles=n.mergeStyles;var o=r(12);t.mergeStyleSets=o.mergeStyleSets;var i=r(3);t.concatStyleSets=i.concatStyleSets;var s=r(13);t.fontFace=s.fontFace;var a=r(14);t.keyframes=a.keyframes;var u=r(0);t.InjectionMode=u.InjectionMode,t.Stylesheet=u.Stylesheet},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.extractStyleParts(e),n=r.classes,s=r.objects;return s.length&&n.push(o.styleToClassName(s)),n.join(" ")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(2);t.mergeStyles=n},function(e,t,r){"use strict";function n(e,t){function r(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]]);return r}function i(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function s(e,t){return function(r,n){t(r,n,e)}}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(s,a)}u((n=n.apply(e,t||[])).next())})}function c(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&r[0]?"return":r[0]?"throw":"next"])&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){u.label=r[1];break}if(6===r[0]&&u.label<s[1]){u.label=s[1],s=r;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(r);break}s[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a}function l(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function v(e,t,r){function n(e){l[e]&&(c[e]=function(t){return new Promise(function(r,n){f.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{i(l[e](t))}catch(e){u(f[0][3],e)}}function i(e){e.value instanceof d?Promise.resolve(e.value.v).then(s,a):u(f[0][2],e)}function s(e){o("next",e)}function a(e){o("throw",e)}function u(e,t){e(t),f.shift(),f.length&&o(f[0][0],f[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,l=r.apply(e,t||[]),f=[];return c={},n("next"),n("throw"),n("return"),c[Symbol.asyncIterator]=function(){return this},c}function h(e){function t(t,o){e[t]&&(r[t]=function(r){return(n=!n)?{value:d(e[t](r)),done:"return"===t}:o?o(r):r})}var r,n;return r={},t("next"),t("throw",function(e){throw e}),t("return"),r[Symbol.iterator]=function(){return this},r}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof f?f(e):e[Symbol.iterator]()}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.defineProperty(t,"__esModule",{value:!0}),t.__extends=n,r.d(t,"__assign",function(){return b}),t.__rest=o,t.__decorate=i,t.__param=s,t.__metadata=a,t.__awaiter=u,t.__generator=c,t.__exportStar=l,t.__values=f,t.__read=p,t.__spread=y,t.__await=d,t.__asyncGenerator=v,t.__asyncDelegator=h,t.__asyncValues=g,t.__makeTemplateObject=_;/*! *****************************************************************************
var MergeStyles=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,r){"use strict";function n(e){var t=document.createElement("style");return t.setAttribute("data-merge-styles","true"),t.type="text/css",e&&t.appendChild(document.createTextNode(e)),document.head.appendChild(t),t}Object.defineProperty(t,"__esModule",{value:!0});var o=r(6);!function(e){e[e.none=0]="none",e[e.insertNode=1]="insertNode",e[e.appendChild=2]="appendChild"}(t.InjectionMode||(t.InjectionMode={}));var i,s=function(){function e(e){this._config=o.__assign({injectionMode:1},e),this.reset()}return e.getInstance=function(){var t="undefined"!=typeof window?window:{};if(!(i=t.__stylesheet__)){var r=t&&t.FabricConfig||{};i=t.__stylesheet__=new e(r.mergeStyles)}return i},e.prototype.setConfig=function(e){this._config=o.__assign({},this._config,e)},e.prototype.getClassName=function(e){return(e||"css")+"-"+this._counter++},e.prototype.cacheClassName=function(e,t,r,n){this._keyToClassName[t]=e,this._classNameToArgs[e]={args:r,rules:n}},e.prototype.classNameFromKey=function(e){return this._keyToClassName[e]},e.prototype.argsFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.args},e.prototype.insertedRulesFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.rules},e.prototype.insertRule=function(e){var t=this._getElement();switch(t?this._config.injectionMode:0){case 1:var r=t.sheet;try{r.insertRule(e,r.cssRules.length)}catch(e){}break;case 2:n(e);break;default:this._rules.push(e)}this._config.onInsertRule&&this._config.onInsertRule(e)},e.prototype.getRules=function(){return(this._rules.join("")||"")+(this._rulesToInsert.join("")||"")},e.prototype.reset=function(){this._rules=[],this._rulesToInsert=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._timerId&&(clearTimeout(this._timerId),this._timerId=0)},e.prototype._getElement=function(){return this._styleElement||"undefined"==typeof document||(this._styleElement=n()),this._styleElement},e}();t.Stylesheet=s},function(e,t,r){"use strict";function n(e){var t=e&&e["&"];return t?t.displayName:void 0}function o(e,t,r){void 0===t&&(t={__order:[]}),void 0===r&&(r="&");var n=f.Stylesheet.getInstance(),s=t[r];s||(s={},t[r]=s,t.__order.push(r));for(var a=0,u=e;a<u.length;a++){var c=u[a];if("string"==typeof c){var l=n.argsFromClassName(c);l&&o(l,t,r)}else if(Array.isArray(c))o(c,t,r);else for(var p in c)if("selectors"===p){var y=c.selectors;for(var d in y)if(y.hasOwnProperty(d)){var v=y[d];0===d.indexOf("@media")?d=d+"{"+r:0===d.indexOf(":")?d=r+d:d.indexOf("&")<0&&(d=r+" "+d),o([v],t,d)}}else"margin"===p||"padding"===p?i(s,p,c[p]):s[p]=c[p]}return t}function i(e,t,r){var n="string"==typeof r?r.split(" "):[r];e[t+"Top"]=n[0],e[t+"Right"]=n[1]||n[0],e[t+"Bottom"]=n[2]||n[0],e[t+"Left"]=n[3]||n[1]||n[0]}function s(e){for(var t=[],r=!1,n=0,o=e.__order;n<o.length;n++){var i=o[n];t.push(i);var s=e[i];for(var a in s)s.hasOwnProperty(a)&&(r=!0,t.push(a,s[a]))}return r?t.join(""):void 0}function a(e){if(!e)return"";var t=[];for(var r in e)e.hasOwnProperty(r)&&r!==h&&t.push(r,e[r]);for(var n=0;n<t.length;n+=2)p.kebabRules(t,n),d.provideUnits(t,n),v.rtlifyRules(t,n),y.prefixRules(t,n);for(var n=1;n<t.length;n+=4)t.splice(n,1,":",t[n],";");return t.join("")}function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o(e),i=s(r);if(i){var u=f.Stylesheet.getInstance(),c={className:u.classNameFromKey(i),key:i,args:e};if(!c.className){c.className=u.getClassName(n(r));for(var l=[],p=0,y=r.__order;p<y.length;p++){var d=y[p];l.push(d,a(r[d]))}c.rulesToInsert=l}return c}}function c(e,t){var r=f.Stylesheet.getInstance(),n=e.className,o=e.key,i=e.args,s=e.rulesToInsert;if(s){for(var a=0;a<s.length;a+=2){var u=s[a+1];if(u){var c=s[a];c=c.replace(/(&)|\$([\w-]+)\b/g,function(r,n,o){return n?"."+e.className:o?"."+(t&&t[o]||o):""});var l=c+"{"+u+"}"+(0===c.indexOf("@media")?"}":"");r.insertRule(l)}}r.cacheClassName(n,o,i,s)}}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.apply(void 0,e);return r?(c(r),r.className):""}Object.defineProperty(t,"__esModule",{value:!0});var f=r(0),p=r(7),y=r(8),d=r(10),v=r(11),h="displayName";t.serializeRuleEntries=a,t.styleToRegistration=u,t.applyRegistration=c,t.styleToClassName=l},function(e,t,r){"use strict";function n(){function e(t){for(var r=0,o=t;r<o.length;r++){var a=o[r];if(a)if("string"==typeof a)if(a.indexOf(" ")>=0)e(a.split(" "));else{var u=s.argsFromClassName(a);u?e(u):-1===n.indexOf(a)&&n.push(a)}else Array.isArray(a)?e(a):"object"==typeof a&&i.push(a)}}for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=[],i=[],s=o.Stylesheet.getInstance();return e(t),{classes:n,objects:i}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0);t.extractStyleParts=n},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r={},n=0,o=e;n<o.length;n++){var i=o[n];if(i)for(var s in i)if(i.hasOwnProperty(s)){var a=r[s],u=i[s];r[s]=void 0===a?u:(Array.isArray(a)?a:[a]).concat(Array.isArray(u)?u:[u])}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.concatStyleSets=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5);t.mergeStyles=n.mergeStyles;var o=r(12);t.mergeStyleSets=o.mergeStyleSets;var i=r(3);t.concatStyleSets=i.concatStyleSets;var s=r(13);t.fontFace=s.fontFace;var a=r(14);t.keyframes=a.keyframes;var u=r(0);t.InjectionMode=u.InjectionMode,t.Stylesheet=u.Stylesheet},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.extractStyleParts(e),n=r.classes,s=r.objects;return s.length&&n.push(o.styleToClassName(s)),n.join(" ")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(2);t.mergeStyles=n},function(e,t,r){"use strict";function n(e,t){function r(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]]);return r}function i(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function s(e,t){return function(r,n){t(r,n,e)}}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(s,a)}u((n=n.apply(e,t||[])).next())})}function c(e,t){function r(e){return function(t){return n([e,t])}}function n(r){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(s=i[2&r[0]?"return":r[0]?"throw":"next"])&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){u=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){u.label=r[1];break}if(6===r[0]&&u.label<s[1]){u.label=s[1],s=r;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(r);break}s[2]&&u.ops.pop(),u.trys.pop();continue}r=t.call(e,u)}catch(e){r=[6,e],i=0}finally{o=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var o,i,s,a,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a}function l(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function v(e,t,r){function n(e){l[e]&&(c[e]=function(t){return new Promise(function(r,n){f.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{i(l[e](t))}catch(e){u(f[0][3],e)}}function i(e){e.value instanceof d?Promise.resolve(e.value.v).then(s,a):u(f[0][2],e)}function s(e){o("next",e)}function a(e){o("throw",e)}function u(e,t){e(t),f.shift(),f.length&&o(f[0][0],f[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c,l=r.apply(e,t||[]),f=[];return c={},n("next"),n("throw"),n("return"),c[Symbol.asyncIterator]=function(){return this},c}function h(e){function t(t,o){e[t]&&(r[t]=function(r){return(n=!n)?{value:d(e[t](r)),done:"return"===t}:o?o(r):r})}var r,n;return r={},t("next"),t("throw",function(e){throw e}),t("return"),r[Symbol.iterator]=function(){return this},r}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof f?f(e):e[Symbol.iterator]()}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.defineProperty(t,"__esModule",{value:!0}),t.__extends=n,r.d(t,"__assign",function(){return b}),t.__rest=o,t.__decorate=i,t.__param=s,t.__metadata=a,t.__awaiter=u,t.__generator=c,t.__exportStar=l,t.__values=f,t.__read=p,t.__spread=y,t.__await=d,t.__asyncGenerator=v,t.__asyncDelegator=h,t.__asyncValues=g,t.__makeTemplateObject=_;/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.

@@ -15,2 +15,2 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use

***************************************************************************** */
var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}},function(e,t,r){"use strict";function n(e,t){e[t]=e[t].replace(/([A-Z])/g,"-$1").toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.kebabRules=n},function(e,t,r){"use strict";function n(e,t){var r=o.getVendorSettings(),n=e[t];if(i[n]){var s=e[t+1];i[n]&&(r.isWebkit&&e.push("-webkit-"+n,s),r.isMoz&&e.push("-moz-"+n,s),r.isMs&&e.push("-ms-"+n,s),r.isOpera&&e.push("-o-"+n,s))}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(9),i={"user-select":1};t.prefixRules=n},function(e,t,r){"use strict";function n(){if(!i){var e="undefined"!=typeof document?document:void 0,t="undefined"!=typeof navigator?navigator:void 0,r=t?t.userAgent.toLowerCase():void 0;i=e?{isWebkit:!!(e&&"WebkitAppearance"in e.documentElement.style),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!t||!/rv:11.0/i.test(t.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return i}function o(e){i=e}Object.defineProperty(t,"__esModule",{value:!0});var i;t.getVendorSettings=n,t.setVendorSettings=o},function(e,t,r){"use strict";function n(e,t){var r=e[t],n=e[t+1];if("number"==typeof n){var i=-1===o.indexOf(r)?"px":"";e[t+1]=""+n+i}}Object.defineProperty(t,"__esModule",{value:!0});var o=["column-count","font-weight","flex-basis","flex","flex-grow","flex-shrink","opacity","order","z-index","zoom"];t.provideUnits=n},function(e,t,r){"use strict";function n(e){f=e}function o(){return void 0===f&&(f="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),f}function i(e,t){if(o()){var r=e[t],n=e[t+1];if(n.indexOf(l)>=0)e[t+1]=n.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf("left")>=0)e[t]=r.replace("left","right");else if(r.indexOf("right")>=0)e[t]=r.replace("right","left");else if(String(n).indexOf("left")>=0)e[t+1]=n.replace("left","right");else if(String(n).indexOf("right")>=0)e[t+1]=n.replace("right","left");else if(u[r])e[t]=u[r];else if(c[n])e[t+1]=c[n];else switch(r){case"margin":case"padding":e[t+1]=a(n);break;case"box-shadow":e[t+1]=s(n,0)}}}function s(e,t){var r=e.split(" "),n=parseInt(r[t],10);return r[0]=r[0].replace(String(n),String(-1*n)),r.join(" ")}function a(e){if("string"==typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}Object.defineProperty(t,"__esModule",{value:!0});var u={left:"right",right:"left"},c={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"},l="@noflip",f=o();t.setRTL=n,t.getRTL=o,t.rtlifyRules=i},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={},n=e[0];if(n){e.length>1&&(n=i.concatStyleSets.apply(void 0,e));var a=[];for(var u in n)if(n.hasOwnProperty(u)){var c=n[u],l=o.extractStyleParts(c),f=l.classes,p=l.objects,y=s.styleToRegistration({displayName:u},p);a.push(y),y&&(r[u]=f.concat([y.className]).join(" "))}for(var d=0,v=a;d<v.length;d++){var y=v[d];y&&s.applyRegistration(y,r)}}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=r(3),s=r(1);t.mergeStyleSets=n},function(e,t,r){"use strict";function n(e){o.Stylesheet.getInstance().insertRule("@font-face{"+i.serializeRuleEntries(e)+"}")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.fontFace=n},function(e,t,r){"use strict";function n(e){var t=o.Stylesheet.getInstance(),r=t.getClassName(),n=[];for(var s in e)e.hasOwnProperty(s)&&n.push(s,"{",i.serializeRuleEntries(e[s]),"}");var a=n.join("");return t.insertRule("@keyframes "+r+"{"+a+"}"),r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.keyframes=n}]);
var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}},function(e,t,r){"use strict";function n(e,t){e[t]=e[t].replace(/([A-Z])/g,"-$1").toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.kebabRules=n},function(e,t,r){"use strict";function n(e,t){var r=o.getVendorSettings(),n=e[t];if(i[n]){var s=e[t+1];i[n]&&(r.isWebkit&&e.push("-webkit-"+n,s),r.isMoz&&e.push("-moz-"+n,s),r.isMs&&e.push("-ms-"+n,s),r.isOpera&&e.push("-o-"+n,s))}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(9),i={"user-select":1};t.prefixRules=n},function(e,t,r){"use strict";function n(){if(!i){var e="undefined"!=typeof document?document:void 0,t="undefined"!=typeof navigator?navigator:void 0,r=t?t.userAgent.toLowerCase():void 0;i=e?{isWebkit:!!(e&&"WebkitAppearance"in e.documentElement.style),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!t||!/rv:11.0/i.test(t.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return i}function o(e){i=e}Object.defineProperty(t,"__esModule",{value:!0});var i;t.getVendorSettings=n,t.setVendorSettings=o},function(e,t,r){"use strict";function n(e,t){var r=e[t],n=e[t+1];if("number"==typeof n){var i=-1===o.indexOf(r)?"px":"";e[t+1]=""+n+i}}Object.defineProperty(t,"__esModule",{value:!0});var o=["column-count","font-weight","flex-basis","flex","flex-grow","flex-shrink","opacity","order","z-index","zoom"];t.provideUnits=n},function(e,t,r){"use strict";function n(e){f=e}function o(){return void 0===f&&(f="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),f}function i(e,t){if(o()){var r=e[t],n=e[t+1];if(n.indexOf(l)>=0)e[t+1]=n.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf("left")>=0)e[t]=r.replace("left","right");else if(r.indexOf("right")>=0)e[t]=r.replace("right","left");else if(String(n).indexOf("left")>=0)e[t+1]=n.replace("left","right");else if(String(n).indexOf("right")>=0)e[t+1]=n.replace("right","left");else if(u[r])e[t]=u[r];else if(c[n])e[t+1]=c[n];else switch(r){case"margin":case"padding":e[t+1]=a(n);break;case"box-shadow":e[t+1]=s(n,0)}}}function s(e,t){var r=e.split(" "),n=parseInt(r[t],10);return r[0]=r[0].replace(String(n),String(-1*n)),r.join(" ")}function a(e){if("string"==typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}Object.defineProperty(t,"__esModule",{value:!0});var u={left:"right",right:"left"},c={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"},l="@noflip",f=o();t.setRTL=n,t.getRTL=o,t.rtlifyRules=i},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r={},n={},a=e[0];if(a){e.length>1&&(a=i.concatStyleSets.apply(void 0,e));var u=[];for(var c in a)if(a.hasOwnProperty(c)){var l=a[c],f=o.extractStyleParts(l),p=f.classes,y=f.objects,d=s.styleToRegistration({displayName:c},y);u.push(d),d&&(n[c]=d.className,r[c]=p.concat([d.className]).join(" "))}for(var v=0,h=u;v<h.length;v++){var d=h[v];d&&s.applyRegistration(d,n)}}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),i=r(3),s=r(1);t.mergeStyleSets=n},function(e,t,r){"use strict";function n(e){o.Stylesheet.getInstance().insertRule("@font-face{"+i.serializeRuleEntries(e)+"}")}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.fontFace=n},function(e,t,r){"use strict";function n(e){var t=o.Stylesheet.getInstance(),r=t.getClassName(),n=[];for(var s in e)e.hasOwnProperty(s)&&n.push(s,"{",i.serializeRuleEntries(e[s]),"}");var a=n.join("");return t.insertRule("@keyframes "+r+"{"+a+"}"),r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(1);t.keyframes=n}]);

@@ -30,3 +30,6 @@ define(["require", "exports", "./Stylesheet"], function (require, exports, Stylesheet_1) {

else {
classes.push(arg);
// Avoid adding the same class twice.
if (classes.indexOf(arg) === -1) {
classes.push(arg);
}
}

@@ -33,0 +36,0 @@ }

@@ -17,2 +17,3 @@ define(["require", "exports", "./extractStyleParts", "./concatStyleSets", "./styleToClassName"], function (require, exports, extractStyleParts_1, concatStyleSets_1, styleToClassName_1) {

var classNameSet = {};
var classMap = {};
var cssSet = cssSets[0];

@@ -32,2 +33,3 @@ if (cssSet) {

if (registration) {
classMap[prop] = registration.className;
classNameSet[prop] = classes.concat([registration.className]).join(' ');

@@ -40,3 +42,3 @@ }

if (registration) {
styleToClassName_1.applyRegistration(registration, classNameSet);
styleToClassName_1.applyRegistration(registration, classMap);
}

@@ -43,0 +45,0 @@ }

@@ -28,3 +28,6 @@ import { Stylesheet } from './Stylesheet';

else {
classes.push(arg);
// Avoid adding the same class twice.
if (classes.indexOf(arg) === -1) {
classes.push(arg);
}
}

@@ -31,0 +34,0 @@ }

@@ -17,2 +17,3 @@ import { extractStyleParts } from './extractStyleParts';

var classNameSet = {};
var classMap = {};
var cssSet = cssSets[0];

@@ -32,2 +33,3 @@ if (cssSet) {

if (registration) {
classMap[prop] = registration.className;
classNameSet[prop] = classes.concat([registration.className]).join(' ');

@@ -40,3 +42,3 @@ }

if (registration) {
applyRegistration(registration, classNameSet);
applyRegistration(registration, classMap);
}

@@ -43,0 +45,0 @@ }

@@ -30,3 +30,6 @@ "use strict";

else {
classes.push(arg);
// Avoid adding the same class twice.
if (classes.indexOf(arg) === -1) {
classes.push(arg);
}
}

@@ -33,0 +36,0 @@ }

@@ -19,2 +19,3 @@ "use strict";

var classNameSet = {};
var classMap = {};
var cssSet = cssSets[0];

@@ -34,2 +35,3 @@ if (cssSet) {

if (registration) {
classMap[prop] = registration.className;
classNameSet[prop] = classes.concat([registration.className]).join(' ');

@@ -42,3 +44,3 @@ }

if (registration) {
styleToClassName_1.applyRegistration(registration, classNameSet);
styleToClassName_1.applyRegistration(registration, classMap);
}

@@ -45,0 +47,0 @@ }

@@ -5,4 +5,4 @@ {

"packages/merge-styles/.npmrc": "825c83e09df4dad076d980d1236c532d689edf75",
"packages/merge-styles/CHANGELOG.json": "c1fe76f413ff5b47c447314d62f0f32a6321c169",
"packages/merge-styles/CHANGELOG.md": "465bcae14702b7548c10f5aac05912767cf64626",
"packages/merge-styles/CHANGELOG.json": "14ae3ad617d2b71b73906abff129de9565922e81",
"packages/merge-styles/CHANGELOG.md": "458d6c666bcd4051bba35c9174c7af4623157a8c",
"packages/merge-styles/LICENSE": "310f6231e35c591f17680ffd2f5d4daea754e1f6",

@@ -13,3 +13,3 @@ "packages/merge-styles/README.md": "7cceed7041b1629db1306aa064cf6fe2ba73bb33",

"packages/merge-styles/jest.config.js": "a92c71220a900a5366be5af2cb98d273f3b697d4",
"packages/merge-styles/package.json": "7f1f5f212cca7121050b6a0614f042fd048e64eb",
"packages/merge-styles/package.json": "bcc8f00a6e41dcbeb3b78055234d15b98f26a9b3",
"packages/merge-styles/src/IRawStyleBase.ts": "7eec66334a749262d8bad97a6014314802383260",

@@ -22,3 +22,3 @@ "packages/merge-styles/src/IStyle.ts": "770aa641a178f4ade3e75c36c663919cb65d00f9",

"packages/merge-styles/src/extractStyleParts.test.ts": "5e8bd60ee690ceca5b7bf008c6b3b7c941d65bef",
"packages/merge-styles/src/extractStyleParts.ts": "2bba52e449b4bc66afb798f98f81fba5a9f5dac4",
"packages/merge-styles/src/extractStyleParts.ts": "e05e9dd11dfb85f4548e7198e13e2a845122ecfe",
"packages/merge-styles/src/fontFace.test.ts": "3aab715c8659b3d20b461bf7b35ebe62dc675009",

@@ -30,5 +30,5 @@ "packages/merge-styles/src/fontFace.ts": "fb00ddf59023cf3d1b0fe6039d292a32b25ed264",

"packages/merge-styles/src/keyframes.ts": "fec40daa0e921e7027b2f05687b2a679cd4bff90",
"packages/merge-styles/src/mergeStyleSets.test.ts": "f7554cf5385b497d9b66c2e89ae179e5d883ed2b",
"packages/merge-styles/src/mergeStyleSets.ts": "38096d516b1be0f8dc55fa472364ab10abbc816d",
"packages/merge-styles/src/mergeStyles.test.ts": "12f7cbdf4fd1aba593ffb24b2e8b2bb3a8960c45",
"packages/merge-styles/src/mergeStyleSets.test.ts": "de2a4368c86f6ed0bb02bc869436e31a13d4d417",
"packages/merge-styles/src/mergeStyleSets.ts": "ad617684f44429798f471121406b363039a66cfd",
"packages/merge-styles/src/mergeStyles.test.ts": "7aba032d6df4e62306e792f46a4a8561c09e730d",
"packages/merge-styles/src/mergeStyles.ts": "8538b54c5e7a6200dc3152f1e5244caa0e8d1066",

@@ -35,0 +35,0 @@ "packages/merge-styles/src/server.test.ts": "efe9c4f1f8a03511def6738fc10e4bbed16ae9b8",

{
"name": "@uifabric/merge-styles",
"version": "5.8.0",
"version": "5.8.1",
"description": "Office UI Fabric style loading utilities.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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

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