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

@salutejs/core-themes

Package Overview
Dependencies
Maintainers
0
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salutejs/core-themes - npm Package Compare versions

Comparing version 0.16.0-canary.1521.11594771058.0 to 0.16.0-canary.1654.12387953419.0

build/cjs/creators/createSpacingTokens.d.ts

1

build/cjs/creators/index.d.ts

@@ -5,3 +5,4 @@ export { createColorTokens } from './createColorTokens';

export { createShapeTokens } from './createShapeTokens';
export { createSpacingTokens } from './createSpacingTokens';
export { createTypographyTokens } from './createTypographyTokens';
export { createViewContainerTokens } from './createViewContainerTokens';

4

build/cjs/creators/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createViewContainerTokens = exports.createTypographyTokens = exports.createShapeTokens = exports.createShadowTokens = exports.createGradientTokens = exports.createColorTokens = void 0;
exports.createViewContainerTokens = exports.createTypographyTokens = exports.createSpacingTokens = exports.createShapeTokens = exports.createShadowTokens = exports.createGradientTokens = exports.createColorTokens = void 0;
var createColorTokens_1 = require("./createColorTokens");

@@ -12,2 +12,4 @@ Object.defineProperty(exports, "createColorTokens", { enumerable: true, get: function () { return createColorTokens_1.createColorTokens; } });

Object.defineProperty(exports, "createShapeTokens", { enumerable: true, get: function () { return createShapeTokens_1.createShapeTokens; } });
var createSpacingTokens_1 = require("./createSpacingTokens");
Object.defineProperty(exports, "createSpacingTokens", { enumerable: true, get: function () { return createSpacingTokens_1.createSpacingTokens; } });
var createTypographyTokens_1 = require("./createTypographyTokens");

@@ -14,0 +16,0 @@ Object.defineProperty(exports, "createTypographyTokens", { enumerable: true, get: function () { return createTypographyTokens_1.createTypographyTokens; } });

@@ -48,3 +48,3 @@ "use strict";

var generate = function (themes) { return __awaiter(void 0, void 0, void 0, function () {
var themeDir, isJS, _i, themes_1, theme, themeSource, meta, variations, metaGrouped, colorCSSVariables, colorJSVariables, gradientCSSVariables, gradientJSVariables, shapeCSSVariables, shapeJSVariables, shadowCSSVariables, shadowJSVariables, typographyCSSVariables, typographyJSVariables, viewContainerVariables, cssVariables, themeDefault, metaGroupedDefault, colorDefaultJSVariables, gradientDefaultJSVariables, shapeDefaultJSVariables, shadowDefaultJSVariables, typographyDefaultJSVariables;
var themeDir, isJS, _i, themes_1, theme, themeSource, meta, variations, metaGrouped, colorCSSVariables, colorJSVariables, gradientCSSVariables, gradientJSVariables, shapeCSSVariables, shapeJSVariables, spacingCSSVariables, spacingJSVariables, shadowCSSVariables, shadowJSVariables, typographyCSSVariables, typographyJSVariables, viewContainerVariables, cssVariables, themeDefault, metaGroupedDefault, colorDefaultJSVariables, gradientDefaultJSVariables, shapeDefaultJSVariables, spacingDefaultJSVariables, shadowDefaultJSVariables, typographyDefaultJSVariables;
return __generator(this, function (_a) {

@@ -72,2 +72,4 @@ switch (_a.label) {

shapeJSVariables = creators_1.createShapeTokens(variations.shape, metaGrouped.shape, isJS);
spacingCSSVariables = creators_1.createSpacingTokens(variations.spacing, metaGrouped.spacing);
spacingJSVariables = creators_1.createSpacingTokens(variations.spacing, metaGrouped.spacing, isJS);
shadowCSSVariables = creators_1.createShadowTokens(variations.shadow, metaGrouped.shadow);

@@ -84,2 +86,3 @@ shadowJSVariables = creators_1.createShadowTokens(variations.shadow, metaGrouped.shadow, isJS);

shapeTokens: shapeCSSVariables.dark,
spacingTokens: spacingCSSVariables.dark,
typographyTokens: typographyCSSVariables.dark,

@@ -92,2 +95,3 @@ },

shapeTokens: shapeCSSVariables.light,
spacingTokens: spacingCSSVariables.light,
typographyTokens: typographyCSSVariables.light,

@@ -104,2 +108,3 @@ },

shapeTokens: shapeJSVariables.dark,
spacingTokens: spacingJSVariables.dark,
typographyTokens: typographyJSVariables.dark,

@@ -119,2 +124,3 @@ viewContainerTokens: viewContainerVariables,

shapeDefaultJSVariables = creators_1.createShapeTokens(undefined, metaGroupedDefault.shape, isJS).dark;
spacingDefaultJSVariables = creators_1.createSpacingTokens(undefined, metaGroupedDefault.spacing, isJS).dark;
shadowDefaultJSVariables = creators_1.createShadowTokens(undefined, metaGroupedDefault.shadow, isJS).dark;

@@ -127,2 +133,3 @@ typographyDefaultJSVariables = creators_1.createTypographyTokens(undefined, undefined, metaGroupedDefault.typography, true).dark;

shapeTokens: shapeDefaultJSVariables,
spacingTokens: spacingDefaultJSVariables,
typographyTokens: typographyDefaultJSVariables,

@@ -129,0 +136,0 @@ });

@@ -29,2 +29,3 @@ "use strict";

utils_1.getSelector(themeContent.dark.shapeTokens, groupSelector),
utils_1.getSelector(themeContent.dark.spacingTokens, groupSelector),
utils_1.getSelector(themeContent.dark.typographyTokens.root, groupSelector),

@@ -31,0 +32,0 @@ utils_1.getBreakpointSelector(themeContent.dark.typographyTokens.screenS, screenS.from, screenS.to, groupSelector),

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

utils_1.getSelector(themeContent[themeMode].shapeTokens),
utils_1.getSelector(themeContent[themeMode].spacingTokens),
utils_1.getSelector(themeContent[themeMode].typographyTokens.root),

@@ -23,0 +24,0 @@ utils_1.getBreakpointSelector(themeContent[themeMode].typographyTokens.screenS, screenS.from),

@@ -17,2 +17,3 @@ "use strict";

themeContent.shapeTokens,
themeContent.spacingTokens,
themeContent.typographyTokens.screenS,

@@ -19,0 +20,0 @@ ].join('\n');

@@ -22,2 +22,3 @@ "use strict";

utils_1.getSelector(themeContent[themeMode].shapeTokens),
utils_1.getSelector(themeContent[themeMode].spacingTokens),
utils_1.getSelector(themeContent[themeMode].typographyTokens.root),

@@ -24,0 +25,0 @@ utils_1.getBreakpointSelector(themeContent[themeMode].typographyTokens.screenS, screenS.from),

@@ -20,2 +20,3 @@ "use strict";

themeContent.shapeTokens,
themeContent.spacingTokens,
themeContent.typographyTokens.screenS,

@@ -22,0 +23,0 @@ themeContent.viewContainerTokens,

@@ -10,9 +10,10 @@ export declare type MetaGrouped = Partial<Record<TokenType['type'], Array<TokenType>>>;

}
export interface Variations<T1 extends any = any, T2 extends any = any, T3 extends any = any, T4 extends any = any, T5 extends any = any, T6 extends any = any> {
export interface Variations<T1 extends any = any, T2 extends any = any, T3 extends any = any, T4 extends any = any, T5 extends any = any, T6 extends any = any, T7 extends any = any> {
color: T1;
gradient: T2;
shape: T4;
shadow: T3;
typography: T5;
fontFamily: T6;
shape: T3;
spacing: T4;
shadow: T5;
typography: T6;
fontFamily: T7;
}

@@ -37,2 +38,3 @@ export declare type Variation = keyof Variations;

shapeTokens: string;
spacingTokens: string;
shadowTokens: string;

@@ -39,0 +41,0 @@ typographyTokens: {

import { ThemeMeta } from '../types';
export declare const getMetaGrouped: (meta: ThemeMeta) => Partial<Record<keyof import("../types").Variations<any, any, any, any, any, any>, import("../types").TokenType[]>>;
export declare const getMetaGrouped: (meta: ThemeMeta) => Partial<Record<keyof import("../types").Variations<any, any, any, any, any, any, any>, import("../types").TokenType[]>>;

@@ -5,3 +5,3 @@ "use strict";

var kebabToCamel = function (str) {
return str.replace(/-([a-z])/g, function (_, group) { return group.toUpperCase(); }).replace(/^./, function (char) { return char.toLowerCase(); });
return str.replace(/-([a-z0-9])/g, function (_, group) { return group.toUpperCase(); }).replace(/^./, function (char) { return char.toLowerCase(); });
};

@@ -8,0 +8,0 @@ exports.kebabToCamel = kebabToCamel;

import { ThemeMeta } from '../types';
export declare const readTheme: (themeName: string, themeVersion: string) => Promise<{
meta: ThemeMeta;
variations: Record<keyof import("../types").Variations<any, any, any, any, any, any>, any>;
variations: Record<keyof import("../types").Variations<any, any, any, any, any, any, any>, any>;
}>;
export declare const getSelector: (content: string, selector?: string) => string;
export declare const getBreakpointSelector: (content: string, from?: number | undefined, to?: number | undefined, selector?: string) => string;

@@ -5,4 +5,5 @@ export { createColorTokens } from './createColorTokens';

export { createShapeTokens } from './createShapeTokens';
export { createSpacingTokens } from './createSpacingTokens';
export { createTypographyTokens } from './createTypographyTokens';
export { createViewContainerTokens } from './createViewContainerTokens';
//# sourceMappingURL=index.js.map

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

import fs from 'fs';
import { createColorTokens, createGradientTokens, createShadowTokens, createShapeTokens, createTypographyTokens, createViewContainerTokens, } from './creators';
import { createColorTokens, createGradientTokens, createShadowTokens, createShapeTokens, createSpacingTokens, createTypographyTokens, createViewContainerTokens, } from './creators';
import { generateCSSThemes, generateCSSModuleThemes, generateDefaultTokens, generateRootIndex, generateThemes, generateTokens, } from './generators';
import { getMetaGrouped, readTheme, fallbackCreateColorTokensWrapper } from './utils';
export var generate = function (themes) { return __awaiter(void 0, void 0, void 0, function () {
var themeDir, isJS, _i, themes_1, theme, themeSource, meta, variations, metaGrouped, colorCSSVariables, colorJSVariables, gradientCSSVariables, gradientJSVariables, shapeCSSVariables, shapeJSVariables, shadowCSSVariables, shadowJSVariables, typographyCSSVariables, typographyJSVariables, viewContainerVariables, cssVariables, themeDefault, metaGroupedDefault, colorDefaultJSVariables, gradientDefaultJSVariables, shapeDefaultJSVariables, shadowDefaultJSVariables, typographyDefaultJSVariables;
var themeDir, isJS, _i, themes_1, theme, themeSource, meta, variations, metaGrouped, colorCSSVariables, colorJSVariables, gradientCSSVariables, gradientJSVariables, shapeCSSVariables, shapeJSVariables, spacingCSSVariables, spacingJSVariables, shadowCSSVariables, shadowJSVariables, typographyCSSVariables, typographyJSVariables, viewContainerVariables, cssVariables, themeDefault, metaGroupedDefault, colorDefaultJSVariables, gradientDefaultJSVariables, shapeDefaultJSVariables, spacingDefaultJSVariables, shadowDefaultJSVariables, typographyDefaultJSVariables;
return __generator(this, function (_a) {

@@ -66,2 +66,4 @@ switch (_a.label) {

shapeJSVariables = createShapeTokens(variations.shape, metaGrouped.shape, isJS);
spacingCSSVariables = createSpacingTokens(variations.spacing, metaGrouped.spacing);
spacingJSVariables = createSpacingTokens(variations.spacing, metaGrouped.spacing, isJS);
shadowCSSVariables = createShadowTokens(variations.shadow, metaGrouped.shadow);

@@ -78,2 +80,3 @@ shadowJSVariables = createShadowTokens(variations.shadow, metaGrouped.shadow, isJS);

shapeTokens: shapeCSSVariables.dark,
spacingTokens: spacingCSSVariables.dark,
typographyTokens: typographyCSSVariables.dark,

@@ -86,2 +89,3 @@ },

shapeTokens: shapeCSSVariables.light,
spacingTokens: spacingCSSVariables.light,
typographyTokens: typographyCSSVariables.light,

@@ -98,2 +102,3 @@ },

shapeTokens: shapeJSVariables.dark,
spacingTokens: spacingJSVariables.dark,
typographyTokens: typographyJSVariables.dark,

@@ -113,2 +118,3 @@ viewContainerTokens: viewContainerVariables,

shapeDefaultJSVariables = createShapeTokens(undefined, metaGroupedDefault.shape, isJS).dark;
spacingDefaultJSVariables = createSpacingTokens(undefined, metaGroupedDefault.spacing, isJS).dark;
shadowDefaultJSVariables = createShadowTokens(undefined, metaGroupedDefault.shadow, isJS).dark;

@@ -121,2 +127,3 @@ typographyDefaultJSVariables = createTypographyTokens(undefined, undefined, metaGroupedDefault.typography, true).dark;

shapeTokens: shapeDefaultJSVariables,
spacingTokens: spacingDefaultJSVariables,
typographyTokens: typographyDefaultJSVariables,

@@ -123,0 +130,0 @@ });

@@ -23,2 +23,3 @@ import path from 'path';

getSelector(themeContent.dark.shapeTokens, groupSelector),
getSelector(themeContent.dark.spacingTokens, groupSelector),
getSelector(themeContent.dark.typographyTokens.root, groupSelector),

@@ -25,0 +26,0 @@ getBreakpointSelector(themeContent.dark.typographyTokens.screenS, screenS.from, screenS.to, groupSelector),

@@ -15,2 +15,3 @@ import path from 'path';

getSelector(themeContent[themeMode].shapeTokens),
getSelector(themeContent[themeMode].spacingTokens),
getSelector(themeContent[themeMode].typographyTokens.root),

@@ -17,0 +18,0 @@ getBreakpointSelector(themeContent[themeMode].typographyTokens.screenS, screenS.from),

@@ -11,2 +11,3 @@ import path from 'path';

themeContent.shapeTokens,
themeContent.spacingTokens,
themeContent.typographyTokens.screenS,

@@ -13,0 +14,0 @@ ].join('\n');

@@ -16,2 +16,3 @@ import path from 'path';

getSelector(themeContent[themeMode].shapeTokens),
getSelector(themeContent[themeMode].spacingTokens),
getSelector(themeContent[themeMode].typographyTokens.root),

@@ -18,0 +19,0 @@ getBreakpointSelector(themeContent[themeMode].typographyTokens.screenS, screenS.from),

@@ -14,2 +14,3 @@ import path from 'path';

themeContent.shapeTokens,
themeContent.spacingTokens,
themeContent.typographyTokens.screenS,

@@ -16,0 +17,0 @@ themeContent.viewContainerTokens,

export var kebabToCamel = function (str) {
return str.replace(/-([a-z])/g, function (_, group) { return group.toUpperCase(); }).replace(/^./, function (char) { return char.toLowerCase(); });
return str.replace(/-([a-z0-9])/g, function (_, group) { return group.toUpperCase(); }).replace(/^./, function (char) { return char.toLowerCase(); });
};
export var camelToKebab = function (str) { return str.replace(/[A-Z]/g, function (match) { return "-" + match.toLowerCase(); }); };
//# sourceMappingURL=other.js.map
{
"name": "@salutejs/core-themes",
"version": "0.16.0-canary.1521.11594771058.0",
"version": "0.16.0-canary.1654.12387953419.0",
"description": "Core-themes package",

@@ -37,3 +37,3 @@ "author": "Salute Frontend Team <salute.developers@gmail.com>",

"sideEffects": false,
"gitHead": "a25d39a9a4995315b4916f6d3fefea0ab6e67ce9"
"gitHead": "08e02d9c68af3df4fbad068d2b4d857e64d1e37d"
}

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

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

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

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