@pandacss/shared 0.0.0-dev-20221124174429 → 0.0.0-dev-20221125162640

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { W as WalkObjectStopFn } from './walk-styles-747d3c0e.js';
2
- export { M as MappedObject, d as WalkObjectOptions, W as WalkObjectStopFn, c as createCss, f as filterBaseConditions, i as isBaseCondition, a as isImportant, m as mapObject, t as toHash, e as walkObject, g as walkStyles, w as withoutImportant, b as withoutSpace } from './walk-styles-747d3c0e.js';
1
+ import { W as WalkObjectStopFn } from './walk-styles-622088f0.js';
2
+ export { M as MappedObject, d as WalkObjectOptions, W as WalkObjectStopFn, c as createCss, f as filterBaseConditions, i as isBaseCondition, a as isImportant, m as mapObject, t as toHash, e as walkObject, g as walkStyles, w as withoutImportant, b as withoutSpace } from './walk-styles-622088f0.js';
3
3
 
4
4
  declare const isString: (v: any) => v is string;
5
5
  type AnyFunction = (...args: any[]) => any;
package/dist/index.js CHANGED
@@ -176,7 +176,13 @@ function walkStyles(mixedStyles, fn, scopes = []) {
176
176
 
177
177
  // src/classname.ts
178
178
  function createCss(context) {
179
- const { transform, hash, conditions: conds = { shift: (v) => v }, resolveShorthand, hasShorthand } = context;
179
+ const {
180
+ transform,
181
+ hash,
182
+ conditions: conds = { shift: (v) => v, finalize: (v) => v },
183
+ resolveShorthand,
184
+ hasShorthand
185
+ } = context;
180
186
  return (styleObject) => {
181
187
  const normalizedObject = hasShorthand ? walkObject(styleObject, (v) => v, { getKey: resolveShorthand }) : styleObject;
182
188
  const classNames = /* @__PURE__ */ new Set();
@@ -192,7 +198,7 @@ function createCss(context) {
192
198
  if (important) {
193
199
  transformedClassName = `${transformedClassName}!`;
194
200
  }
195
- const baseArray = [...conditions, transformedClassName];
201
+ const baseArray = [...conds.finalize(conditions), transformedClassName];
196
202
  if (scope && scope.length > 0) {
197
203
  baseArray.unshift(`[${withoutSpace(scope.join("__"))}]`);
198
204
  }
package/dist/index.mjs CHANGED
@@ -119,7 +119,13 @@ function walkStyles(mixedStyles, fn, scopes = []) {
119
119
 
120
120
  // src/classname.ts
121
121
  function createCss(context) {
122
- const { transform, hash, conditions: conds = { shift: (v) => v }, resolveShorthand, hasShorthand } = context;
122
+ const {
123
+ transform,
124
+ hash,
125
+ conditions: conds = { shift: (v) => v, finalize: (v) => v },
126
+ resolveShorthand,
127
+ hasShorthand
128
+ } = context;
123
129
  return (styleObject) => {
124
130
  const normalizedObject = hasShorthand ? walkObject(styleObject, (v) => v, { getKey: resolveShorthand }) : styleObject;
125
131
  const classNames = /* @__PURE__ */ new Set();
@@ -135,7 +141,7 @@ function createCss(context) {
135
141
  if (important) {
136
142
  transformedClassName = `${transformedClassName}!`;
137
143
  }
138
- const baseArray = [...conditions, transformedClassName];
144
+ const baseArray = [...conds.finalize(conditions), transformedClassName];
139
145
  if (scope && scope.length > 0) {
140
146
  baseArray.unshift(`[${withoutSpace(scope.join("__"))}]`);
141
147
  }
package/dist/shared.d.ts CHANGED
@@ -1 +1 @@
1
- export { M as MappedObject, d as WalkObjectOptions, W as WalkObjectStopFn, c as createCss, f as filterBaseConditions, i as isBaseCondition, m as mapObject, t as toHash, e as walkObject, g as walkStyles, b as withoutSpace } from './walk-styles-747d3c0e.js';
1
+ export { M as MappedObject, d as WalkObjectOptions, W as WalkObjectStopFn, c as createCss, f as filterBaseConditions, i as isBaseCondition, m as mapObject, t as toHash, e as walkObject, g as walkStyles, b as withoutSpace } from './walk-styles-622088f0.js';
package/dist/shared.js CHANGED
@@ -126,7 +126,13 @@ function walkStyles(mixedStyles, fn, scopes = []) {
126
126
 
127
127
  // src/classname.ts
128
128
  function createCss(context) {
129
- const { transform, hash, conditions: conds = { shift: (v) => v }, resolveShorthand, hasShorthand } = context;
129
+ const {
130
+ transform,
131
+ hash,
132
+ conditions: conds = { shift: (v) => v, finalize: (v) => v },
133
+ resolveShorthand,
134
+ hasShorthand
135
+ } = context;
130
136
  return (styleObject) => {
131
137
  const normalizedObject = hasShorthand ? walkObject(styleObject, (v) => v, { getKey: resolveShorthand }) : styleObject;
132
138
  const classNames = /* @__PURE__ */ new Set();
@@ -142,7 +148,7 @@ function createCss(context) {
142
148
  if (important) {
143
149
  transformedClassName = `${transformedClassName}!`;
144
150
  }
145
- const baseArray = [...conditions, transformedClassName];
151
+ const baseArray = [...conds.finalize(conditions), transformedClassName];
146
152
  if (scope && scope.length > 0) {
147
153
  baseArray.unshift(`[${withoutSpace(scope.join("__"))}]`);
148
154
  }
package/dist/shared.mjs CHANGED
@@ -93,7 +93,13 @@ function walkStyles(mixedStyles, fn, scopes = []) {
93
93
 
94
94
  // src/classname.ts
95
95
  function createCss(context) {
96
- const { transform, hash, conditions: conds = { shift: (v) => v }, resolveShorthand, hasShorthand } = context;
96
+ const {
97
+ transform,
98
+ hash,
99
+ conditions: conds = { shift: (v) => v, finalize: (v) => v },
100
+ resolveShorthand,
101
+ hasShorthand
102
+ } = context;
97
103
  return (styleObject) => {
98
104
  const normalizedObject = hasShorthand ? walkObject(styleObject, (v) => v, { getKey: resolveShorthand }) : styleObject;
99
105
  const classNames = /* @__PURE__ */ new Set();
@@ -109,7 +115,7 @@ function createCss(context) {
109
115
  if (important) {
110
116
  transformedClassName = `${transformedClassName}!`;
111
117
  }
112
- const baseArray = [...conditions, transformedClassName];
118
+ const baseArray = [...conds.finalize(conditions), transformedClassName];
113
119
  if (scope && scope.length > 0) {
114
120
  baseArray.unshift(`[${withoutSpace(scope.join("__"))}]`);
115
121
  }
@@ -7,6 +7,7 @@ type Context = {
7
7
  hash?: boolean;
8
8
  conditions?: {
9
9
  shift: (paths: string[]) => string[];
10
+ finalize: (paths: string[]) => string[];
10
11
  };
11
12
  };
12
13
  declare function createCss(context: Context): (styleObject: Record<string, any>) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/shared",
3
- "version": "0.0.0-dev-20221124174429",
3
+ "version": "0.0.0-dev-20221125162640",
4
4
  "description": "Shared utilities for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",