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

@teleporthq/teleport-plugin-css

Package Overview
Dependencies
Maintainers
5
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version

to
0.17.6

42

dist/cjs/index.js

@@ -13,2 +13,21 @@ "use strict";

};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -50,10 +69,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createStyleSheetPlugin = exports.createCSSPlugin = void 0;
var teleport_shared_1 = require("@teleporthq/teleport-shared");

@@ -64,12 +77,12 @@ var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common");

var style_sheet_1 = require("./style-sheet");
exports.createStyleSheetPlugin = style_sheet_1.createStyleSheetPlugin;
exports.createCSSPlugin = function (config) {
Object.defineProperty(exports, "createStyleSheetPlugin", { enumerable: true, get: function () { return style_sheet_1.createStyleSheetPlugin; } });
var createCSSPlugin = function (config) {
var _a = config || {}, _b = _a.chunkName, chunkName = _b === void 0 ? 'style-chunk' : _b, _c = _a.templateChunkName, templateChunkName = _c === void 0 ? 'template-chunk' : _c, _d = _a.componentDecoratorChunkName, componentDecoratorChunkName = _d === void 0 ? 'component-decorator' : _d, _e = _a.inlineStyleAttributeKey, inlineStyleAttributeKey = _e === void 0 ? 'style' : _e, _f = _a.classAttributeName, classAttributeName = _f === void 0 ? 'class' : _f, _g = _a.templateStyle, templateStyle = _g === void 0 ? 'html' : _g, _h = _a.declareDependency, declareDependency = _h === void 0 ? 'none' : _h, _j = _a.forceScoping, forceScoping = _j === void 0 ? false : _j, dynamicVariantPrefix = _a.dynamicVariantPrefix;
var cssPlugin = function (structure) { return __awaiter(void 0, void 0, void 0, function () {
var uidl, chunks, dependencies, options, node, _a, componentStyleSet, _b, projectStyleSet, _c, _d, tokens, isRootComponent, _e, _f, styleSetDefinitions, projectStyleSheetName, path, templateChunk, componentDecoratorChunk, templateLookup, propsPrefix, cssMap, mediaStylesMap, cssFileName, decoratorAST, decoratorParam;
return __generator(this, function (_g) {
var uidl, chunks, dependencies, options, node, _a, componentStyleSet, _b, projectStyleSet, _c, _d, _e, tokens, isRootComponent, _f, _g, styleSetDefinitions, projectStyleSheetName, projectStyleSheetPath, templateChunk, componentDecoratorChunk, templateLookup, propsPrefix, cssMap, mediaStylesMap, cssFileName, decoratorAST, decoratorParam;
return __generator(this, function (_h) {
uidl = structure.uidl, chunks = structure.chunks, dependencies = structure.dependencies, options = structure.options;
node = uidl.node, _a = uidl.styleSetDefinitions, componentStyleSet = _a === void 0 ? {} : _a;
_b = options || {}, projectStyleSet = _b.projectStyleSet, _c = _b.designLanguage, _d = (_c === void 0 ? {} : _c).tokens, tokens = _d === void 0 ? {} : _d, isRootComponent = _b.isRootComponent;
_e = projectStyleSet || {}, _f = _e.styleSetDefinitions, styleSetDefinitions = _f === void 0 ? {} : _f, projectStyleSheetName = _e.fileName, path = _e.path;
_b = options || {}, projectStyleSet = _b.projectStyleSet, _c = _b.designLanguage, _d = _c === void 0 ? {} : _c, _e = _d.tokens, tokens = _e === void 0 ? {} : _e, isRootComponent = _b.isRootComponent;
_f = projectStyleSet || {}, _g = _f.styleSetDefinitions, styleSetDefinitions = _g === void 0 ? {} : _g, projectStyleSheetName = _f.fileName, projectStyleSheetPath = _f.path;
if (isRootComponent) {

@@ -79,3 +92,3 @@ if (Object.keys(tokens).length > 0 || Object.keys(styleSetDefinitions).length > 0) {

type: 'local',
path: path + "/" + projectStyleSheetName + "." + teleport_types_1.FileType.CSS,
path: "" + projectStyleSheetPath + projectStyleSheetName + "." + teleport_types_1.FileType.CSS,
meta: {

@@ -238,2 +251,3 @@ importJustPath: true,

};
exports.createCSSPlugin = createCSSPlugin;
exports.default = exports.createCSSPlugin();

@@ -240,0 +254,0 @@ var createDynamicInlineStyle = function (styles) {

@@ -39,11 +39,12 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.createStyleSheetPlugin = void 0;
var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common");
var teleport_types_1 = require("@teleporthq/teleport-types");
exports.createStyleSheetPlugin = function (config) {
var createStyleSheetPlugin = function (config) {
var fileName = (config || { fileName: 'style' }).fileName;
var styleSheetPlugin = function (structure) { return __awaiter(void 0, void 0, void 0, function () {
var uidl, chunks, _a, styleSetDefinitions, _b, _c, tokens, cssMap, mediaStylesMap;
return __generator(this, function (_d) {
var uidl, chunks, _a, styleSetDefinitions, _b, _c, _d, tokens, cssMap, mediaStylesMap;
return __generator(this, function (_e) {
uidl = structure.uidl, chunks = structure.chunks;
_a = uidl.styleSetDefinitions, styleSetDefinitions = _a === void 0 ? {} : _a, _b = uidl.designLanguage, _c = (_b === void 0 ? {} : _b).tokens, tokens = _c === void 0 ? {} : _c;
_a = uidl.styleSetDefinitions, styleSetDefinitions = _a === void 0 ? {} : _a, _b = uidl.designLanguage, _c = _b === void 0 ? {} : _b, _d = _c.tokens, tokens = _d === void 0 ? {} : _d;
if ((!styleSetDefinitions && !tokens) ||

@@ -79,2 +80,3 @@ (Object.keys(styleSetDefinitions).length === 0 && Object.keys(tokens).length === 0)) {

};
exports.createStyleSheetPlugin = createStyleSheetPlugin;
//# sourceMappingURL=style-sheet.js.map

@@ -56,8 +56,8 @@ var __assign = (this && this.__assign) || function () {

var cssPlugin = function (structure) { return __awaiter(void 0, void 0, void 0, function () {
var uidl, chunks, dependencies, options, node, _a, componentStyleSet, _b, projectStyleSet, _c, _d, tokens, isRootComponent, _e, _f, styleSetDefinitions, projectStyleSheetName, path, templateChunk, componentDecoratorChunk, templateLookup, propsPrefix, cssMap, mediaStylesMap, cssFileName, decoratorAST, decoratorParam;
return __generator(this, function (_g) {
var uidl, chunks, dependencies, options, node, _a, componentStyleSet, _b, projectStyleSet, _c, _d, _e, tokens, isRootComponent, _f, _g, styleSetDefinitions, projectStyleSheetName, projectStyleSheetPath, templateChunk, componentDecoratorChunk, templateLookup, propsPrefix, cssMap, mediaStylesMap, cssFileName, decoratorAST, decoratorParam;
return __generator(this, function (_h) {
uidl = structure.uidl, chunks = structure.chunks, dependencies = structure.dependencies, options = structure.options;
node = uidl.node, _a = uidl.styleSetDefinitions, componentStyleSet = _a === void 0 ? {} : _a;
_b = options || {}, projectStyleSet = _b.projectStyleSet, _c = _b.designLanguage, _d = (_c === void 0 ? {} : _c).tokens, tokens = _d === void 0 ? {} : _d, isRootComponent = _b.isRootComponent;
_e = projectStyleSet || {}, _f = _e.styleSetDefinitions, styleSetDefinitions = _f === void 0 ? {} : _f, projectStyleSheetName = _e.fileName, path = _e.path;
_b = options || {}, projectStyleSet = _b.projectStyleSet, _c = _b.designLanguage, _d = _c === void 0 ? {} : _c, _e = _d.tokens, tokens = _e === void 0 ? {} : _e, isRootComponent = _b.isRootComponent;
_f = projectStyleSet || {}, _g = _f.styleSetDefinitions, styleSetDefinitions = _g === void 0 ? {} : _g, projectStyleSheetName = _f.fileName, projectStyleSheetPath = _f.path;
if (isRootComponent) {

@@ -67,3 +67,3 @@ if (Object.keys(tokens).length > 0 || Object.keys(styleSetDefinitions).length > 0) {

type: 'local',
path: path + "/" + projectStyleSheetName + "." + FileType.CSS,
path: "" + projectStyleSheetPath + projectStyleSheetName + "." + FileType.CSS,
meta: {

@@ -70,0 +70,0 @@ importJustPath: true,

@@ -42,6 +42,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

var styleSheetPlugin = function (structure) { return __awaiter(void 0, void 0, void 0, function () {
var uidl, chunks, _a, styleSetDefinitions, _b, _c, tokens, cssMap, mediaStylesMap;
return __generator(this, function (_d) {
var uidl, chunks, _a, styleSetDefinitions, _b, _c, _d, tokens, cssMap, mediaStylesMap;
return __generator(this, function (_e) {
uidl = structure.uidl, chunks = structure.chunks;
_a = uidl.styleSetDefinitions, styleSetDefinitions = _a === void 0 ? {} : _a, _b = uidl.designLanguage, _c = (_b === void 0 ? {} : _b).tokens, tokens = _c === void 0 ? {} : _c;
_a = uidl.styleSetDefinitions, styleSetDefinitions = _a === void 0 ? {} : _a, _b = uidl.designLanguage, _c = _b === void 0 ? {} : _b, _d = _c.tokens, tokens = _d === void 0 ? {} : _d;
if ((!styleSetDefinitions && !tokens) ||

@@ -48,0 +48,0 @@ (Object.keys(styleSetDefinitions).length === 0 && Object.keys(tokens).length === 0)) {

{
"name": "@teleporthq/teleport-plugin-css",
"version": "0.17.3",
"version": "0.17.6",
"description": "A plugin for creating the styles into external css files",

@@ -32,3 +32,3 @@ "author": "teleportHQ",

},
"gitHead": "1a673d148f2626c5488092f3e88b3a9d7c9725b4"
"gitHead": "24b885a8fbc39cc12ba9bf4be5e85a7f9b24cf94"
}

@@ -50,3 +50,3 @@ import { StringUtils, UIDLUtils } from '@teleporthq/teleport-shared'

fileName: projectStyleSheetName,
path,
path: projectStyleSheetPath,
} = projectStyleSet || {}

@@ -58,3 +58,3 @@

type: 'local',
path: `${path}/${projectStyleSheetName}.${FileType.CSS}`,
path: `${projectStyleSheetPath}${projectStyleSheetName}.${FileType.CSS}`,
meta: {

@@ -61,0 +61,0 @@ importJustPath: true,

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 not supported yet