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-20221125142901 to 0.0.0-dev-20221125162640

1

dist/index.d.ts

@@ -182,2 +182,3 @@ import { RawCondition, Dict, UtilityConfig, PropertyConfig, TransformHelpers, CssKeyframes, RecipeConfig } from '@pandacss/types';

constructor(options: Options);
finalize: (paths: string[]) => string[];
shift: (paths: string[]) => string[];

@@ -184,0 +185,0 @@ has: (key: string) => boolean;

50

dist/index.js

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

var import_logger = require("@pandacss/logger");
var import_shared4 = require("@pandacss/shared");

@@ -509,2 +510,11 @@ // src/conditional-rule.ts

values;
finalize = (paths) => {
return paths.map((path) => {
if (this.has(path))
return path;
if (/&|@/.test(path))
return `[${(0, import_shared4.withoutSpace)(path.trim())}]`;
return path;
});
};
shift = (paths) => {

@@ -691,7 +701,7 @@ return paths.slice().sort((a, b) => {

// src/recipe.ts
var import_shared5 = require("@pandacss/shared");
var import_shared6 = require("@pandacss/shared");
var import_lodash2 = __toESM(require("lodash.merge"));
// src/atomic-rule.ts
var import_shared4 = require("@pandacss/shared");
var import_shared5 = require("@pandacss/shared");
var import_postcss8 = __toESM(require("postcss"));

@@ -706,3 +716,3 @@ var AtomicRule = class {

hash = (name) => {
return this.context.hash ? (0, import_shared4.esc)((0, import_shared4.toHash)(name)) : (0, import_shared4.esc)(name);
return this.context.hash ? (0, import_shared5.esc)((0, import_shared5.toHash)(name)) : (0, import_shared5.esc)(name);
};

@@ -714,19 +724,19 @@ get rule() {

const { scope, styles } = options;
const { utility } = this.context;
const styleObject = utility.hasShorthand ? (0, import_shared4.walkObject)(styles, (v) => v, {
const { utility, conditions: cond } = this.context;
const styleObject = utility.hasShorthand ? (0, import_shared5.walkObject)(styles, (v) => v, {
getKey: (prop) => utility.resolveShorthand(prop)
}) : styles;
const rule = this.rule;
(0, import_shared4.walkObject)(styleObject, (value, paths) => {
const important = (0, import_shared4.isImportant)(value);
(0, import_shared5.walkObject)(styleObject, (value, paths) => {
const important = (0, import_shared5.isImportant)(value);
if (value == null)
return;
const [prop, ...allConditions] = this.context.conditions.shift(paths);
const conditions = (0, import_shared4.filterBaseConditions)(allConditions);
const transformed = this.context.transform(prop, (0, import_shared4.withoutImportant)(value));
const [prop, ...allConditions] = cond.shift(paths);
const conditions = (0, import_shared5.filterBaseConditions)(allConditions);
const transformed = this.context.transform(prop, (0, import_shared5.withoutImportant)(value));
const cssRoot = toCss(transformed.styles, { important });
rule.nodes = cssRoot.root.nodes;
const baseArray = [...conditions, transformed.className];
const baseArray = [...cond.finalize(conditions), transformed.className];
if (scope && scope.length > 0) {
baseArray.unshift(`[${(0, import_shared4.withoutSpace)(scope.join("__"))}]`);
baseArray.unshift(`[${(0, import_shared5.withoutSpace)(scope.join("__"))}]`);
conditions.push(...scope);

@@ -804,3 +814,3 @@ }

const transformed = {};
(0, import_shared5.walkStyles)(styleObject, (styles, scopes) => {
(0, import_shared6.walkStyles)(styleObject, (styles, scopes) => {
const [selector] = scopes || [];

@@ -852,3 +862,3 @@ const result = {};

// src/stylesheet.ts
var import_shared6 = require("@pandacss/shared");
var import_shared7 = require("@pandacss/shared");
var import_postcss9 = __toESM(require("postcss"));

@@ -891,3 +901,3 @@ var Stylesheet = class {

const ruleset = new AtomicRule(this.context);
(0, import_shared6.walkStyles)(styleObject, (styles, scope) => {
(0, import_shared7.walkStyles)(styleObject, (styles, scope) => {
ruleset.process({ scope, styles });

@@ -923,3 +933,3 @@ });

// src/utility.ts
var import_shared7 = require("@pandacss/shared");
var import_shared8 = require("@pandacss/shared");
var Utility = class {

@@ -991,3 +1001,3 @@ tokens;

const { values } = config;
if ((0, import_shared7.isString)(values)) {
if ((0, import_shared8.isString)(values)) {
return this.tokens.getValue(values) ?? {};

@@ -1001,3 +1011,3 @@ }

}
if ((0, import_shared7.isFunction)(values)) {
if ((0, import_shared8.isFunction)(values)) {
return values(this.getToken.bind(this));

@@ -1136,5 +1146,5 @@ }

const key = this.resolveShorthand(prop);
return (0, import_shared7.compact)({
return (0, import_shared8.compact)({
layer: this.configs.get(key)?.layer,
className: this.getOrCreateClassName(key, (0, import_shared7.withoutSpace)(value)),
className: this.getOrCreateClassName(key, (0, import_shared8.withoutSpace)(value)),
styles: this.getOrCreateStyle(key, value)

@@ -1141,0 +1151,0 @@ });

{
"name": "@pandacss/core",
"version": "0.0.0-dev-20221125142901",
"version": "0.0.0-dev-20221125162640",
"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-20221125142901",
"@pandacss/types": "0.0.0-dev-20221125142901",
"@pandacss/shared": "0.0.0-dev-20221125142901",
"@pandacss/logger": "0.0.0-dev-20221125142901",
"@pandacss/token-dictionary": "0.0.0-dev-20221125142901"
"@pandacss/error": "0.0.0-dev-20221125162640",
"@pandacss/types": "0.0.0-dev-20221125162640",
"@pandacss/shared": "0.0.0-dev-20221125162640",
"@pandacss/logger": "0.0.0-dev-20221125162640",
"@pandacss/token-dictionary": "0.0.0-dev-20221125162640"
},
"devDependencies": {
"@types/lodash.merge": "4.6.7",
"@pandacss/fixture": "0.0.0-dev-20221125142901"
"@pandacss/fixture": "0.0.0-dev-20221125162640"
},

@@ -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