New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lavamoat/lavadome-react

Package Overview
Dependencies
Maintainers
5
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lavamoat/lavadome-react - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

build/main.js

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

(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{LavaDome:()=>J});const o=require("react");var r=e.n(o);const{Object:n,Array:a,Function:u,Math:s,parseInt:l,WeakMap:p,Error:i,JSON:c}=window,{defineProperties:m,getOwnPropertyDescriptor:d,entries:f}=n,{from:v}=a,{random:y}=s,{stringify:b}=c,g=(e,t,o)=>u.prototype.call.bind(d(e,t)[o]),x=g(Element.prototype,"attachShadow","value"),_=g(Document.prototype,"createElement","value"),w=g(Node.prototype,"appendChild","value"),h=g(Node.prototype,"textContent","set"),j=g(Element.prototype,"setAttribute","value"),N=g(String.prototype,"toUpperCase","value"),E=g(a.prototype,"map","value"),O=g(a.prototype,"join","value"),D=g(a.prototype,"keys","value"),S=g(a.prototype,"at","value"),k=g(p.prototype,"get","value"),M=g(p.prototype,"set","value"),P=g(Number.prototype,"toFixed","value"),z="abcdefghijklmnopqrstuvwxyz",L="0123456789",R=z+L,$=z+N(z)+L+"!@#$%^&*()?.;:\"'[]{}+=-_/",C=(e,t)=>e[l(P(y()*t))];function F(e,t,o=""){return e=O(E(f(e),(([e,t])=>`${e}: ${t} !important`)),"; "),function(){const r=_(document,t());return j(r,"style",e),h(r,o),r}}const U=e=>()=>e(),q=U(F({"-webkit-user-modify":"unset","-webkit-user-select":"none","user-select":"none"},(()=>(7,C(z,26)+O(E(v(D(a(7))),(()=>C(R,36))),""))))),A=U(F({top:"-10px",right:"-10px",position:"fixed","font-size":"1px"},(()=>"span"),$)),T=new p;function I(e){m(this,{text:{value:function(e){if("string"!=typeof e)throw new i(`LavaDome: first argument must be a string, instead got ${b(e)}`);if(void 0===S(v(e),1))return h(o,e);E(v(e),(e=>{const t=_(document,"span");new I(t).text(e),w(o,t)})),w(o,A())}}});let t=k(T,e);t||(t=x(e,{mode:"closed"}),M(T,e,t));const o=q();w(t,o)}const J=({text:e})=>{const t=(0,o.useRef)(null);return r().createElement("span",{ref:t,__source:{fileName:"/Users/weizman/Documents/lavamoat/LavaDome/packages/react/src/index.jsx",lineNumber:7,columnNumber:9},__self:void 0},r().createElement(W,{text:e,hostRef:t,__source:{fileName:"/Users/weizman/Documents/lavamoat/LavaDome/packages/react/src/index.jsx",lineNumber:8,columnNumber:13},__self:void 0}))};function W({text:e,hostRef:t}){const n=(0,o.useRef)(null);return(0,o.useEffect)((()=>(n.current=new I(t.current),()=>n.current=null)),[]),(0,o.useEffect)((()=>{n.current.text(e)}),[e]),r().createElement(r().Fragment,null)}var B=exports;for(var G in t)B[G]=t[G];t.__esModule&&Object.defineProperty(B,"__esModule",{value:!0})})();
(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{LavaDome:()=>H});const n=require("react");var o=e.n(n);const{Object:r,Array:a,Function:s,Math:u,parseInt:l,WeakMap:i,Error:p,JSON:c}=window,{defineProperties:d,assign:f,getOwnPropertyDescriptor:m,entries:v,create:y,hasOwn:w}=r,{from:b}=a,{random:h}=u,{stringify:O}=c,S=(e,t,n)=>s.prototype.call.bind(m(e,t)[n]),g=S(Element.prototype,"attachShadow","value"),x=S(Document.prototype,"createElement","value"),M=S(Node.prototype,"appendChild","value"),_=S(Node.prototype,"textContent","set"),I=S(Element.prototype,"setAttribute","value"),N=S(String.prototype,"toUpperCase","value"),E=S(a.prototype,"map","value"),j=S(a.prototype,"join","value"),D=S(a.prototype,"keys","value"),k=S(a.prototype,"at","value"),L=S(i.prototype,"get","value"),P=S(i.prototype,"set","value"),R=S(Number.prototype,"toFixed","value"),T={isInnerInstance:Symbol("isInnerInstance"),unsafeOpenModeShadow:"unsafeOpenModeShadow"},$=e=>function(t,n,o){const r=e[t];return w(e,t)?typeof r!==n?o:r:o},z="abcdefghijklmnopqrstuvwxyz",F="0123456789",U=z+F,C=z+N(z)+F+"!@#$%^&*()?.;:\"'[]{}+=-_/",q=(e,t)=>e[l(R(h()*t))];function A(e,t,n=""){return e=j(E(v(e),(([e,t])=>`${e}: ${t} !important`)),"; "),function(){const o=x(document,t());return I(o,"style",e),_(o,n),o}}const G=e=>()=>e(),J=G(A({"-webkit-user-modify":"unset","-webkit-user-select":"none","user-select":"none"},(()=>(7,q(z,26)+j(E(b(D(a(7))),(()=>q(U,36))),""))))),W=G(A({top:"-10px",right:"-10px",position:"fixed","font-size":"1px"},(()=>"span"),C)),Y=new i;function B(e,t){t=function(e={}){const{unsafeOpenModeShadow:t,isInnerInstance:n}=T,o=$(f(y(null),e)),r=y(null);return r.isInnerInstance=o(n,"boolean",!1),r.unsafeOpenModeShadow=o(t,"boolean",!1),r}(t),d(this,{text:{value:function(e){if("string"!=typeof e)throw new p(`LavaDome: first argument must be a string, instead got ${O(e)}`);if(void 0===k(b(e),1))return _(n,e);E(b(e),(e=>{const o=x(document,"span");t[T.isInnerInstance]=!0,new B(o,t).text(e),M(n,o)})),M(n,W())}}});const n=J(),o=function(e,t){const{unsafeOpenModeShadow:n,isInnerInstance:o}=t;let r=L(Y,e);if(!r){const t={mode:"closed"};n&&(t.mode="open",o||console.warn("LavaDome:",`Initiated with "${T.unsafeOpenModeShadow}" set to true.`,"This leaves LavaDome fully vulnerable, ONLY USE FOR TESTING!")),r=g(e,t),P(Y,e,r)}return r}(e,t);M(o,n)}const H=({text:e,unsafeOpenModeShadow:t})=>{const r=(0,n.useRef)(null);return o().createElement("span",{ref:r,__source:{fileName:"/Users/weizman/Documents/lavamoat/LavaDome/packages/react/src/index.jsx",lineNumber:7,columnNumber:9},__self:void 0},o().createElement(K,{text:e,hostRef:r,unsafeOpenModeShadow:t,__source:{fileName:"/Users/weizman/Documents/lavamoat/LavaDome/packages/react/src/index.jsx",lineNumber:8,columnNumber:13},__self:void 0}))};function K({hostRef:e,text:t,unsafeOpenModeShadow:r}){const a=(0,n.useRef)(null);return(0,n.useEffect)((()=>(a.current=new B(e.current,{unsafeOpenModeShadow:r}),()=>a.current=null)),[]),(0,n.useEffect)((()=>{a.current.text(t)}),[t]),o().createElement(o().Fragment,null)}var Q=exports;for(var V in t)Q[V]=t[V];t.__esModule&&Object.defineProperty(Q,"__esModule",{value:!0})})();
//# sourceMappingURL=main.js.map

@@ -1,4 +0,6 @@

import React from 'react'
import { LavaDome as LavaDomeReact } from '../src/index'
import React from 'react';
import { LavaDome as LavaDomeReact } from '../src/index';
const unsafeOpenModeShadow = location.href.includes('unsafeOpenModeShadow');
export default function App() {

@@ -16,3 +18,6 @@ return (

<p id="PRIVATE">
<LavaDomeReact text={'SECRET_CONTENT_ONLY_ACCESSIBLE_TO_LAVADOME'} />
<LavaDomeReact
unsafeOpenModeShadow={unsafeOpenModeShadow}
text={'SECRET_CONTENT_ONLY_ACCESSIBLE_TO_LAVADOME'}
/>
</p>

@@ -19,0 +24,0 @@ </div>

{
"name": "@lavamoat/lavadome-react",
"version": "0.0.6",
"version": "0.0.7",
"description": "",

@@ -33,3 +33,3 @@ "license": "MIT",

"dependencies": {
"@lavamoat/lavadome-core": "^0.0.6"
"@lavamoat/lavadome-core": "^0.0.7"
},

@@ -36,0 +36,0 @@ "peerDependencies": {

import React, { useEffect, useRef } from 'react'
import { LavaDome as LavaDomeCore } from "@lavamoat/lavadome-core"
export const LavaDome = ({ text }) => {
const hostRef = useRef(null)
export const LavaDome = ({ text, unsafeOpenModeShadow }) => {
const hostRef = useRef(null);
return (
<span ref={hostRef}>
<LavaDomeShadow text={text} hostRef={hostRef} />
<LavaDomeShadow
text={text} hostRef={hostRef}
unsafeOpenModeShadow={unsafeOpenModeShadow}
/>
</span>

@@ -13,7 +16,9 @@ )

function LavaDomeShadow({ text, hostRef }) {
function LavaDomeShadow({ hostRef, text, unsafeOpenModeShadow }) {
const lavadome = useRef(null);
useEffect(() => {
lavadome.current = new LavaDomeCore(hostRef.current);
lavadome.current = new LavaDomeCore(hostRef.current, {
unsafeOpenModeShadow,
});
return () => lavadome.current = null;

@@ -20,0 +25,0 @@ }, [])

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