Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pandacss/core

Package Overview
Dependencies
Maintainers
1
Versions
1144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pandacss/core - npm Package Compare versions

Comparing version 0.0.0-dev-20221121175259 to 0.0.0-dev-20221122153914

15

dist/index.d.ts

@@ -214,12 +214,15 @@ import { RawCondition, Dict as Dict$1, UtilityConfig, PropertyConfig, TransformHelpers, RecipeConfig } from '@pandacss/types';

type StyleObject = Record<string, any>;
declare class Recipe {
private context;
config: RecipeConfig;
name: string;
values: Map<string, Set<{
className: string;
value: string;
}>>;
constructor(config: RecipeConfig, context: StylesheetContext);
walk: (styleObject: StyleObject) => StyleObject;
transform: (prop: string, value: string) => {
className: string;
styles: any;
};
private setValues;
private getClassName;
private walk;
private transform;
process: (options: ProcessOptions) => void;

@@ -226,0 +229,0 @@ toCss: () => string;

24

dist/index.js

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

const { name, base = {}, variants = {}, defaultVariants = {}, description = "" } = config;
this.name = name;
const recipe = {

@@ -772,4 +773,7 @@ name,

for (const [key, variant] of Object.entries(variants)) {
for (const [value, styles] of Object.entries(variant)) {
(0, import_lodash2.default)(recipe.variants, { [key]: { [value]: this.walk(styles) } });
for (const [variantKey, styles] of Object.entries(variant)) {
this.setValues(key, variantKey);
(0, import_lodash2.default)(recipe.variants, {
[key]: { [variantKey]: this.walk(styles) }
});
}

@@ -780,2 +784,15 @@ }

config;
name;
values = /* @__PURE__ */ new Map();
setValues = (key, value) => {
this.values.get(key) || this.values.set(key, /* @__PURE__ */ new Set());
this.values.get(key).add({
className: this.getClassName(key, value),
value
});
};
getClassName = (key, value) => {
const { separator } = this.context.utility;
return `${this.name}--${key}${separator}${value}`;
};
walk = (styleObject) => {

@@ -799,3 +816,2 @@ const { utility, conditions } = this.context;

transform = (prop, value) => {
const { separator } = this.context.utility;
const { name, base = {}, variants = {} } = this.config;

@@ -809,3 +825,3 @@ if (value === "__ignore__") {

return {
className: `${name}--${prop}${separator}${value}`,
className: this.getClassName(prop, value),
styles: variants[prop]?.[value] ?? {}

@@ -812,0 +828,0 @@ };

{
"name": "@pandacss/core",
"version": "0.0.0-dev-20221121175259",
"version": "0.0.0-dev-20221122153914",
"description": "core functions for extract-it",

@@ -26,11 +26,11 @@ "main": "dist/index.js",

"lodash.merge": "4.6.2",
"@pandacss/error": "0.0.0-dev-20221121175259",
"@pandacss/types": "0.0.0-dev-20221121175259",
"@pandacss/shared": "0.0.0-dev-20221121175259",
"@pandacss/logger": "0.0.0-dev-20221121175259",
"@pandacss/token-dictionary": "0.0.0-dev-20221121175259"
"@pandacss/error": "0.0.0-dev-20221122153914",
"@pandacss/types": "0.0.0-dev-20221122153914",
"@pandacss/shared": "0.0.0-dev-20221122153914",
"@pandacss/logger": "0.0.0-dev-20221122153914",
"@pandacss/token-dictionary": "0.0.0-dev-20221122153914"
},
"devDependencies": {
"@types/lodash.merge": "4.6.7",
"@pandacss/fixture": "0.0.0-dev-20221121175259"
"@pandacss/fixture": "0.0.0-dev-20221122153914"
},

@@ -37,0 +37,0 @@ "scripts": {

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