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

react-shadow

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-shadow - npm Package Compare versions

Comparing version 18.2.5 to 18.3.0

.history/example/components/Layout/index_20200815122214.js

2

material-ui.esm.js

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

import e,{useRef as t,useEffect as r,createContext as n,forwardRef as o,useState as c}from"react";import{jssPreset as u,StylesProvider as i}from"@material-ui/styles";import{create as a}from"jss";import{createPortal as l}from"react-dom";import f from"prop-types";var s=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};var p=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var d=function(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),e},b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e,t){return e(t={exports:{}},t.exports),t.exports}var v=h((function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(r,n)}e.exports=t}));var m=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)},g=h((function(e){function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t}));var O=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var j=function(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?O(e):t},w=h((function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(r)}e.exports=t})),S=h((function(e){!function(t){var r=function(e,t,n){if(!a(t)||f(t)||s(t)||p(t)||i(t))return t;var o,c=0,u=0;if(l(t))for(o=[],u=t.length;c<u;c++)o.push(r(e,t[c],n));else for(var y in o={},t)Object.prototype.hasOwnProperty.call(t,y)&&(o[e(y,n)]=r(e,t[y],n));return o},n=function(e){return y(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var t=n(e);return t.substr(0,1).toUpperCase()+t.substr(1)},c=function(e,t){return function(e,t){var r=(t=t||{}).separator||"_",n=t.split||/(?=[A-Z])/;return e.split(n).join(r)}(e,t).toLowerCase()},u=Object.prototype.toString,i=function(e){return"function"==typeof e},a=function(e){return e===Object(e)},l=function(e){return"[object Array]"==u.call(e)},f=function(e){return"[object Date]"==u.call(e)},s=function(e){return"[object RegExp]"==u.call(e)},p=function(e){return"[object Boolean]"==u.call(e)},y=function(e){return(e-=0)==e},d=function(e,t){var r=t&&"process"in t?t.process:t;return"function"!=typeof r?e:function(t,n){return r(t,e,n)}},b={camelize:n,decamelize:c,pascalize:o,depascalize:c,camelizeKeys:function(e,t){return r(d(n,t),e)},decamelizeKeys:function(e,t){return r(d(c,t),e,t)},pascalizeKeys:function(e,t){return r(d(o,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=b:t.humps=b}(b)})).decamelize,P=h((function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}e.exports=t}));var x=function(e){if(Array.isArray(e))return e};var E=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var u,i=e[Symbol.iterator]();!(n=(u=i.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==i.return||i.return()}finally{if(o)throw c}}return r}};var R=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n};var _=function(e,t){if(e){if("string"==typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}};var z=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var A=function(e,t){return x(e)||E(e,t)||_(e,t)||z()};var C=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o};var D=function(e,t){if(null==e)return{};var r,n,o=C(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o};var F=n(null);function T(e){var t=e.root,r=e.children;return l(r,t)}function k(n){var u=o((function(o,u){var i,a,l=o.mode,f=o.delegatesFocus,s=o.styleSheets,p=o.ssr,y=o.children,d=D(o,["mode","delegatesFocus","styleSheets","ssr","children"]),b=(a=t((i=u)&&i.current),r((function(){i&&(i.current=a.current)}),[i]),a),h=c(null),v=A(h,2),m=v[0],g=v[1],O="node_".concat(l).concat(f);return r((function(){if(b.current)try{if("function"==typeof u&&u(b.current),p){var e=b.current.shadowRoot;return void g(e)}var t=b.current.attachShadow({mode:l,delegatesFocus:f});s.length>0&&(t.adoptedStyleSheets=s),g(t)}catch(e){!function(e){var t=e.error,r=e.styleSheets,n=e.root;switch(t.name){case"NotSupportedError":r.length>0&&(n.adoptedStyleSheets=r);break;default:throw t}}({error:e,styleSheets:s,root:m})}}),[u,b,s]),e.createElement(e.Fragment,null,e.createElement(n.tag,P({key:O,ref:b},d),(m||p)&&e.createElement(F.Provider,{value:m},p?e.createElement("template",{shadowroot:"open"},n.render({root:m,ssr:p,children:y})):e.createElement(T,{root:m},n.render({root:m,ssr:p,children:y})))))}));return u.propTypes={mode:f.oneOf(["open","closed"]),delegatesFocus:f.bool,styleSheets:f.arrayOf(f.instanceOf(global.CSSStyleSheet)),ssr:f.bool,children:f.node},u.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},u}T.propTypes={root:f.object.isRequired,children:f.node},T.defaultProps={children:null};var K=new Map;function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,n){var o=S(n,{separator:"-"}),c="".concat(t,"-").concat(o);return K.has(c)||K.set(c,k({tag:o,render:r})),K.get(c)}})}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}I();var M=I({},"material-ui",(function(t){t.root;var r=t.children,n=function(t){m(c,t);var n,o=(n=c,function(){var e,t=w(n);if(L()){var r=w(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return j(this,e)});function c(){var e;return p(this,c),(e=o.call(this)).state={node:null},e.handleRef=function(t){return e.setState({node:t})},e}return d(c,[{key:"render",value:function(){var t=a(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},u(),{insertionPoint:this.state.node}));return e.createElement(i,{jss:t},this.state.node&&e.createElement(e.Fragment,null,r),e.createElement("div",{ref:this.handleRef}))}}]),c}(e.Component);return e.createElement(n,null)}));export default M;
import e,{useRef as t,useEffect as r,createContext as n,forwardRef as o,useState as c}from"react";import{jssPreset as u,StylesProvider as i}from"@material-ui/styles";import{create as a}from"jss";import{createPortal as l}from"react-dom";import f from"prop-types";var s=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};var p=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var d=function(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),e},b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e,t){return e(t={exports:{}},t.exports),t.exports}var v=h((function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(r,n)}e.exports=t}));var m=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)},g=h((function(e){function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t}));var O=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var j=function(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?O(e):t},w=h((function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(r)}e.exports=t})),S=h((function(e){!function(t){var r=function(e,t,n){if(!a(t)||f(t)||s(t)||p(t)||i(t))return t;var o,c=0,u=0;if(l(t))for(o=[],u=t.length;c<u;c++)o.push(r(e,t[c],n));else for(var y in o={},t)Object.prototype.hasOwnProperty.call(t,y)&&(o[e(y,n)]=r(e,t[y],n));return o},n=function(e){return y(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var t=n(e);return t.substr(0,1).toUpperCase()+t.substr(1)},c=function(e,t){return function(e,t){var r=(t=t||{}).separator||"_",n=t.split||/(?=[A-Z])/;return e.split(n).join(r)}(e,t).toLowerCase()},u=Object.prototype.toString,i=function(e){return"function"==typeof e},a=function(e){return e===Object(e)},l=function(e){return"[object Array]"==u.call(e)},f=function(e){return"[object Date]"==u.call(e)},s=function(e){return"[object RegExp]"==u.call(e)},p=function(e){return"[object Boolean]"==u.call(e)},y=function(e){return(e-=0)==e},d=function(e,t){var r=t&&"process"in t?t.process:t;return"function"!=typeof r?e:function(t,n){return r(t,e,n)}},b={camelize:n,decamelize:c,pascalize:o,depascalize:c,camelizeKeys:function(e,t){return r(d(n,t),e)},decamelizeKeys:function(e,t){return r(d(c,t),e,t)},pascalizeKeys:function(e,t){return r(d(o,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=b:t.humps=b}(b)})).decamelize,P=h((function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}e.exports=t}));var x=function(e){if(Array.isArray(e))return e};var E=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var u,i=e[Symbol.iterator]();!(n=(u=i.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==i.return||i.return()}finally{if(o)throw c}}return r}};var R=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n};var _=function(e,t){if(e){if("string"==typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}};var z=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var A=function(e,t){return x(e)||E(e,t)||_(e,t)||z()};var C=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o};var D=function(e,t){if(null==e)return{};var r,n,o=C(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o};var F=n(null);function T(e){var t=e.root,r=e.children;return l(r,t)}function k(n){var u=o((function(o,u){var i,a,l=o.mode,f=o.delegatesFocus,s=o.styleSheets,p=o.ssr,y=o.children,d=D(o,["mode","delegatesFocus","styleSheets","ssr","children"]),b=(a=t((i=u)&&i.current),r((function(){i&&(i.current=a.current)}),[i]),a),h=c(null),v=A(h,2),m=v[0],g=v[1],O="node_".concat(l).concat(f);return r((function(){if(b.current)try{if("function"==typeof u&&u(b.current),p){var e=b.current.shadowRoot;return void g(e)}var t=b.current.attachShadow({mode:l,delegatesFocus:f});s.length>0&&(t.adoptedStyleSheets=s),g(t)}catch(e){!function(e){var t=e.error,r=e.styleSheets,n=e.root;switch(t.name){case"NotSupportedError":r.length>0&&(n.adoptedStyleSheets=r);break;default:throw t}}({error:e,styleSheets:s,root:m})}}),[u,b,s]),e.createElement(e.Fragment,null,e.createElement(n.tag,P({key:O,ref:b},d),(m||p)&&e.createElement(F.Provider,{value:m},p?e.createElement("template",{shadowroot:"open"},n.render({root:m,ssr:p,children:y})):e.createElement(T,{root:m},n.render({root:m,ssr:p,children:y})))))}));return u.propTypes={mode:f.oneOf(["open","closed"]),delegatesFocus:f.bool,styleSheets:f.arrayOf(f.instanceOf(global.CSSStyleSheet)),ssr:f.bool,children:f.node},u.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},u}T.propTypes={root:f.object.isRequired,children:f.node},T.defaultProps={children:null};var K=new Map;function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,n){var o=S(n,{separator:"-"}),c="".concat(t,"-").concat(o);return K.has(c)||K.set(c,k({tag:o,render:r})),K.get(c)}})}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=w(e);if(t){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}I();var q=I({},"material-ui",(function(t){t.root;var r=t.children,n=function(t){m(o,t);var n=M(o);function o(){var e;return p(this,o),(e=n.call(this)).state={node:null},e.handleRef=function(t){return e.setState({node:t})},e}return d(o,[{key:"render",value:function(){var t=a(L(L({},u()),{},{insertionPoint:this.state.node}));return e.createElement(i,{jss:t},this.state.node&&e.createElement(e.Fragment,null,r),e.createElement("div",{ref:this.handleRef}))}}]),o}(e.Component);return e.createElement(n,null)}));export default q;
//# sourceMappingURL=material-ui.esm.js.map

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),r=e(t),n=require("@material-ui/styles"),o=require("jss"),c=require("react-dom"),u=e(require("prop-types"));var a=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e},f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e,t){return e(t={exports:{}},t.exports),t.exports}var y=p((function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(r,n)}e.exports=t}));var d=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)},b=p((function(e){function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t}));var h=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var v=function(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?h(e):t},m=p((function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(r)}e.exports=t})),g=p((function(e){!function(t){var r=function(e,t,n){if(!i(t)||s(t)||f(t)||p(t)||a(t))return t;var o,c=0,u=0;if(l(t))for(o=[],u=t.length;c<u;c++)o.push(r(e,t[c],n));else for(var y in o={},t)Object.prototype.hasOwnProperty.call(t,y)&&(o[e(y,n)]=r(e,t[y],n));return o},n=function(e){return y(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var t=n(e);return t.substr(0,1).toUpperCase()+t.substr(1)},c=function(e,t){return function(e,t){var r=(t=t||{}).separator||"_",n=t.split||/(?=[A-Z])/;return e.split(n).join(r)}(e,t).toLowerCase()},u=Object.prototype.toString,a=function(e){return"function"==typeof e},i=function(e){return e===Object(e)},l=function(e){return"[object Array]"==u.call(e)},s=function(e){return"[object Date]"==u.call(e)},f=function(e){return"[object RegExp]"==u.call(e)},p=function(e){return"[object Boolean]"==u.call(e)},y=function(e){return(e-=0)==e},d=function(e,t){var r=t&&"process"in t?t.process:t;return"function"!=typeof r?e:function(t,n){return r(t,e,n)}},b={camelize:n,decamelize:c,pascalize:o,depascalize:c,camelizeKeys:function(e,t){return r(d(n,t),e)},decamelizeKeys:function(e,t){return r(d(c,t),e,t)},pascalizeKeys:function(e,t){return r(d(o,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=b:t.humps=b}(f)})).decamelize,O=p((function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}e.exports=t}));var j=function(e){if(Array.isArray(e))return e};var w=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw c}}return r}};var S=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n};var P=function(e,t){if(e){if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}};var x=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var E=function(e,t){return j(e)||w(e,t)||P(e,t)||x()};var R=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o};var _=function(e,t){if(null==e)return{};var r,n,o=R(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o};var z=t.createContext(null);function C(e){var t=e.root,r=e.children;return c.createPortal(r,t)}function A(e){var n=t.forwardRef((function(n,o){var c,u,a=n.mode,i=n.delegatesFocus,l=n.styleSheets,s=n.ssr,f=n.children,p=_(n,["mode","delegatesFocus","styleSheets","ssr","children"]),y=(c=o,u=t.useRef(c&&c.current),t.useEffect((function(){c&&(c.current=u.current)}),[c]),u),d=t.useState(null),b=E(d,2),h=b[0],v=b[1],m="node_".concat(a).concat(i);return t.useEffect((function(){if(y.current)try{if("function"==typeof o&&o(y.current),s){var e=y.current.shadowRoot;return void v(e)}var t=y.current.attachShadow({mode:a,delegatesFocus:i});l.length>0&&(t.adoptedStyleSheets=l),v(t)}catch(e){!function(e){var t=e.error,r=e.styleSheets,n=e.root;switch(t.name){case"NotSupportedError":r.length>0&&(n.adoptedStyleSheets=r);break;default:throw t}}({error:e,styleSheets:l,root:h})}}),[o,y,l]),r.createElement(r.Fragment,null,r.createElement(e.tag,O({key:m,ref:y},p),(h||s)&&r.createElement(z.Provider,{value:h},s?r.createElement("template",{shadowroot:"open"},e.render({root:h,ssr:s,children:f})):r.createElement(C,{root:h},e.render({root:h,ssr:s,children:f})))))}));return n.propTypes={mode:u.oneOf(["open","closed"]),delegatesFocus:u.bool,styleSheets:u.arrayOf(u.instanceOf(global.CSSStyleSheet)),ssr:u.bool,children:u.node},n.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},n}C.propTypes={root:u.object.isRequired,children:u.node},C.defaultProps={children:null};var D=new Map;function F(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,n){var o=g(n,{separator:"-"}),c="".concat(t,"-").concat(o);return D.has(c)||D.set(c,A({tag:o,render:r})),D.get(c)}})}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}F();var q=F({},"material-ui",(function(e){e.root;var t=e.children,c=function(e){d(l,e);var c,u=(c=l,function(){var e,t=m(c);if(k()){var r=m(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function l(){var e;return i(this,l),(e=u.call(this)).state={node:null},e.handleRef=function(t){return e.setState({node:t})},e}return s(l,[{key:"render",value:function(){var e=o.create(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},n.jssPreset(),{insertionPoint:this.state.node}));return r.createElement(n.StylesProvider,{jss:e},this.state.node&&r.createElement(r.Fragment,null,t),r.createElement("div",{ref:this.handleRef}))}}]),l}(r.Component);return r.createElement(c,null)}));exports.default=q;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@material-ui/styles"),r=require("jss"),n=require("react-dom"),o=require("prop-types");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(e),c=u(o);var i=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};var l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e},p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(e,t){return e(t={exports:{}},t.exports),t.exports}var y=d((function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(r,n)}e.exports=t}));var b=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)},h=d((function(e){function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t}));var v=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var m=function(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?v(e):t},g=d((function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(r)}e.exports=t})),O=d((function(e){!function(t){var r=function(e,t,n){if(!i(t)||f(t)||s(t)||p(t)||c(t))return t;var o,u=0,a=0;if(l(t))for(o=[],a=t.length;u<a;u++)o.push(r(e,t[u],n));else for(var d in o={},t)Object.prototype.hasOwnProperty.call(t,d)&&(o[e(d,n)]=r(e,t[d],n));return o},n=function(e){return d(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var t=n(e);return t.substr(0,1).toUpperCase()+t.substr(1)},u=function(e,t){return function(e,t){var r=(t=t||{}).separator||"_",n=t.split||/(?=[A-Z])/;return e.split(n).join(r)}(e,t).toLowerCase()},a=Object.prototype.toString,c=function(e){return"function"==typeof e},i=function(e){return e===Object(e)},l=function(e){return"[object Array]"==a.call(e)},f=function(e){return"[object Date]"==a.call(e)},s=function(e){return"[object RegExp]"==a.call(e)},p=function(e){return"[object Boolean]"==a.call(e)},d=function(e){return(e-=0)==e},y=function(e,t){var r=t&&"process"in t?t.process:t;return"function"!=typeof r?e:function(t,n){return r(t,e,n)}},b={camelize:n,decamelize:u,pascalize:o,depascalize:u,camelizeKeys:function(e,t){return r(y(n,t),e)},decamelizeKeys:function(e,t){return r(y(u,t),e,t)},pascalizeKeys:function(e,t){return r(y(o,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=b:t.humps=b}(p)})).decamelize,j=d((function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}e.exports=t}));var w=function(e){if(Array.isArray(e))return e};var S=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,u=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw u}}return r}};var P=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n};var x=function(e,t){if(e){if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,t):void 0}};var E=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var R=function(e,t){return w(e)||S(e,t)||x(e,t)||E()};var _=function(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||(o[r]=e[r]);return o};var z=function(e,t){if(null==e)return{};var r,n,o=_(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o};var C=e.createContext(null);function A(e){var t=e.root,r=e.children;return n.createPortal(r,t)}function D(t){var r=e.forwardRef((function(r,n){var o,u,c=r.mode,i=r.delegatesFocus,l=r.styleSheets,f=r.ssr,s=r.children,p=z(r,["mode","delegatesFocus","styleSheets","ssr","children"]),d=(o=n,u=e.useRef(o&&o.current),e.useEffect((function(){o&&(o.current=u.current)}),[o]),u),y=e.useState(null),b=R(y,2),h=b[0],v=b[1],m="node_".concat(c).concat(i);return e.useEffect((function(){if(d.current)try{if("function"==typeof n&&n(d.current),f){var e=d.current.shadowRoot;return void v(e)}var t=d.current.attachShadow({mode:c,delegatesFocus:i});l.length>0&&(t.adoptedStyleSheets=l),v(t)}catch(e){!function(e){var t=e.error,r=e.styleSheets,n=e.root;switch(t.name){case"NotSupportedError":r.length>0&&(n.adoptedStyleSheets=r);break;default:throw t}}({error:e,styleSheets:l,root:h})}}),[n,d,l]),a.default.createElement(a.default.Fragment,null,a.default.createElement(t.tag,j({key:m,ref:d},p),(h||f)&&a.default.createElement(C.Provider,{value:h},f?a.default.createElement("template",{shadowroot:"open"},t.render({root:h,ssr:f,children:s})):a.default.createElement(A,{root:h},t.render({root:h,ssr:f,children:s})))))}));return r.propTypes={mode:c.default.oneOf(["open","closed"]),delegatesFocus:c.default.bool,styleSheets:c.default.arrayOf(c.default.instanceOf(global.CSSStyleSheet)),ssr:c.default.bool,children:c.default.node},r.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},r}A.propTypes={root:c.default.object.isRequired,children:c.default.node},A.defaultProps={children:null};var F=new Map;function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,n){var o=O(n,{separator:"-"}),u="".concat(t,"-").concat(o);return F.has(u)||F.set(u,D({tag:o,render:r})),F.get(u)}})}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function K(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g(e);if(t){var o=g(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}T();var I=T({},"material-ui",(function(e){e.root;var n=e.children,o=function(e){b(u,e);var o=K(u);function u(){var e;return l(this,u),(e=o.call(this)).state={node:null},e.handleRef=function(t){return e.setState({node:t})},e}return s(u,[{key:"render",value:function(){var e=r.create(q(q({},t.jssPreset()),{},{insertionPoint:this.state.node}));return a.default.createElement(t.StylesProvider,{jss:e},this.state.node&&a.default.createElement(a.default.Fragment,null,n),a.default.createElement("div",{ref:this.handleRef}))}}]),u}(a.default.Component);return a.default.createElement(o,null)}));exports.default=I;
//# sourceMappingURL=material-ui.js.map
{
"name": "react-shadow",
"version": "18.2.5",
"version": "18.3.0",
"description": "Utilise Shadow DOM in React with all the benefits of style encapsulation.",

@@ -37,17 +37,17 @@ "main": "react-shadow.js",

"humps": "^2.0.1",
"react-use": "^14.2.0"
"react-use": "^15.3.3"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/core": "^7.11.1",
"@babel/helper-skip-transparent-expression-wrappers": "^7.11.0",
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/polyfill": "^7.8.7",
"@babel/preset-env": "^7.9.5",
"@babel/preset-react": "^7.9.4",
"@babel/register": "^7.9.0",
"@babel/runtime": "^7.9.2",
"@emotion/core": "^10.0.28",
"@babel/plugin-transform-runtime": "^7.11.0",
"@babel/polyfill": "^7.10.4",
"@babel/preset-env": "^7.11.0",
"@babel/preset-react": "^7.10.4",
"@babel/register": "^7.10.5",
"@babel/runtime": "^7.11.2",
"@emotion/core": "^10.0.34",
"@emotion/styled": "^10.0.27",
"@material-ui/core": "^4.11.0",
"ava": "^3.8.1",
"ava": "^3.11.1",
"axios": "^0.19.2",

@@ -57,36 +57,36 @@ "babel-eslint": "^10.1.0",

"capitalize": "^2.0.3",
"concurrently": "^5.2.0",
"concurrently": "^5.3.0",
"core-js": "^3.6.5",
"coveralls": "^3.1.0",
"css-loader": "^3.5.3",
"delay": "^4.3.0",
"css-loader": "^4.2.1",
"delay": "^4.4.0",
"emotion": "^10.0.27",
"emotion-server": "^10.0.27",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "^6.8.0",
"enzyme-adapter-react-16": "^1.15.3",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-standard": "^4.0.1",
"moment": "^2.24.0",
"next": "^9.3.7",
"nyc": "^15.0.1",
"moment": "^2.27.0",
"next": "^9.5.2",
"nyc": "^15.1.0",
"prettier": "^2.0.5",
"prop-types": "^15.7.2",
"ramda": "^0.27.0",
"ramda": "^0.27.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"rollup": "^2.7.2",
"rollup": "^2.26.0",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^5.3.0",
"sinon": "^9.0.2",
"styled-components": "^5.1.0",
"to-string-loader": "^1.1.6"
"rollup-plugin-terser": "^7.0.0",
"sinon": "^9.0.3",
"styled-components": "^5.1.1",
"svg-inline-loader": "^0.8.2"
}
}

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

import e,{useRef as r,useEffect as t,createContext as n,forwardRef as o,useState as a,useContext as c}from"react";import{createPortal as u}from"react-dom";import l from"prop-types";var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e,r){return e(r={exports:{}},r.exports),r.exports}var f=s((function(e){!function(r){var t=function(e,r,n){if(!l(r)||s(r)||f(r)||p(r)||u(r))return r;var o,a=0,c=0;if(i(r))for(o=[],c=r.length;a<c;a++)o.push(t(e,r[a],n));else for(var d in o={},r)Object.prototype.hasOwnProperty.call(r,d)&&(o[e(d,n)]=t(e,r[d],n));return o},n=function(e){return d(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,r){return r?r.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var r=n(e);return r.substr(0,1).toUpperCase()+r.substr(1)},a=function(e,r){return function(e,r){var t=(r=r||{}).separator||"_",n=r.split||/(?=[A-Z])/;return e.split(n).join(t)}(e,r).toLowerCase()},c=Object.prototype.toString,u=function(e){return"function"==typeof e},l=function(e){return e===Object(e)},i=function(e){return"[object Array]"==c.call(e)},s=function(e){return"[object Date]"==c.call(e)},f=function(e){return"[object RegExp]"==c.call(e)},p=function(e){return"[object Boolean]"==c.call(e)},d=function(e){return(e-=0)==e},y=function(e,r){var t=r&&"process"in r?r.process:r;return"function"!=typeof t?e:function(r,n){return t(r,e,n)}},h={camelize:n,decamelize:a,pascalize:o,depascalize:a,camelizeKeys:function(e,r){return t(y(n,r),e)},decamelizeKeys:function(e,r){return t(y(a,r),e,r)},pascalizeKeys:function(e,r){return t(y(o,r),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=h:r.humps=h}(i)})).decamelize,p=s((function(e){function r(){return e.exports=r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.apply(this,arguments)}e.exports=r}));var d=function(e){if(Array.isArray(e))return e};var y=function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,o=!1,a=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(t.push(c.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return t}};var h=function(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n};var v=function(e,r){if(e){if("string"==typeof e)return h(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,r):void 0}};var m=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var b=function(e,r){return d(e)||y(e,r)||v(e,r)||m()};var g=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o};var S=function(e,r){if(null==e)return{};var t,n,o=g(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o};var w=n(null);function O(e){var r=e.root,t=e.children;return u(t,r)}function j(n){var c=o((function(o,c){var u,l,i=o.mode,s=o.delegatesFocus,f=o.styleSheets,d=o.ssr,y=o.children,h=S(o,["mode","delegatesFocus","styleSheets","ssr","children"]),v=(l=r((u=c)&&u.current),t((function(){u&&(u.current=l.current)}),[u]),l),m=a(null),g=b(m,2),j=g[0],x=g[1],z="node_".concat(i).concat(s);return t((function(){if(v.current)try{if("function"==typeof c&&c(v.current),d){var e=v.current.shadowRoot;return void x(e)}var r=v.current.attachShadow({mode:i,delegatesFocus:s});f.length>0&&(r.adoptedStyleSheets=f),x(r)}catch(e){!function(e){var r=e.error,t=e.styleSheets,n=e.root;switch(r.name){case"NotSupportedError":t.length>0&&(n.adoptedStyleSheets=t);break;default:throw r}}({error:e,styleSheets:f,root:j})}}),[c,v,f]),e.createElement(e.Fragment,null,e.createElement(n.tag,p({key:z,ref:v},h),(j||d)&&e.createElement(w.Provider,{value:j},d?e.createElement("template",{shadowroot:"open"},n.render({root:j,ssr:d,children:y})):e.createElement(O,{root:j},n.render({root:j,ssr:d,children:y})))))}));return c.propTypes={mode:l.oneOf(["open","closed"]),delegatesFocus:l.bool,styleSheets:l.arrayOf(l.instanceOf(global.CSSStyleSheet)),ssr:l.bool,children:l.node},c.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},c}O.propTypes={root:l.object.isRequired,children:l.node},O.defaultProps={children:null};var x=new Map;function z(){return c(w)}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,n){var o=f(n,{separator:"-"}),a="".concat(r,"-").concat(o);return x.has(a)||x.set(a,j({tag:o,render:t})),x.get(a)}})}var A=E();export default A;export{E as createProxy,z as useShadowRoot};
import e,{useRef as r,useEffect as t,createContext as n,forwardRef as o,useState as a,useContext as c}from"react";import{createPortal as u}from"react-dom";import l from"prop-types";var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e,r){return e(r={exports:{}},r.exports),r.exports}var f=s((function(e){!function(r){var t=function(e,r,n){if(!l(r)||s(r)||f(r)||p(r)||u(r))return r;var o,a=0,c=0;if(i(r))for(o=[],c=r.length;a<c;a++)o.push(t(e,r[a],n));else for(var d in o={},r)Object.prototype.hasOwnProperty.call(r,d)&&(o[e(d,n)]=t(e,r[d],n));return o},n=function(e){return d(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,r){return r?r.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var r=n(e);return r.substr(0,1).toUpperCase()+r.substr(1)},a=function(e,r){return function(e,r){var t=(r=r||{}).separator||"_",n=r.split||/(?=[A-Z])/;return e.split(n).join(t)}(e,r).toLowerCase()},c=Object.prototype.toString,u=function(e){return"function"==typeof e},l=function(e){return e===Object(e)},i=function(e){return"[object Array]"==c.call(e)},s=function(e){return"[object Date]"==c.call(e)},f=function(e){return"[object RegExp]"==c.call(e)},p=function(e){return"[object Boolean]"==c.call(e)},d=function(e){return(e-=0)==e},y=function(e,r){var t=r&&"process"in r?r.process:r;return"function"!=typeof t?e:function(r,n){return t(r,e,n)}},h={camelize:n,decamelize:a,pascalize:o,depascalize:a,camelizeKeys:function(e,r){return t(y(n,r),e)},decamelizeKeys:function(e,r){return t(y(a,r),e,r)},pascalizeKeys:function(e,r){return t(y(o,r),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=h:r.humps=h}(i)})).decamelize,p=s((function(e){function r(){return e.exports=r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.apply(this,arguments)}e.exports=r}));var d=function(e){if(Array.isArray(e))return e};var y=function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,o=!1,a=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(t.push(c.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return t}};var h=function(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n};var v=function(e,r){if(e){if("string"==typeof e)return h(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,r):void 0}};var m=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var b=function(e,r){return d(e)||y(e,r)||v(e,r)||m()};var g=function(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(o[t]=e[t]);return o};var S=function(e,r){if(null==e)return{};var t,n,o=g(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o};var w=n(null);function O(e){var r=e.root,t=e.children;return u(t,r)}function j(n){var c=o((function(o,c){var u,l,i=o.mode,s=o.delegatesFocus,f=o.styleSheets,d=o.ssr,y=o.children,h=S(o,["mode","delegatesFocus","styleSheets","ssr","children"]),v=(l=r((u=c)&&u.current),t((function(){u&&(u.current=l.current)}),[u]),l),m=a(null),g=b(m,2),j=g[0],x=g[1],z="node_".concat(i).concat(s);return t((function(){if(v.current)try{if("function"==typeof c&&c(v.current),d){var e=v.current.shadowRoot;return void x(e)}var r=v.current.attachShadow({mode:i,delegatesFocus:s});f.length>0&&(r.adoptedStyleSheets=f),x(r)}catch(e){!function(e){var r=e.error,t=e.styleSheets,n=e.root;switch(r.name){case"NotSupportedError":t.length>0&&(n.adoptedStyleSheets=t);break;default:throw r}}({error:e,styleSheets:f,root:j})}}),[c,v,f]),e.createElement(e.Fragment,null,e.createElement(n.tag,p({key:z,ref:v},h),(j||d)&&e.createElement(w.Provider,{value:j},d?e.createElement("template",{shadowroot:"open"},n.render({root:j,ssr:d,children:y})):e.createElement(O,{root:j},n.render({root:j,ssr:d,children:y})))))}));return c.propTypes={mode:l.oneOf(["open","closed"]),delegatesFocus:l.bool,styleSheets:l.arrayOf(l.instanceOf(global.CSSStyleSheet)),ssr:l.bool,children:l.node},c.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},c}O.propTypes={root:l.object.isRequired,children:l.node},O.defaultProps={children:null};var x=new Map;function z(){return c(w)}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,n){var o=f(n,{separator:"-"}),a="".concat(r,"-").concat(o);return x.has(a)||x.set(a,j({tag:o,render:t})),x.get(a)}})}var A=E();export default A;export{E as createProxy,z as useShadowRoot};
//# sourceMappingURL=react-shadow.esm.js.map

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),r=e(t),n=require("react-dom"),o=e(require("prop-types")),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(e,t){return e(t={exports:{}},t.exports),t.exports}var c=u((function(e){!function(t){var r=function(e,t,n){if(!l(t)||s(t)||f(t)||p(t)||c(t))return t;var o,a=0,u=0;if(i(t))for(o=[],u=t.length;a<u;a++)o.push(r(e,t[a],n));else for(var d in o={},t)Object.prototype.hasOwnProperty.call(t,d)&&(o[e(d,n)]=r(e,t[d],n));return o},n=function(e){return d(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var t=n(e);return t.substr(0,1).toUpperCase()+t.substr(1)},a=function(e,t){return function(e,t){var r=(t=t||{}).separator||"_",n=t.split||/(?=[A-Z])/;return e.split(n).join(r)}(e,t).toLowerCase()},u=Object.prototype.toString,c=function(e){return"function"==typeof e},l=function(e){return e===Object(e)},i=function(e){return"[object Array]"==u.call(e)},s=function(e){return"[object Date]"==u.call(e)},f=function(e){return"[object RegExp]"==u.call(e)},p=function(e){return"[object Boolean]"==u.call(e)},d=function(e){return(e-=0)==e},y=function(e,t){var r=t&&"process"in t?t.process:t;return"function"!=typeof r?e:function(t,n){return r(t,e,n)}},h={camelize:n,decamelize:a,pascalize:o,depascalize:a,camelizeKeys:function(e,t){return r(y(n,t),e)},decamelizeKeys:function(e,t){return r(y(a,t),e,t)},pascalizeKeys:function(e,t){return r(y(o,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=h:t.humps=h}(a)})).decamelize,l=u((function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}e.exports=t}));var i=function(e){if(Array.isArray(e))return e};var s=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var u,c=e[Symbol.iterator]();!(n=(u=c.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw a}}return r}};var f=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n};var p=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}};var d=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var y=function(e,t){return i(e)||s(e,t)||p(e,t)||d()};var h=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o};var v=function(e,t){if(null==e)return{};var r,n,o=h(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o};var b=t.createContext(null);function g(e){var t=e.root,r=e.children;return n.createPortal(r,t)}function m(e){var n=t.forwardRef((function(n,o){var a,u,c=n.mode,i=n.delegatesFocus,s=n.styleSheets,f=n.ssr,p=n.children,d=v(n,["mode","delegatesFocus","styleSheets","ssr","children"]),h=(a=o,u=t.useRef(a&&a.current),t.useEffect((function(){a&&(a.current=u.current)}),[a]),u),m=t.useState(null),S=y(m,2),w=S[0],O=S[1],j="node_".concat(c).concat(i);return t.useEffect((function(){if(h.current)try{if("function"==typeof o&&o(h.current),f){var e=h.current.shadowRoot;return void O(e)}var t=h.current.attachShadow({mode:c,delegatesFocus:i});s.length>0&&(t.adoptedStyleSheets=s),O(t)}catch(e){!function(e){var t=e.error,r=e.styleSheets,n=e.root;switch(t.name){case"NotSupportedError":r.length>0&&(n.adoptedStyleSheets=r);break;default:throw t}}({error:e,styleSheets:s,root:w})}}),[o,h,s]),r.createElement(r.Fragment,null,r.createElement(e.tag,l({key:j,ref:h},d),(w||f)&&r.createElement(b.Provider,{value:w},f?r.createElement("template",{shadowroot:"open"},e.render({root:w,ssr:f,children:p})):r.createElement(g,{root:w},e.render({root:w,ssr:f,children:p})))))}));return n.propTypes={mode:o.oneOf(["open","closed"]),delegatesFocus:o.bool,styleSheets:o.arrayOf(o.instanceOf(global.CSSStyleSheet)),ssr:o.bool,children:o.node},n.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},n}g.propTypes={root:o.object.isRequired,children:o.node},g.defaultProps={children:null};var S=new Map;function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,n){var o=c(n,{separator:"-"}),a="".concat(t,"-").concat(o);return S.has(a)||S.set(a,m({tag:o,render:r})),S.get(a)}})}var O=w();exports.createProxy=w,exports.default=O,exports.useShadowRoot=function(){return t.useContext(b)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-dom"),r=require("prop-types");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),a=n(r),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(e,t){return e(t={exports:{}},t.exports),t.exports}var c=l((function(e){!function(t){var r=function(e,t,n){if(!c(t)||s(t)||f(t)||d(t)||l(t))return t;var o,a=0,u=0;if(i(t))for(o=[],u=t.length;a<u;a++)o.push(r(e,t[a],n));else for(var p in o={},t)Object.prototype.hasOwnProperty.call(t,p)&&(o[e(p,n)]=r(e,t[p],n));return o},n=function(e){return p(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var t=n(e);return t.substr(0,1).toUpperCase()+t.substr(1)},a=function(e,t){return function(e,t){var r=(t=t||{}).separator||"_",n=t.split||/(?=[A-Z])/;return e.split(n).join(r)}(e,t).toLowerCase()},u=Object.prototype.toString,l=function(e){return"function"==typeof e},c=function(e){return e===Object(e)},i=function(e){return"[object Array]"==u.call(e)},s=function(e){return"[object Date]"==u.call(e)},f=function(e){return"[object RegExp]"==u.call(e)},d=function(e){return"[object Boolean]"==u.call(e)},p=function(e){return(e-=0)==e},y=function(e,t){var r=t&&"process"in t?t.process:t;return"function"!=typeof r?e:function(t,n){return r(t,e,n)}},h={camelize:n,decamelize:a,pascalize:o,depascalize:a,camelizeKeys:function(e,t){return r(y(n,t),e)},decamelizeKeys:function(e,t){return r(y(a,t),e,t)},pascalizeKeys:function(e,t){return r(y(o,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=h:t.humps=h}(u)})).decamelize,i=l((function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}e.exports=t}));var s=function(e){if(Array.isArray(e))return e};var f=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var u,l=e[Symbol.iterator]();!(n=(u=l.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}};var d=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n};var p=function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}};var y=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};var h=function(e,t){return s(e)||f(e,t)||p(e,t)||y()};var v=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o};var b=function(e,t){if(null==e)return{};var r,n,o=v(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o};var g=e.createContext(null);function m(e){var r=e.root,n=e.children;return t.createPortal(n,r)}function S(t){var r=e.forwardRef((function(r,n){var a,u,l=r.mode,c=r.delegatesFocus,s=r.styleSheets,f=r.ssr,d=r.children,p=b(r,["mode","delegatesFocus","styleSheets","ssr","children"]),y=(a=n,u=e.useRef(a&&a.current),e.useEffect((function(){a&&(a.current=u.current)}),[a]),u),v=e.useState(null),S=h(v,2),w=S[0],O=S[1],j="node_".concat(l).concat(c);return e.useEffect((function(){if(y.current)try{if("function"==typeof n&&n(y.current),f){var e=y.current.shadowRoot;return void O(e)}var t=y.current.attachShadow({mode:l,delegatesFocus:c});s.length>0&&(t.adoptedStyleSheets=s),O(t)}catch(e){!function(e){var t=e.error,r=e.styleSheets,n=e.root;switch(t.name){case"NotSupportedError":r.length>0&&(n.adoptedStyleSheets=r);break;default:throw t}}({error:e,styleSheets:s,root:w})}}),[n,y,s]),o.default.createElement(o.default.Fragment,null,o.default.createElement(t.tag,i({key:j,ref:y},p),(w||f)&&o.default.createElement(g.Provider,{value:w},f?o.default.createElement("template",{shadowroot:"open"},t.render({root:w,ssr:f,children:d})):o.default.createElement(m,{root:w},t.render({root:w,ssr:f,children:d})))))}));return r.propTypes={mode:a.default.oneOf(["open","closed"]),delegatesFocus:a.default.bool,styleSheets:a.default.arrayOf(a.default.instanceOf(global.CSSStyleSheet)),ssr:a.default.bool,children:a.default.node},r.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},r}m.propTypes={root:a.default.object.isRequired,children:a.default.node},m.defaultProps={children:null};var w=new Map;function O(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,n){var o=c(n,{separator:"-"}),a="".concat(t,"-").concat(o);return w.has(a)||w.set(a,S({tag:o,render:r})),w.get(a)}})}var j=O();exports.createProxy=O,exports.default=j,exports.useShadowRoot=function(){return e.useContext(g)};
//# sourceMappingURL=react-shadow.js.map

@@ -15,3 +15,3 @@ ![ReactShadow](media/logo.png)

- **yarn**: `yarn add react-shadow`
- **Heroku**: [https://react-shadow-2.herokuapp.com](https://react-shadow-2.herokuapp.com)
- **Heroku**: [https://react-shadow.herokuapp.com/](https://react-shadow.herokuapp.com) ([alternative](https://react-shadow-2.herokuapp.com))

@@ -18,0 +18,0 @@ ![Screenshot](media/screenshot.png)

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 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 too big to display

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

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