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

@teleporthq/teleport-plugin-common

Package Overview
Dependencies
Maintainers
3
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teleporthq/teleport-plugin-common - npm Package Compare versions

Comparing version

to
0.19.21

28

dist/cjs/builders/ast-builders.js

@@ -179,12 +179,26 @@ "use strict";

if ((asset.type === 'style' || asset.type === 'font') && assetPath) {
var linkTag = (0, exports.createJSXTag)('link');
(0, ast_utils_1.addAttributeToJSXTag)(linkTag, 'rel', 'stylesheet');
(0, ast_utils_1.addAttributeToJSXTag)(linkTag, 'href', assetPath);
(0, ast_utils_1.addChildJSXTag)(headNode, linkTag);
var linkTag_1 = (0, exports.createJSXTag)('link');
(0, ast_utils_1.addAttributeToJSXTag)(linkTag_1, 'rel', 'stylesheet');
(0, ast_utils_1.addAttributeToJSXTag)(linkTag_1, 'href', assetPath);
if ('attrs' in asset) {
Object.keys((asset.attrs || {})).forEach(function (assetId) {
var value = asset.attrs[assetId]
.content;
(0, ast_utils_1.addAttributeToJSXTag)(linkTag_1, assetId, value);
});
}
(0, ast_utils_1.addChildJSXTag)(headNode, linkTag_1);
}
// inline style
if (asset.type === 'style' && 'content' in asset) {
var styleTag = (0, exports.createJSXTag)('style');
(0, ast_utils_1.addAttributeToJSXTag)(styleTag, 'dangerouslySetInnerHTML', { __html: asset.content });
(0, ast_utils_1.addChildJSXTag)(headNode, styleTag);
var styleTag_1 = (0, exports.createJSXTag)('style');
(0, ast_utils_1.addAttributeToJSXTag)(styleTag_1, 'dangerouslySetInnerHTML', { __html: asset.content });
if ('attrs' in asset) {
Object.keys((asset.attrs || {})).forEach(function (assetId) {
var value = asset.attrs[assetId]
.content;
(0, ast_utils_1.addAttributeToJSXTag)(styleTag_1, assetId, value);
});
}
(0, ast_utils_1.addChildJSXTag)(headNode, styleTag_1);
}

@@ -191,0 +205,0 @@ // script (external or inline)

@@ -141,12 +141,26 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {

if ((asset.type === 'style' || asset.type === 'font') && assetPath) {
var linkTag = createJSXTag('link');
addAttributeToJSXTag(linkTag, 'rel', 'stylesheet');
addAttributeToJSXTag(linkTag, 'href', assetPath);
addChildJSXTag(headNode, linkTag);
var linkTag_1 = createJSXTag('link');
addAttributeToJSXTag(linkTag_1, 'rel', 'stylesheet');
addAttributeToJSXTag(linkTag_1, 'href', assetPath);
if ('attrs' in asset) {
Object.keys((asset.attrs || {})).forEach(function (assetId) {
var value = asset.attrs[assetId]
.content;
addAttributeToJSXTag(linkTag_1, assetId, value);
});
}
addChildJSXTag(headNode, linkTag_1);
}
// inline style
if (asset.type === 'style' && 'content' in asset) {
var styleTag = createJSXTag('style');
addAttributeToJSXTag(styleTag, 'dangerouslySetInnerHTML', { __html: asset.content });
addChildJSXTag(headNode, styleTag);
var styleTag_1 = createJSXTag('style');
addAttributeToJSXTag(styleTag_1, 'dangerouslySetInnerHTML', { __html: asset.content });
if ('attrs' in asset) {
Object.keys((asset.attrs || {})).forEach(function (assetId) {
var value = asset.attrs[assetId]
.content;
addAttributeToJSXTag(styleTag_1, assetId, value);
});
}
addChildJSXTag(headNode, styleTag_1);
}

@@ -153,0 +167,0 @@ // script (external or inline)

{
"name": "@teleporthq/teleport-plugin-common",
"version": "0.19.19",
"version": "0.19.21",
"description": "Common building and modelating functions for ASTs and HASTs",

@@ -28,8 +28,8 @@ "author": "teleportHQ",

"@babel/types": "^7.14.5",
"@teleporthq/teleport-shared": "^0.19.19",
"@teleporthq/teleport-types": "^0.19.19",
"@teleporthq/teleport-shared": "^0.19.21",
"@teleporthq/teleport-types": "^0.19.21",
"jss": "^10.0.0",
"jss-preset-default": "^10.0.0"
},
"gitHead": "154a51920ecfcdec93d08b9db2911a2969b61d5c"
"gitHead": "1292cc8f7c17fa6422a5e7687a8c7d5b5dac3084"
}

@@ -13,2 +13,3 @@ import * as types from '@babel/types'

UIDLStateModifierEvent,
UIDLStaticValue,
} from '@teleporthq/teleport-types'

@@ -210,2 +211,13 @@ import { UIDLUtils } from '@teleporthq/teleport-shared'

addAttributeToJSXTag(linkTag, 'href', assetPath)
if ('attrs' in asset) {
Object.keys((asset.attrs || {}) as Record<string, UIDLStaticValue>).forEach(
(assetId: string) => {
const value = (asset.attrs as unknown as Record<string, UIDLStaticValue>)[assetId]
.content
addAttributeToJSXTag(linkTag, assetId, value)
}
)
}
addChildJSXTag(headNode, linkTag)

@@ -218,2 +230,13 @@ }

addAttributeToJSXTag(styleTag, 'dangerouslySetInnerHTML', { __html: asset.content })
if ('attrs' in asset) {
Object.keys((asset.attrs || {}) as Record<string, UIDLStaticValue>).forEach(
(assetId: string) => {
const value = (asset.attrs as unknown as Record<string, UIDLStaticValue>)[assetId]
.content
addAttributeToJSXTag(styleTag, assetId, value)
}
)
}
addChildJSXTag(headNode, styleTag)

@@ -220,0 +243,0 @@ }

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