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.4.1 to 18.4.2

554

material-ui.esm.js

@@ -1,554 +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(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;
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,564 +0,2 @@

'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;
"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

2

package.json
{
"name": "react-shadow",
"version": "18.4.1",
"version": "18.4.2",
"description": "Utilise Shadow DOM in React with all the benefits of style encapsulation.",

@@ -5,0 +5,0 @@ "main": "react-shadow.js",

@@ -1,360 +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(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 };
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,363 +0,2 @@

'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);
});
"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

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

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

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

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

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