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

@builderx/bridge

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@builderx/bridge - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

26

dist/initBridge.js

@@ -202,3 +202,12 @@ "use strict";

function getDomNodeFromPath(path) {
return document.querySelector(`[data-path="${path}"]`);
const fiberNode = getFibreNodeFromPath(path);
// Get the DOM node from the fiber node
let domNode;
if (fiberNode) {
domNode = getDomNodeFromFiber(fiberNode);
}
else {
domNode = document.querySelector(`[data-path="${path}"]`);
}
return domNode;
}

@@ -208,11 +217,3 @@ // Update this function

const { layerId } = args;
const fiberNode = getFibreNodeFromPath(layerId);
// console.log(fiberNode, 'fiberNode in getLayerById initBridge')
let element = null;
if (fiberNode) {
element = getDomNodeFromFiber(fiberNode);
}
else {
element = getDomNodeFromPath(layerId);
}
const element = getDomNodeFromPath(layerId);
if (element) {

@@ -232,7 +233,4 @@ const rect = element.getBoundingClientRect();

const { layerId } = args;
const fiberNode = getFibreNodeFromPath(layerId);
console.log({ fiberNode }, 'fiberNode in getLayerComputedStyle initBridge');
// Get the DOM node from the fiber node
const domNode = getDomNodeFromFiber(fiberNode);
console.log({ domNode }, 'domNode in getLayerComputedStyle initBridge');
const domNode = getDomNodeFromPath(layerId);
if (domNode) {

@@ -239,0 +237,0 @@ // Get the computed style of the DOM node

{
"name": "@builderx/bridge",
"version": "0.1.8",
"version": "0.1.9",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -130,3 +130,5 @@ declare global {

case 'getLayerComputedStyle':
result = getLayerComputedStyle(fnArgs);
break;

@@ -249,3 +251,12 @@

function getDomNodeFromPath(path: string): Element | null {
return document.querySelector(`[data-path="${path}"]`);
const fiberNode = getFibreNodeFromPath(path);
// Get the DOM node from the fiber node
let domNode: Element | null;
if (fiberNode) {
domNode = getDomNodeFromFiber(fiberNode);
} else {
domNode = document.querySelector(`[data-path="${path}"]`);
}
return domNode;
}

@@ -255,12 +266,4 @@ // Update this function

const { layerId } = args;
const element: Element | null = getDomNodeFromPath(layerId);
const fiberNode = getFibreNodeFromPath(layerId);
// console.log(fiberNode, 'fiberNode in getLayerById initBridge')
let element: Element | null = null;
if (fiberNode) {
element = getDomNodeFromFiber(fiberNode);
} else {
element = getDomNodeFromPath(layerId);
}
if (element) {

@@ -281,9 +284,8 @@ const rect = element.getBoundingClientRect();

function getLayerComputedStyle(args: { layerId: string }): any {
const { layerId } = args;
const fiberNode = getFibreNodeFromPath(layerId);
console.log({fiberNode}, 'fiberNode in getLayerComputedStyle initBridge')
// Get the DOM node from the fiber node
const domNode = getDomNodeFromFiber(fiberNode);
console.log({domNode}, 'domNode in getLayerComputedStyle initBridge')
const domNode: any = getDomNodeFromPath(layerId);
if (domNode) {

@@ -290,0 +292,0 @@ // Get the computed style of the DOM node

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