@platform/react.ssr
Version:
A lightweight SSR (server-side-rendering) system for react apps bundled with ParcelJS and hosted on S3.
1 lines • 3.38 kB
JSON
{"id":"zsur","dependencies":[{"name":"/Users/phil/code/@platform/code/react.ssr/sample/ui/.uiharness/package.json","includedInParent":true,"mtime":1567548362275},{"name":"/Users/phil/code/@platform/code/react.ssr/sample/ui/node_modules/glamor/package.json","includedInParent":true,"mtime":1566893819573},{"name":"object-assign","loc":{"line":8,"column":28},"parent":"/Users/phil/code/@platform/code/react.ssr/sample/ui/node_modules/glamor/lib/sheet.js","resolved":"/Users/phil/code/@platform/code/react.ssr/sample/ui/node_modules/object-assign/index.js"}],"generated":{"js":"\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.StyleSheet=l;var e=require(\"object-assign\"),t=s(e);function s(e){return e&&e.__esModule?e:{default:e}}function n(e){if(Array.isArray(e)){for(var t=0,s=Array(e.length);t<e.length;t++)s[t]=e[t];return s}return Array.from(e)}function r(e){return e[e.length-1]}function i(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}var h=\"undefined\"!=typeof window,o=!1,u=!1,c=function(){if(h){var e=document.createElement(\"div\");return e.innerHTML=\"\\x3c!--[if lt IE 10]><i></i><![endif]--\\x3e\",1===e.getElementsByTagName(\"i\").length}}();function a(){var e=document.createElement(\"style\");return e.type=\"text/css\",e.setAttribute(\"data-glamor\",\"\"),e.appendChild(document.createTextNode(\"\")),(document.head||document.getElementsByTagName(\"head\")[0]).appendChild(e),e}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.speedy,s=void 0===t?!o&&!u:t,n=e.maxLength,r=void 0===n?h&&c?4e3:65e3:n;this.isSpeedy=s,this.sheet=void 0,this.tags=[],this.maxLength=r,this.ctr=0}(0,t.default)(l.prototype,{getSheet:function(){return i(r(this.tags))},inject:function(){var e=this;if(this.injected)throw new Error(\"already injected stylesheet!\");h?this.tags[0]=a():this.sheet={cssRules:[],insertRule:function(t){e.sheet.cssRules.push({cssText:t})}},this.injected=!0},speedy:function(e){if(0!==this.ctr)throw new Error(\"cannot change speedy mode after inserting any rule to sheet. Either call speedy(\"+e+\") earlier in your app, or call flush() before speedy(\"+e+\")\");this.isSpeedy=!!e},_insert:function(e){try{var t=this.getSheet();t.insertRule(e,-1!==e.indexOf(\"@import\")?0:t.cssRules.length)}catch(s){o&&console.warn(\"whoops, illegal rule inserted\",e)}},insert:function(e){if(h)if(this.isSpeedy&&this.getSheet().insertRule)this._insert(e);else if(-1!==e.indexOf(\"@import\")){var t=r(this.tags);t.insertBefore(document.createTextNode(e),t.firstChild)}else r(this.tags).appendChild(document.createTextNode(e));else this.sheet.insertRule(e,-1!==e.indexOf(\"@import\")?0:this.sheet.cssRules.length);return this.ctr++,h&&this.ctr%this.maxLength==0&&this.tags.push(a()),this.ctr-1},delete:function(e){return this.replace(e,\"\")},flush:function(){h?(this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.sheet=null,this.ctr=0):this.sheet.cssRules=[],this.injected=!1},rules:function(){if(!h)return this.sheet.cssRules;var e=[];return this.tags.forEach(function(t){return e.splice.apply(e,[e.length,0].concat(n(Array.from(i(t).cssRules))))}),e}});"},"sourceMaps":null,"error":null,"hash":"6e01c402419d5fb74973bb472c486ba4","cacheData":{"env":{"NODE_ENV":"production"}}}