@pandacss/node 0.0.0-dev-20230106195931 → 0.0.0-dev-20230106200853

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.
Files changed (3) hide show
  1. package/dist/index.js +80 -111
  2. package/dist/index.mjs +80 -111
  3. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -127,7 +127,7 @@ async function writeFileChunk(ctx, file) {
127
127
 
128
128
  // src/generators/index.ts
129
129
  var import_fs2 = require("fs");
130
- var import_outdent24 = __toESM(require("outdent"));
130
+ var import_outdent23 = __toESM(require("outdent"));
131
131
 
132
132
  // src/generators/conditions.ts
133
133
  var import_shared = require("@pandacss/shared");
@@ -298,23 +298,6 @@ function getEntrypoint(pkg, file) {
298
298
  return (0, import_path.join)((0, import_path.dirname)(entry), prod);
299
299
  }
300
300
 
301
- // src/generators/global-css.ts
302
- var import_outdent5 = require("outdent");
303
- function generateGlobalCss() {
304
- return {
305
- js: import_outdent5.outdent`
306
- export function globalCss(styles){
307
- void styles
308
- }
309
- `,
310
- dts: import_outdent5.outdent`
311
- import { GlobalStyleObject } from '../types'
312
-
313
- export declare function globalCss(styles: GlobalStyleObject): void
314
- `
315
- };
316
- }
317
-
318
301
  // src/generators/is-valid-prop.ts
319
302
  var import_fs = require("fs");
320
303
  function generateisValidProp(ctx) {
@@ -330,11 +313,11 @@ function generateisValidProp(ctx) {
330
313
  }
331
314
 
332
315
  // src/generators/jsx/preact-jsx.ts
333
- var import_outdent6 = require("outdent");
316
+ var import_outdent5 = require("outdent");
334
317
  function generatePreactJsxFactory(ctx) {
335
318
  const { name, componentName } = ctx.jsxFactoryDetails;
336
319
  return {
337
- js: import_outdent6.outdent`
320
+ js: import_outdent5.outdent`
338
321
  import { h } from 'preact'
339
322
  import { forwardRef } from 'preact/compat'
340
323
  import { useMemo } from 'preact/hooks'
@@ -403,10 +386,10 @@ function generatePreactJsxFactory(ctx) {
403
386
  }
404
387
 
405
388
  // src/generators/jsx/preact-layout-grid.ts
406
- var import_outdent7 = require("outdent");
389
+ var import_outdent6 = require("outdent");
407
390
  function generatePreactLayoutGrid() {
408
391
  return {
409
- dts: import_outdent7.outdent`
392
+ dts: import_outdent6.outdent`
410
393
  import { FunctionComponent } from 'preact'
411
394
 
412
395
  export type LayoutGridProps = {
@@ -418,7 +401,7 @@ function generatePreactLayoutGrid() {
418
401
 
419
402
  export declare const LayoutGrid: FunctionComponent<LayoutGridProps>
420
403
  `,
421
- js: import_outdent7.outdent`
404
+ js: import_outdent6.outdent`
422
405
  export function LayoutGrid(props) {
423
406
  const { count = 12, margin, gutter = '24px', maxWidth } = props
424
407
  const hasMaxWidth = maxWidth != null;
@@ -456,14 +439,14 @@ function generatePreactLayoutGrid() {
456
439
  }
457
440
 
458
441
  // src/generators/jsx/preact-pattern.ts
459
- var import_outdent8 = require("outdent");
442
+ var import_outdent7 = require("outdent");
460
443
  var import_ts_pattern = require("ts-pattern");
461
444
  function generate(ctx, name, pattern) {
462
445
  const { upperName, styleFn, dashName, jsxName, props } = ctx.getPatternDetails(name, pattern);
463
446
  const { componentName } = ctx.jsxFactoryDetails;
464
447
  return {
465
448
  name: dashName,
466
- js: import_outdent8.outdent`
449
+ js: import_outdent7.outdent`
467
450
  import { forwardRef } from 'preact/compat'
468
451
  import { ${ctx.jsxFactory} } from './factory'
469
452
  import { ${styleFn} } from '../patterns/${dashName}'
@@ -471,11 +454,11 @@ function generate(ctx, name, pattern) {
471
454
  export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
472
455
  ${(0, import_ts_pattern.match)(props.length).with(
473
456
  0,
474
- () => import_outdent8.outdent`
457
+ () => import_outdent7.outdent`
475
458
  return <${ctx.jsxFactory}.div ref={ref} {...props} />
476
459
  `
477
460
  ).otherwise(
478
- () => import_outdent8.outdent`
461
+ () => import_outdent7.outdent`
479
462
  const { ${props.join(", ")}, ...restProps } = props
480
463
  const styleProps = ${styleFn}({${props.join(", ")}})
481
464
  return <${ctx.jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
@@ -483,7 +466,7 @@ function generate(ctx, name, pattern) {
483
466
  )}
484
467
  })
485
468
  `,
486
- dts: import_outdent8.outdent`
469
+ dts: import_outdent7.outdent`
487
470
  import { ${upperName}Properties } from '../patterns/${dashName}'
488
471
  import { ${componentName} } from '../types/jsx'
489
472
 
@@ -497,15 +480,15 @@ function generatePreactJsxPattern(ctx) {
497
480
  }
498
481
 
499
482
  // src/generators/jsx/preact-types.ts
500
- var import_outdent9 = require("outdent");
483
+ var import_outdent8 = require("outdent");
501
484
  function generatePreactJsxTypes(ctx) {
502
485
  const { name, componentName, upperName, typeName } = ctx.jsxFactoryDetails;
503
486
  return {
504
- jsxFactory: import_outdent9.outdent`
487
+ jsxFactory: import_outdent8.outdent`
505
488
  import { ${upperName} } from '../types/jsx'
506
489
  export declare const ${name}: ${upperName}
507
490
  `,
508
- jsxType: import_outdent9.outdent`
491
+ jsxType: import_outdent8.outdent`
509
492
  import type { JSX, ElementType, ComponentProps } from 'preact'
510
493
  import type { JsxStyleProps, Assign } from '.'
511
494
 
@@ -549,11 +532,11 @@ export type ${typeName}<ComponentType extends ElementType> = Polyfill<ComponentP
549
532
  }
550
533
 
551
534
  // src/generators/jsx/react-jsx.ts
552
- var import_outdent10 = require("outdent");
535
+ var import_outdent9 = require("outdent");
553
536
  function generateReactJsxFactory(ctx) {
554
537
  const { name, componentName } = ctx.jsxFactoryDetails;
555
538
  return {
556
- js: import_outdent10.outdent`
539
+ js: import_outdent9.outdent`
557
540
  import { forwardRef, useMemo } from 'react'
558
541
  import { isCssProperty } from './is-valid-prop'
559
542
  import { css, cx } from '../css'
@@ -621,10 +604,10 @@ function generateReactJsxFactory(ctx) {
621
604
  }
622
605
 
623
606
  // src/generators/jsx/react-layout-grid.ts
624
- var import_outdent11 = require("outdent");
607
+ var import_outdent10 = require("outdent");
625
608
  function generateReactLayoutGrid() {
626
609
  return {
627
- dts: import_outdent11.outdent`
610
+ dts: import_outdent10.outdent`
628
611
  import type { FunctionComponent } from 'react'
629
612
 
630
613
  export type LayoutGridProps = {
@@ -636,7 +619,7 @@ function generateReactLayoutGrid() {
636
619
 
637
620
  export declare const LayoutGrid: FunctionComponent<LayoutGridProps>
638
621
  `,
639
- js: import_outdent11.outdent`
622
+ js: import_outdent10.outdent`
640
623
  export function LayoutGrid(props) {
641
624
  const { count = 12, margin, gutter = '24px', maxWidth } = props
642
625
  const hasMaxWidth = maxWidth != null;
@@ -674,14 +657,14 @@ function generateReactLayoutGrid() {
674
657
  }
675
658
 
676
659
  // src/generators/jsx/react-pattern.ts
677
- var import_outdent12 = require("outdent");
660
+ var import_outdent11 = require("outdent");
678
661
  var import_ts_pattern2 = require("ts-pattern");
679
662
  function generate2(ctx, name, pattern) {
680
663
  const { upperName, styleFn, dashName, jsxName, props } = ctx.getPatternDetails(name, pattern);
681
664
  const { componentName } = ctx.jsxFactoryDetails;
682
665
  return {
683
666
  name: dashName,
684
- js: import_outdent12.outdent`
667
+ js: import_outdent11.outdent`
685
668
  import { forwardRef } from 'react'
686
669
  import { ${ctx.jsxFactory} } from './factory'
687
670
  import { ${styleFn} } from '../patterns/${dashName}'
@@ -689,11 +672,11 @@ function generate2(ctx, name, pattern) {
689
672
  export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
690
673
  ${(0, import_ts_pattern2.match)(props.length).with(
691
674
  0,
692
- () => import_outdent12.outdent`
675
+ () => import_outdent11.outdent`
693
676
  return <${ctx.jsxFactory}.div ref={ref} {...props} />
694
677
  `
695
678
  ).otherwise(
696
- () => import_outdent12.outdent`
679
+ () => import_outdent11.outdent`
697
680
  const { ${props.join(", ")}, ...restProps } = props
698
681
  const styleProps = ${styleFn}({${props.join(", ")}})
699
682
  return <${ctx.jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
@@ -702,7 +685,7 @@ function generate2(ctx, name, pattern) {
702
685
 
703
686
  })
704
687
  `,
705
- dts: import_outdent12.outdent`
688
+ dts: import_outdent11.outdent`
706
689
  import { ${upperName}Properties } from '../patterns/${dashName}'
707
690
  import { ${componentName} } from '../types/jsx'
708
691
 
@@ -716,15 +699,15 @@ function generateReactJsxPattern(ctx) {
716
699
  }
717
700
 
718
701
  // src/generators/jsx/react-types.ts
719
- var import_outdent13 = require("outdent");
702
+ var import_outdent12 = require("outdent");
720
703
  function generateReactJsxTypes(ctx) {
721
704
  const { name, componentName, upperName, typeName } = ctx.jsxFactoryDetails;
722
705
  return {
723
- jsxFactory: import_outdent13.outdent`
706
+ jsxFactory: import_outdent12.outdent`
724
707
  import { ${upperName} } from '../types/jsx'
725
708
  export declare const ${name}: ${upperName}
726
709
  `,
727
- jsxType: import_outdent13.outdent`
710
+ jsxType: import_outdent12.outdent`
728
711
  import type { ElementType, ComponentProps } from 'react'
729
712
  import type { JsxStyleProps, Assign } from '.'
730
713
 
@@ -768,11 +751,11 @@ export type ${typeName}<ComponentType extends ElementType> = Polyfill<ComponentP
768
751
  }
769
752
 
770
753
  // src/generators/jsx/solid-jsx.ts
771
- var import_outdent14 = require("outdent");
754
+ var import_outdent13 = require("outdent");
772
755
  function generateSolidJsxFactory(ctx) {
773
756
  const { componentName, name } = ctx.jsxFactoryDetails;
774
757
  return {
775
- js: import_outdent14.outdent`
758
+ js: import_outdent13.outdent`
776
759
  import { Dynamic } from 'solid-js/web'
777
760
  import { mergeProps, splitProps } from 'solid-js'
778
761
  import { allCssProperties } from './is-valid-prop'
@@ -835,10 +818,10 @@ function generateSolidJsxFactory(ctx) {
835
818
  }
836
819
 
837
820
  // src/generators/jsx/solid-layout-grid.ts
838
- var import_outdent15 = require("outdent");
821
+ var import_outdent14 = require("outdent");
839
822
  function generateSolidLayoutGrid() {
840
823
  return {
841
- dts: import_outdent15.outdent`
824
+ dts: import_outdent14.outdent`
842
825
  import { ParentProps } from 'solid-js'
843
826
 
844
827
  export type LayoutGridProps = {
@@ -850,7 +833,7 @@ function generateSolidLayoutGrid() {
850
833
 
851
834
  export declare const LayoutGrid: ParentProps<LayoutGridProps>
852
835
  `,
853
- js: import_outdent15.outdent`
836
+ js: import_outdent14.outdent`
854
837
  export function LayoutGrid(props) {
855
838
  const { count = 12, margin, gutter = '24px', maxWidth } = props
856
839
  const hasMaxWidth = maxWidth != null;
@@ -888,14 +871,14 @@ function generateSolidLayoutGrid() {
888
871
  }
889
872
 
890
873
  // src/generators/jsx/solid-pattern.ts
891
- var import_outdent16 = require("outdent");
874
+ var import_outdent15 = require("outdent");
892
875
  var import_ts_pattern3 = require("ts-pattern");
893
876
  function generate3(ctx, name, pattern) {
894
877
  const { upperName, styleFn, dashName, jsxName, props } = ctx.getPatternDetails(name, pattern);
895
878
  const { componentName } = ctx.jsxFactoryDetails;
896
879
  return {
897
880
  name: dashName,
898
- js: import_outdent16.outdent`
881
+ js: import_outdent15.outdent`
899
882
  import { splitProps } from 'solid-js'
900
883
  import { ${ctx.jsxFactory} } from './factory'
901
884
  import { ${styleFn} } from '../patterns/${dashName}'
@@ -903,11 +886,11 @@ function generate3(ctx, name, pattern) {
903
886
  export function ${jsxName}(props) {
904
887
  ${(0, import_ts_pattern3.match)(props.length).with(
905
888
  0,
906
- () => import_outdent16.outdent`
889
+ () => import_outdent15.outdent`
907
890
  return <${ctx.jsxFactory}.div {...props} />
908
891
  `
909
892
  ).otherwise(
910
- () => import_outdent16.outdent`
893
+ () => import_outdent15.outdent`
911
894
  const [patternProps, restProps] = splitProps(props, [${props.map((v) => JSON.stringify(v)).join(", ")}]);
912
895
  const styleProps = ${styleFn}(patternProps)
913
896
  return <${ctx.jsxFactory}.div {...styleProps} {...restProps} />
@@ -915,7 +898,7 @@ function generate3(ctx, name, pattern) {
915
898
  )}
916
899
  }
917
900
  `,
918
- dts: import_outdent16.outdent`
901
+ dts: import_outdent15.outdent`
919
902
  import { ${upperName}Properties } from '../patterns/${dashName}'
920
903
  import { ${componentName} } from '../types/jsx'
921
904
 
@@ -929,15 +912,15 @@ function generateSolidJsxPattern(ctx) {
929
912
  }
930
913
 
931
914
  // src/generators/jsx/solid-types.ts
932
- var import_outdent17 = require("outdent");
915
+ var import_outdent16 = require("outdent");
933
916
  function generateSolidJsxTypes(ctx) {
934
917
  const { name, componentName, upperName, typeName } = ctx.jsxFactoryDetails;
935
918
  return {
936
- jsxFactory: import_outdent17.outdent`
919
+ jsxFactory: import_outdent16.outdent`
937
920
  import { ${upperName} } from '../types/jsx'
938
921
  export declare const ${name}: ${upperName}
939
922
  `,
940
- jsxType: import_outdent17.outdent`
923
+ jsxType: import_outdent16.outdent`
941
924
  import type { JSX, ComponentProps, Component } from 'solid-js'
942
925
  import type { JsxStyleProps, Assign } from '.'
943
926
 
@@ -1023,7 +1006,7 @@ function generateLayoutGrid(ctx) {
1023
1006
 
1024
1007
  // src/generators/pattern.ts
1025
1008
  var import_shared2 = require("@pandacss/shared");
1026
- var import_outdent18 = require("outdent");
1009
+ var import_outdent17 = require("outdent");
1027
1010
  var import_telejson = require("telejson");
1028
1011
  var import_ts_pattern4 = require("ts-pattern");
1029
1012
  function generate4(name, pattern) {
@@ -1032,7 +1015,7 @@ function generate4(name, pattern) {
1032
1015
  const upperFn = `get${upperName}Style`;
1033
1016
  return {
1034
1017
  name: (0, import_shared2.dashCase)(name),
1035
- dts: import_outdent18.outdent`
1018
+ dts: import_outdent17.outdent`
1036
1019
  import { SystemStyleObject, ConditionalValue } from "../types"
1037
1020
  import { Properties } from "../types/csstype"
1038
1021
  import { Tokens } from "../types/token"
@@ -1055,14 +1038,14 @@ function generate4(name, pattern) {
1055
1038
  }).join("\n ")}
1056
1039
  }
1057
1040
 
1058
- ${strict ? import_outdent18.outdent`export declare function ${name}(options: ${upperName}Properties): string` : import_outdent18.outdent`
1041
+ ${strict ? import_outdent17.outdent`export declare function ${name}(options: ${upperName}Properties): string` : import_outdent17.outdent`
1059
1042
 
1060
1043
  ${description ? `/** ${description} */` : ""}
1061
1044
  export declare function ${name}(options: SystemStyleObject<${upperName}Properties>): string
1062
1045
  `}
1063
1046
 
1064
1047
  `,
1065
- js: import_outdent18.outdent`
1048
+ js: import_outdent17.outdent`
1066
1049
  import { mapObject } from "../helpers"
1067
1050
  import { css } from "../css"
1068
1051
 
@@ -1081,10 +1064,10 @@ function generatePattern(ctx) {
1081
1064
  }
1082
1065
 
1083
1066
  // src/generators/prop-types.ts
1084
- var import_outdent19 = require("outdent");
1067
+ var import_outdent18 = require("outdent");
1085
1068
  function generatePropTypes(utility) {
1086
1069
  const result = [
1087
- import_outdent19.outdent`
1070
+ import_outdent18.outdent`
1088
1071
  import { Properties as CSSProperties } from './csstype'
1089
1072
  import { Tokens } from './token'
1090
1073
 
@@ -1113,14 +1096,14 @@ function generatePropTypes(utility) {
1113
1096
 
1114
1097
  // src/generators/recipe.ts
1115
1098
  var import_shared3 = require("@pandacss/shared");
1116
- var import_outdent20 = require("outdent");
1099
+ var import_outdent19 = require("outdent");
1117
1100
  function generateRecipes(ctx) {
1118
1101
  const { recipes = {}, hash, hasRecipes, utility } = ctx;
1119
1102
  const { separator } = utility;
1120
1103
  if (!hasRecipes)
1121
1104
  return;
1122
1105
  const js = [
1123
- import_outdent20.outdent`
1106
+ import_outdent19.outdent`
1124
1107
  import { createCss, withoutSpace, compact } from "../helpers"
1125
1108
 
1126
1109
  const createRecipe = (name, defaultVariants) => {
@@ -1155,10 +1138,10 @@ function generateRecipes(ctx) {
1155
1138
  const dts = [""];
1156
1139
  Object.values(recipes).forEach((recipe) => {
1157
1140
  const { name, description, defaultVariants, variants } = recipe;
1158
- js.push(import_outdent20.outdent`
1141
+ js.push(import_outdent19.outdent`
1159
1142
  export const ${name} = createRecipe('${name}', ${JSON.stringify(defaultVariants ?? {})})
1160
1143
  `);
1161
- dts.push(import_outdent20.outdent`
1144
+ dts.push(import_outdent19.outdent`
1162
1145
  import { ConditionalValue } from "../types"
1163
1146
 
1164
1147
  export type ${(0, import_shared3.capitalize)(name)}Variants = {
@@ -1174,8 +1157,8 @@ function generateRecipes(ctx) {
1174
1157
  `);
1175
1158
  });
1176
1159
  return {
1177
- js: import_outdent20.outdent.string(js.join("\n\n")),
1178
- dts: import_outdent20.outdent.string(dts.join("\n\n"))
1160
+ js: import_outdent19.outdent.string(js.join("\n\n")),
1161
+ dts: import_outdent19.outdent.string(dts.join("\n\n"))
1179
1162
  };
1180
1163
  }
1181
1164
 
@@ -1354,7 +1337,7 @@ function cleanupSelectors(css2, varSelector) {
1354
1337
 
1355
1338
  // src/generators/token-dts.ts
1356
1339
  var import_shared4 = require("@pandacss/shared");
1357
- var import_outdent21 = require("outdent");
1340
+ var import_outdent20 = require("outdent");
1358
1341
  var import_pluralize = __toESM(require("pluralize"));
1359
1342
  function generateTokenDts(dict) {
1360
1343
  const set = /* @__PURE__ */ new Set();
@@ -1372,11 +1355,11 @@ function generateTokenDts(dict) {
1372
1355
  }
1373
1356
  result.add("} & { [token: string]: never }");
1374
1357
  set.add(Array.from(result).join("\n"));
1375
- return import_outdent21.outdent.string(Array.from(set).join("\n\n"));
1358
+ return import_outdent20.outdent.string(Array.from(set).join("\n\n"));
1376
1359
  }
1377
1360
 
1378
1361
  // src/generators/token-js.ts
1379
- var import_outdent22 = __toESM(require("outdent"));
1362
+ var import_outdent21 = __toESM(require("outdent"));
1380
1363
  function generateTokenJs(dict) {
1381
1364
  const map = /* @__PURE__ */ new Map();
1382
1365
  dict.allTokens.forEach((token) => {
@@ -1386,7 +1369,7 @@ function generateTokenJs(dict) {
1386
1369
  });
1387
1370
  const obj = Object.fromEntries(map);
1388
1371
  return {
1389
- js: import_outdent22.default`
1372
+ js: import_outdent21.default`
1390
1373
  const tokens = ${JSON.stringify(obj, null, 2)}
1391
1374
 
1392
1375
  export function getToken(path) {
@@ -1399,7 +1382,7 @@ function generateTokenJs(dict) {
1399
1382
  return variable
1400
1383
  }
1401
1384
  `,
1402
- dts: import_outdent22.default`
1385
+ dts: import_outdent21.default`
1403
1386
  import { Token } from "../types/token"
1404
1387
  export declare function getToken(path: Token): string
1405
1388
  export declare function getTokenVar(path: Token): string
@@ -1409,7 +1392,7 @@ function generateTokenJs(dict) {
1409
1392
 
1410
1393
  // src/generators/types.ts
1411
1394
  var import_fs_extra = require("fs-extra");
1412
- var import_outdent23 = __toESM(require("outdent"));
1395
+ var import_outdent22 = __toESM(require("outdent"));
1413
1396
  function getType(file) {
1414
1397
  const filepath = getEntrypoint("@pandacss/types", { dev: file });
1415
1398
  return (0, import_fs_extra.readFileSync)(filepath, "utf8");
@@ -1420,7 +1403,7 @@ function generateCssType(ctx) {
1420
1403
  return {
1421
1404
  cssType: getType("csstype.d.ts"),
1422
1405
  pandaCssType: getType("system-types.d.ts"),
1423
- publicType: import_outdent23.default`
1406
+ publicType: import_outdent22.default`
1424
1407
  import * as System from './system-types'
1425
1408
  import { PropTypes } from './prop-type'
1426
1409
  import { Conditions } from './conditions'
@@ -1471,16 +1454,6 @@ function setupDesignTokens(ctx) {
1471
1454
  ]
1472
1455
  };
1473
1456
  }
1474
- function setupGlobalCss(ctx) {
1475
- const code = generateGlobalCss();
1476
- return {
1477
- dir: ctx.paths.css,
1478
- files: [
1479
- { file: "global-css.mjs", code: code.js },
1480
- { file: "global-css.d.ts", code: code.dts }
1481
- ]
1482
- };
1483
- }
1484
1457
  function setupTypes(ctx) {
1485
1458
  const code = generateCssType(ctx);
1486
1459
  const conditions = generateConditions(ctx);
@@ -1548,7 +1521,7 @@ function setupPatterns(ctx) {
1548
1521
  if (!files) {
1549
1522
  return { files: [] };
1550
1523
  }
1551
- const indexCode = import_outdent24.default.string(files.map((file) => `export * from './${file.name}'`).join("\n"));
1524
+ const indexCode = import_outdent23.default.string(files.map((file) => `export * from './${file.name}'`).join("\n"));
1552
1525
  return {
1553
1526
  dir: ctx.paths.pattern,
1554
1527
  files: [
@@ -1567,10 +1540,10 @@ function setupJsx(ctx) {
1567
1540
  const factory = generateJsxFactory(ctx);
1568
1541
  const patterns = generateJsxPatterns(ctx);
1569
1542
  const layoutGrid = generateLayoutGrid(ctx);
1570
- const indexCode = import_outdent24.default`
1543
+ const indexCode = import_outdent23.default`
1571
1544
  export * from './factory'
1572
1545
  export * from './layout-grid'
1573
- ${import_outdent24.default.string(patterns.map((file) => `export * from './${file.name}'`).join("\n"))}
1546
+ ${import_outdent23.default.string(patterns.map((file) => `export * from './${file.name}'`).join("\n"))}
1574
1547
  `;
1575
1548
  return {
1576
1549
  dir: ctx.paths.jsx,
@@ -1584,7 +1557,7 @@ function setupJsx(ctx) {
1584
1557
  { file: "factory.jsx", code: factory.js },
1585
1558
  {
1586
1559
  file: "index.d.ts",
1587
- code: import_outdent24.default`
1560
+ code: import_outdent23.default`
1588
1561
  ${indexCode}
1589
1562
  export type { ${ctx.jsxFactoryDetails.typeName} } from '../types/jsx'
1590
1563
  `
@@ -1594,7 +1567,7 @@ function setupJsx(ctx) {
1594
1567
  };
1595
1568
  }
1596
1569
  function setupCssIndex(ctx) {
1597
- const code = import_outdent24.default`
1570
+ const code = import_outdent23.default`
1598
1571
  export * from './css'
1599
1572
  export * from './cx'
1600
1573
  export * from './global-css'
@@ -1623,7 +1596,6 @@ function generateSystem(ctx) {
1623
1596
  setupCssMap(ctx),
1624
1597
  setupCx(ctx),
1625
1598
  setupCss(ctx),
1626
- setupGlobalCss(ctx),
1627
1599
  setupRecipes(ctx),
1628
1600
  setupPatterns(ctx),
1629
1601
  setupCssIndex(ctx),
@@ -1634,30 +1606,30 @@ function generateSystem(ctx) {
1634
1606
 
1635
1607
  // src/messages.ts
1636
1608
  var import_logger3 = require("@pandacss/logger");
1637
- var import_outdent25 = require("outdent");
1609
+ var import_outdent24 = require("outdent");
1638
1610
  var tick = import_logger3.colors.green().bold("\u2714\uFE0F");
1639
1611
  function artifactsGeneratedMessage(ctx) {
1640
1612
  return [
1641
- import_outdent25.outdent`
1613
+ import_outdent24.outdent`
1642
1614
  ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/css")}: the css function to author styles
1643
1615
  `,
1644
- ctx.hasTokens && import_outdent25.outdent`
1616
+ ctx.hasTokens && import_outdent24.outdent`
1645
1617
  ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/tokens")}: the css variables and js function to query your tokens
1646
1618
  `,
1647
- ctx.hasPatterns && import_outdent25.outdent`
1619
+ ctx.hasPatterns && import_outdent24.outdent`
1648
1620
  ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/patterns")}: functions to implement common css patterns
1649
1621
  `,
1650
- ctx.hasRecipes && import_outdent25.outdent`
1622
+ ctx.hasRecipes && import_outdent24.outdent`
1651
1623
  ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/recipes")}: functions to create multi-variant styles
1652
1624
  `,
1653
- ctx.jsxFramework && import_outdent25.outdent`
1625
+ ctx.jsxFramework && import_outdent24.outdent`
1654
1626
  ${tick} ${(0, import_logger3.quote)(ctx.outdir, "/jsx")}: style prop powered elements for ${ctx.jsxFramework}
1655
1627
  `,
1656
1628
  "\n"
1657
1629
  ].filter(Boolean).join("\n");
1658
1630
  }
1659
1631
  function configExistsMessage(cmd) {
1660
- return import_outdent25.outdent`
1632
+ return import_outdent24.outdent`
1661
1633
  \n
1662
1634
  It looks like you already have panda created\`.
1663
1635
 
@@ -1666,7 +1638,7 @@ function configExistsMessage(cmd) {
1666
1638
  `;
1667
1639
  }
1668
1640
  function thankYouMessage() {
1669
- return import_outdent25.outdent`
1641
+ return import_outdent24.outdent`
1670
1642
 
1671
1643
  🚀 Thanks for choosing ${import_logger3.colors.cyan("Panda")} to write your css.
1672
1644
 
@@ -1678,7 +1650,7 @@ var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
1678
1650
  var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
1679
1651
  function scaffoldCompleteMessage() {
1680
1652
  return import_logger3.logger.box(
1681
- import_outdent25.outdent`
1653
+ import_outdent24.outdent`
1682
1654
 
1683
1655
  ${import_logger3.colors.bold().cyan("Next steps:")}
1684
1656
 
@@ -1694,12 +1666,12 @@ function scaffoldCompleteMessage() {
1694
1666
  );
1695
1667
  }
1696
1668
  function watchMessage() {
1697
- return import_outdent25.outdent`
1669
+ return import_outdent24.outdent`
1698
1670
  Watching for file changes...
1699
1671
  `;
1700
1672
  }
1701
1673
  function buildCompleteMessage(ctx) {
1702
- return import_outdent25.outdent`
1674
+ return import_outdent24.outdent`
1703
1675
  Successfully extracted css from ${ctx.files.length} file(s) ✨
1704
1676
  `;
1705
1677
  }
@@ -2057,9 +2029,6 @@ function createContext(conf, io = fileSystem) {
2057
2029
  }
2058
2030
  function getCss(collector, file) {
2059
2031
  const sheet = new import_core3.Stylesheet(context());
2060
- collector.globalCss.forEach((result) => {
2061
- sheet.processGlobalCss(result.data);
2062
- });
2063
2032
  collector.css.forEach((result) => {
2064
2033
  sheet.processAtomic(result.data);
2065
2034
  });
@@ -2440,9 +2409,9 @@ async function generate5(config, configPath) {
2440
2409
  // src/git-ignore.ts
2441
2410
  var import_fs5 = require("fs");
2442
2411
  var import_look_it_up2 = require("look-it-up");
2443
- var import_outdent26 = __toESM(require("outdent"));
2412
+ var import_outdent25 = __toESM(require("outdent"));
2444
2413
  function setupGitIgnore(ctx) {
2445
- const txt = import_outdent26.default`## CSS Panda
2414
+ const txt = import_outdent25.default`## CSS Panda
2446
2415
  ${ctx.outdir}
2447
2416
  ${ctx.outdir}-static
2448
2417
  `;
@@ -2460,7 +2429,7 @@ function setupGitIgnore(ctx) {
2460
2429
  var import_logger9 = require("@pandacss/logger");
2461
2430
  var import_fs_extra4 = require("fs-extra");
2462
2431
  var import_look_it_up3 = require("look-it-up");
2463
- var import_outdent27 = require("outdent");
2432
+ var import_outdent26 = require("outdent");
2464
2433
  var import_path6 = require("path");
2465
2434
  var import_preferred_pm2 = __toESM(require("preferred-pm"));
2466
2435
  async function setupConfig(cwd, { force }) {
@@ -2474,7 +2443,7 @@ async function setupConfig(cwd, { force }) {
2474
2443
  if (!force && configFile) {
2475
2444
  import_logger9.logger.warn("config exists", configExistsMessage(cmd));
2476
2445
  } else {
2477
- const content = import_outdent27.outdent`
2446
+ const content = import_outdent26.outdent`
2478
2447
  import { defineConfig } from "css-panda"
2479
2448
 
2480
2449
  export default defineConfig({
@@ -2500,7 +2469,7 @@ async function setupConfig(cwd, { force }) {
2500
2469
  }
2501
2470
  async function setupPostcss(cwd) {
2502
2471
  import_logger9.logger.info({ type: "init", msg: `creating postcss config file: ${(0, import_logger9.quote)("postcss.config.cjs")}` });
2503
- const content = import_outdent27.outdent`
2472
+ const content = import_outdent26.outdent`
2504
2473
  module.exports = {
2505
2474
  plugins: {
2506
2475
  'css-panda/postcss': {},
package/dist/index.mjs CHANGED
@@ -81,7 +81,7 @@ async function writeFileChunk(ctx, file) {
81
81
 
82
82
  // src/generators/index.ts
83
83
  import { readFileSync as readFileSync3 } from "fs";
84
- import outdent24 from "outdent";
84
+ import outdent23 from "outdent";
85
85
 
86
86
  // src/generators/conditions.ts
87
87
  import { unionType } from "@pandacss/shared";
@@ -252,23 +252,6 @@ function getEntrypoint(pkg, file) {
252
252
  return join(dirname(entry), prod);
253
253
  }
254
254
 
255
- // src/generators/global-css.ts
256
- import { outdent as outdent5 } from "outdent";
257
- function generateGlobalCss() {
258
- return {
259
- js: outdent5`
260
- export function globalCss(styles){
261
- void styles
262
- }
263
- `,
264
- dts: outdent5`
265
- import { GlobalStyleObject } from '../types'
266
-
267
- export declare function globalCss(styles: GlobalStyleObject): void
268
- `
269
- };
270
- }
271
-
272
255
  // src/generators/is-valid-prop.ts
273
256
  import { readFileSync } from "fs";
274
257
  function generateisValidProp(ctx) {
@@ -284,11 +267,11 @@ function generateisValidProp(ctx) {
284
267
  }
285
268
 
286
269
  // src/generators/jsx/preact-jsx.ts
287
- import { outdent as outdent6 } from "outdent";
270
+ import { outdent as outdent5 } from "outdent";
288
271
  function generatePreactJsxFactory(ctx) {
289
272
  const { name, componentName } = ctx.jsxFactoryDetails;
290
273
  return {
291
- js: outdent6`
274
+ js: outdent5`
292
275
  import { h } from 'preact'
293
276
  import { forwardRef } from 'preact/compat'
294
277
  import { useMemo } from 'preact/hooks'
@@ -357,10 +340,10 @@ function generatePreactJsxFactory(ctx) {
357
340
  }
358
341
 
359
342
  // src/generators/jsx/preact-layout-grid.ts
360
- import { outdent as outdent7 } from "outdent";
343
+ import { outdent as outdent6 } from "outdent";
361
344
  function generatePreactLayoutGrid() {
362
345
  return {
363
- dts: outdent7`
346
+ dts: outdent6`
364
347
  import { FunctionComponent } from 'preact'
365
348
 
366
349
  export type LayoutGridProps = {
@@ -372,7 +355,7 @@ function generatePreactLayoutGrid() {
372
355
 
373
356
  export declare const LayoutGrid: FunctionComponent<LayoutGridProps>
374
357
  `,
375
- js: outdent7`
358
+ js: outdent6`
376
359
  export function LayoutGrid(props) {
377
360
  const { count = 12, margin, gutter = '24px', maxWidth } = props
378
361
  const hasMaxWidth = maxWidth != null;
@@ -410,14 +393,14 @@ function generatePreactLayoutGrid() {
410
393
  }
411
394
 
412
395
  // src/generators/jsx/preact-pattern.ts
413
- import { outdent as outdent8 } from "outdent";
396
+ import { outdent as outdent7 } from "outdent";
414
397
  import { match } from "ts-pattern";
415
398
  function generate(ctx, name, pattern) {
416
399
  const { upperName, styleFn, dashName, jsxName, props } = ctx.getPatternDetails(name, pattern);
417
400
  const { componentName } = ctx.jsxFactoryDetails;
418
401
  return {
419
402
  name: dashName,
420
- js: outdent8`
403
+ js: outdent7`
421
404
  import { forwardRef } from 'preact/compat'
422
405
  import { ${ctx.jsxFactory} } from './factory'
423
406
  import { ${styleFn} } from '../patterns/${dashName}'
@@ -425,11 +408,11 @@ function generate(ctx, name, pattern) {
425
408
  export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
426
409
  ${match(props.length).with(
427
410
  0,
428
- () => outdent8`
411
+ () => outdent7`
429
412
  return <${ctx.jsxFactory}.div ref={ref} {...props} />
430
413
  `
431
414
  ).otherwise(
432
- () => outdent8`
415
+ () => outdent7`
433
416
  const { ${props.join(", ")}, ...restProps } = props
434
417
  const styleProps = ${styleFn}({${props.join(", ")}})
435
418
  return <${ctx.jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
@@ -437,7 +420,7 @@ function generate(ctx, name, pattern) {
437
420
  )}
438
421
  })
439
422
  `,
440
- dts: outdent8`
423
+ dts: outdent7`
441
424
  import { ${upperName}Properties } from '../patterns/${dashName}'
442
425
  import { ${componentName} } from '../types/jsx'
443
426
 
@@ -451,15 +434,15 @@ function generatePreactJsxPattern(ctx) {
451
434
  }
452
435
 
453
436
  // src/generators/jsx/preact-types.ts
454
- import { outdent as outdent9 } from "outdent";
437
+ import { outdent as outdent8 } from "outdent";
455
438
  function generatePreactJsxTypes(ctx) {
456
439
  const { name, componentName, upperName, typeName } = ctx.jsxFactoryDetails;
457
440
  return {
458
- jsxFactory: outdent9`
441
+ jsxFactory: outdent8`
459
442
  import { ${upperName} } from '../types/jsx'
460
443
  export declare const ${name}: ${upperName}
461
444
  `,
462
- jsxType: outdent9`
445
+ jsxType: outdent8`
463
446
  import type { JSX, ElementType, ComponentProps } from 'preact'
464
447
  import type { JsxStyleProps, Assign } from '.'
465
448
 
@@ -503,11 +486,11 @@ export type ${typeName}<ComponentType extends ElementType> = Polyfill<ComponentP
503
486
  }
504
487
 
505
488
  // src/generators/jsx/react-jsx.ts
506
- import { outdent as outdent10 } from "outdent";
489
+ import { outdent as outdent9 } from "outdent";
507
490
  function generateReactJsxFactory(ctx) {
508
491
  const { name, componentName } = ctx.jsxFactoryDetails;
509
492
  return {
510
- js: outdent10`
493
+ js: outdent9`
511
494
  import { forwardRef, useMemo } from 'react'
512
495
  import { isCssProperty } from './is-valid-prop'
513
496
  import { css, cx } from '../css'
@@ -575,10 +558,10 @@ function generateReactJsxFactory(ctx) {
575
558
  }
576
559
 
577
560
  // src/generators/jsx/react-layout-grid.ts
578
- import { outdent as outdent11 } from "outdent";
561
+ import { outdent as outdent10 } from "outdent";
579
562
  function generateReactLayoutGrid() {
580
563
  return {
581
- dts: outdent11`
564
+ dts: outdent10`
582
565
  import type { FunctionComponent } from 'react'
583
566
 
584
567
  export type LayoutGridProps = {
@@ -590,7 +573,7 @@ function generateReactLayoutGrid() {
590
573
 
591
574
  export declare const LayoutGrid: FunctionComponent<LayoutGridProps>
592
575
  `,
593
- js: outdent11`
576
+ js: outdent10`
594
577
  export function LayoutGrid(props) {
595
578
  const { count = 12, margin, gutter = '24px', maxWidth } = props
596
579
  const hasMaxWidth = maxWidth != null;
@@ -628,14 +611,14 @@ function generateReactLayoutGrid() {
628
611
  }
629
612
 
630
613
  // src/generators/jsx/react-pattern.ts
631
- import { outdent as outdent12 } from "outdent";
614
+ import { outdent as outdent11 } from "outdent";
632
615
  import { match as match2 } from "ts-pattern";
633
616
  function generate2(ctx, name, pattern) {
634
617
  const { upperName, styleFn, dashName, jsxName, props } = ctx.getPatternDetails(name, pattern);
635
618
  const { componentName } = ctx.jsxFactoryDetails;
636
619
  return {
637
620
  name: dashName,
638
- js: outdent12`
621
+ js: outdent11`
639
622
  import { forwardRef } from 'react'
640
623
  import { ${ctx.jsxFactory} } from './factory'
641
624
  import { ${styleFn} } from '../patterns/${dashName}'
@@ -643,11 +626,11 @@ function generate2(ctx, name, pattern) {
643
626
  export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
644
627
  ${match2(props.length).with(
645
628
  0,
646
- () => outdent12`
629
+ () => outdent11`
647
630
  return <${ctx.jsxFactory}.div ref={ref} {...props} />
648
631
  `
649
632
  ).otherwise(
650
- () => outdent12`
633
+ () => outdent11`
651
634
  const { ${props.join(", ")}, ...restProps } = props
652
635
  const styleProps = ${styleFn}({${props.join(", ")}})
653
636
  return <${ctx.jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
@@ -656,7 +639,7 @@ function generate2(ctx, name, pattern) {
656
639
 
657
640
  })
658
641
  `,
659
- dts: outdent12`
642
+ dts: outdent11`
660
643
  import { ${upperName}Properties } from '../patterns/${dashName}'
661
644
  import { ${componentName} } from '../types/jsx'
662
645
 
@@ -670,15 +653,15 @@ function generateReactJsxPattern(ctx) {
670
653
  }
671
654
 
672
655
  // src/generators/jsx/react-types.ts
673
- import { outdent as outdent13 } from "outdent";
656
+ import { outdent as outdent12 } from "outdent";
674
657
  function generateReactJsxTypes(ctx) {
675
658
  const { name, componentName, upperName, typeName } = ctx.jsxFactoryDetails;
676
659
  return {
677
- jsxFactory: outdent13`
660
+ jsxFactory: outdent12`
678
661
  import { ${upperName} } from '../types/jsx'
679
662
  export declare const ${name}: ${upperName}
680
663
  `,
681
- jsxType: outdent13`
664
+ jsxType: outdent12`
682
665
  import type { ElementType, ComponentProps } from 'react'
683
666
  import type { JsxStyleProps, Assign } from '.'
684
667
 
@@ -722,11 +705,11 @@ export type ${typeName}<ComponentType extends ElementType> = Polyfill<ComponentP
722
705
  }
723
706
 
724
707
  // src/generators/jsx/solid-jsx.ts
725
- import { outdent as outdent14 } from "outdent";
708
+ import { outdent as outdent13 } from "outdent";
726
709
  function generateSolidJsxFactory(ctx) {
727
710
  const { componentName, name } = ctx.jsxFactoryDetails;
728
711
  return {
729
- js: outdent14`
712
+ js: outdent13`
730
713
  import { Dynamic } from 'solid-js/web'
731
714
  import { mergeProps, splitProps } from 'solid-js'
732
715
  import { allCssProperties } from './is-valid-prop'
@@ -789,10 +772,10 @@ function generateSolidJsxFactory(ctx) {
789
772
  }
790
773
 
791
774
  // src/generators/jsx/solid-layout-grid.ts
792
- import { outdent as outdent15 } from "outdent";
775
+ import { outdent as outdent14 } from "outdent";
793
776
  function generateSolidLayoutGrid() {
794
777
  return {
795
- dts: outdent15`
778
+ dts: outdent14`
796
779
  import { ParentProps } from 'solid-js'
797
780
 
798
781
  export type LayoutGridProps = {
@@ -804,7 +787,7 @@ function generateSolidLayoutGrid() {
804
787
 
805
788
  export declare const LayoutGrid: ParentProps<LayoutGridProps>
806
789
  `,
807
- js: outdent15`
790
+ js: outdent14`
808
791
  export function LayoutGrid(props) {
809
792
  const { count = 12, margin, gutter = '24px', maxWidth } = props
810
793
  const hasMaxWidth = maxWidth != null;
@@ -842,14 +825,14 @@ function generateSolidLayoutGrid() {
842
825
  }
843
826
 
844
827
  // src/generators/jsx/solid-pattern.ts
845
- import { outdent as outdent16 } from "outdent";
828
+ import { outdent as outdent15 } from "outdent";
846
829
  import { match as match3 } from "ts-pattern";
847
830
  function generate3(ctx, name, pattern) {
848
831
  const { upperName, styleFn, dashName, jsxName, props } = ctx.getPatternDetails(name, pattern);
849
832
  const { componentName } = ctx.jsxFactoryDetails;
850
833
  return {
851
834
  name: dashName,
852
- js: outdent16`
835
+ js: outdent15`
853
836
  import { splitProps } from 'solid-js'
854
837
  import { ${ctx.jsxFactory} } from './factory'
855
838
  import { ${styleFn} } from '../patterns/${dashName}'
@@ -857,11 +840,11 @@ function generate3(ctx, name, pattern) {
857
840
  export function ${jsxName}(props) {
858
841
  ${match3(props.length).with(
859
842
  0,
860
- () => outdent16`
843
+ () => outdent15`
861
844
  return <${ctx.jsxFactory}.div {...props} />
862
845
  `
863
846
  ).otherwise(
864
- () => outdent16`
847
+ () => outdent15`
865
848
  const [patternProps, restProps] = splitProps(props, [${props.map((v) => JSON.stringify(v)).join(", ")}]);
866
849
  const styleProps = ${styleFn}(patternProps)
867
850
  return <${ctx.jsxFactory}.div {...styleProps} {...restProps} />
@@ -869,7 +852,7 @@ function generate3(ctx, name, pattern) {
869
852
  )}
870
853
  }
871
854
  `,
872
- dts: outdent16`
855
+ dts: outdent15`
873
856
  import { ${upperName}Properties } from '../patterns/${dashName}'
874
857
  import { ${componentName} } from '../types/jsx'
875
858
 
@@ -883,15 +866,15 @@ function generateSolidJsxPattern(ctx) {
883
866
  }
884
867
 
885
868
  // src/generators/jsx/solid-types.ts
886
- import { outdent as outdent17 } from "outdent";
869
+ import { outdent as outdent16 } from "outdent";
887
870
  function generateSolidJsxTypes(ctx) {
888
871
  const { name, componentName, upperName, typeName } = ctx.jsxFactoryDetails;
889
872
  return {
890
- jsxFactory: outdent17`
873
+ jsxFactory: outdent16`
891
874
  import { ${upperName} } from '../types/jsx'
892
875
  export declare const ${name}: ${upperName}
893
876
  `,
894
- jsxType: outdent17`
877
+ jsxType: outdent16`
895
878
  import type { JSX, ComponentProps, Component } from 'solid-js'
896
879
  import type { JsxStyleProps, Assign } from '.'
897
880
 
@@ -977,7 +960,7 @@ function generateLayoutGrid(ctx) {
977
960
 
978
961
  // src/generators/pattern.ts
979
962
  import { capitalize, dashCase, unionType as unionType2 } from "@pandacss/shared";
980
- import { outdent as outdent18 } from "outdent";
963
+ import { outdent as outdent17 } from "outdent";
981
964
  import { stringify as stringify2 } from "telejson";
982
965
  import { match as match4 } from "ts-pattern";
983
966
  function generate4(name, pattern) {
@@ -986,7 +969,7 @@ function generate4(name, pattern) {
986
969
  const upperFn = `get${upperName}Style`;
987
970
  return {
988
971
  name: dashCase(name),
989
- dts: outdent18`
972
+ dts: outdent17`
990
973
  import { SystemStyleObject, ConditionalValue } from "../types"
991
974
  import { Properties } from "../types/csstype"
992
975
  import { Tokens } from "../types/token"
@@ -1009,14 +992,14 @@ function generate4(name, pattern) {
1009
992
  }).join("\n ")}
1010
993
  }
1011
994
 
1012
- ${strict ? outdent18`export declare function ${name}(options: ${upperName}Properties): string` : outdent18`
995
+ ${strict ? outdent17`export declare function ${name}(options: ${upperName}Properties): string` : outdent17`
1013
996
 
1014
997
  ${description ? `/** ${description} */` : ""}
1015
998
  export declare function ${name}(options: SystemStyleObject<${upperName}Properties>): string
1016
999
  `}
1017
1000
 
1018
1001
  `,
1019
- js: outdent18`
1002
+ js: outdent17`
1020
1003
  import { mapObject } from "../helpers"
1021
1004
  import { css } from "../css"
1022
1005
 
@@ -1035,10 +1018,10 @@ function generatePattern(ctx) {
1035
1018
  }
1036
1019
 
1037
1020
  // src/generators/prop-types.ts
1038
- import { outdent as outdent19 } from "outdent";
1021
+ import { outdent as outdent18 } from "outdent";
1039
1022
  function generatePropTypes(utility) {
1040
1023
  const result = [
1041
- outdent19`
1024
+ outdent18`
1042
1025
  import { Properties as CSSProperties } from './csstype'
1043
1026
  import { Tokens } from './token'
1044
1027
 
@@ -1067,14 +1050,14 @@ function generatePropTypes(utility) {
1067
1050
 
1068
1051
  // src/generators/recipe.ts
1069
1052
  import { capitalize as capitalize2, unionType as unionType3 } from "@pandacss/shared";
1070
- import { outdent as outdent20 } from "outdent";
1053
+ import { outdent as outdent19 } from "outdent";
1071
1054
  function generateRecipes(ctx) {
1072
1055
  const { recipes = {}, hash, hasRecipes, utility } = ctx;
1073
1056
  const { separator } = utility;
1074
1057
  if (!hasRecipes)
1075
1058
  return;
1076
1059
  const js = [
1077
- outdent20`
1060
+ outdent19`
1078
1061
  import { createCss, withoutSpace, compact } from "../helpers"
1079
1062
 
1080
1063
  const createRecipe = (name, defaultVariants) => {
@@ -1109,10 +1092,10 @@ function generateRecipes(ctx) {
1109
1092
  const dts = [""];
1110
1093
  Object.values(recipes).forEach((recipe) => {
1111
1094
  const { name, description, defaultVariants, variants } = recipe;
1112
- js.push(outdent20`
1095
+ js.push(outdent19`
1113
1096
  export const ${name} = createRecipe('${name}', ${JSON.stringify(defaultVariants ?? {})})
1114
1097
  `);
1115
- dts.push(outdent20`
1098
+ dts.push(outdent19`
1116
1099
  import { ConditionalValue } from "../types"
1117
1100
 
1118
1101
  export type ${capitalize2(name)}Variants = {
@@ -1128,8 +1111,8 @@ function generateRecipes(ctx) {
1128
1111
  `);
1129
1112
  });
1130
1113
  return {
1131
- js: outdent20.string(js.join("\n\n")),
1132
- dts: outdent20.string(dts.join("\n\n"))
1114
+ js: outdent19.string(js.join("\n\n")),
1115
+ dts: outdent19.string(dts.join("\n\n"))
1133
1116
  };
1134
1117
  }
1135
1118
 
@@ -1308,7 +1291,7 @@ function cleanupSelectors(css2, varSelector) {
1308
1291
 
1309
1292
  // src/generators/token-dts.ts
1310
1293
  import { unionType as unionType4, capitalize as capitalize3 } from "@pandacss/shared";
1311
- import { outdent as outdent21 } from "outdent";
1294
+ import { outdent as outdent20 } from "outdent";
1312
1295
  import pluralize from "pluralize";
1313
1296
  function generateTokenDts(dict) {
1314
1297
  const set = /* @__PURE__ */ new Set();
@@ -1326,11 +1309,11 @@ function generateTokenDts(dict) {
1326
1309
  }
1327
1310
  result.add("} & { [token: string]: never }");
1328
1311
  set.add(Array.from(result).join("\n"));
1329
- return outdent21.string(Array.from(set).join("\n\n"));
1312
+ return outdent20.string(Array.from(set).join("\n\n"));
1330
1313
  }
1331
1314
 
1332
1315
  // src/generators/token-js.ts
1333
- import outdent22 from "outdent";
1316
+ import outdent21 from "outdent";
1334
1317
  function generateTokenJs(dict) {
1335
1318
  const map = /* @__PURE__ */ new Map();
1336
1319
  dict.allTokens.forEach((token) => {
@@ -1340,7 +1323,7 @@ function generateTokenJs(dict) {
1340
1323
  });
1341
1324
  const obj = Object.fromEntries(map);
1342
1325
  return {
1343
- js: outdent22`
1326
+ js: outdent21`
1344
1327
  const tokens = ${JSON.stringify(obj, null, 2)}
1345
1328
 
1346
1329
  export function getToken(path) {
@@ -1353,7 +1336,7 @@ function generateTokenJs(dict) {
1353
1336
  return variable
1354
1337
  }
1355
1338
  `,
1356
- dts: outdent22`
1339
+ dts: outdent21`
1357
1340
  import { Token } from "../types/token"
1358
1341
  export declare function getToken(path: Token): string
1359
1342
  export declare function getTokenVar(path: Token): string
@@ -1363,7 +1346,7 @@ function generateTokenJs(dict) {
1363
1346
 
1364
1347
  // src/generators/types.ts
1365
1348
  import { readFileSync as readFileSync2 } from "fs-extra";
1366
- import outdent23 from "outdent";
1349
+ import outdent22 from "outdent";
1367
1350
  function getType(file) {
1368
1351
  const filepath = getEntrypoint("@pandacss/types", { dev: file });
1369
1352
  return readFileSync2(filepath, "utf8");
@@ -1374,7 +1357,7 @@ function generateCssType(ctx) {
1374
1357
  return {
1375
1358
  cssType: getType("csstype.d.ts"),
1376
1359
  pandaCssType: getType("system-types.d.ts"),
1377
- publicType: outdent23`
1360
+ publicType: outdent22`
1378
1361
  import * as System from './system-types'
1379
1362
  import { PropTypes } from './prop-type'
1380
1363
  import { Conditions } from './conditions'
@@ -1425,16 +1408,6 @@ function setupDesignTokens(ctx) {
1425
1408
  ]
1426
1409
  };
1427
1410
  }
1428
- function setupGlobalCss(ctx) {
1429
- const code = generateGlobalCss();
1430
- return {
1431
- dir: ctx.paths.css,
1432
- files: [
1433
- { file: "global-css.mjs", code: code.js },
1434
- { file: "global-css.d.ts", code: code.dts }
1435
- ]
1436
- };
1437
- }
1438
1411
  function setupTypes(ctx) {
1439
1412
  const code = generateCssType(ctx);
1440
1413
  const conditions = generateConditions(ctx);
@@ -1502,7 +1475,7 @@ function setupPatterns(ctx) {
1502
1475
  if (!files) {
1503
1476
  return { files: [] };
1504
1477
  }
1505
- const indexCode = outdent24.string(files.map((file) => `export * from './${file.name}'`).join("\n"));
1478
+ const indexCode = outdent23.string(files.map((file) => `export * from './${file.name}'`).join("\n"));
1506
1479
  return {
1507
1480
  dir: ctx.paths.pattern,
1508
1481
  files: [
@@ -1521,10 +1494,10 @@ function setupJsx(ctx) {
1521
1494
  const factory = generateJsxFactory(ctx);
1522
1495
  const patterns = generateJsxPatterns(ctx);
1523
1496
  const layoutGrid = generateLayoutGrid(ctx);
1524
- const indexCode = outdent24`
1497
+ const indexCode = outdent23`
1525
1498
  export * from './factory'
1526
1499
  export * from './layout-grid'
1527
- ${outdent24.string(patterns.map((file) => `export * from './${file.name}'`).join("\n"))}
1500
+ ${outdent23.string(patterns.map((file) => `export * from './${file.name}'`).join("\n"))}
1528
1501
  `;
1529
1502
  return {
1530
1503
  dir: ctx.paths.jsx,
@@ -1538,7 +1511,7 @@ function setupJsx(ctx) {
1538
1511
  { file: "factory.jsx", code: factory.js },
1539
1512
  {
1540
1513
  file: "index.d.ts",
1541
- code: outdent24`
1514
+ code: outdent23`
1542
1515
  ${indexCode}
1543
1516
  export type { ${ctx.jsxFactoryDetails.typeName} } from '../types/jsx'
1544
1517
  `
@@ -1548,7 +1521,7 @@ function setupJsx(ctx) {
1548
1521
  };
1549
1522
  }
1550
1523
  function setupCssIndex(ctx) {
1551
- const code = outdent24`
1524
+ const code = outdent23`
1552
1525
  export * from './css'
1553
1526
  export * from './cx'
1554
1527
  export * from './global-css'
@@ -1577,7 +1550,6 @@ function generateSystem(ctx) {
1577
1550
  setupCssMap(ctx),
1578
1551
  setupCx(ctx),
1579
1552
  setupCss(ctx),
1580
- setupGlobalCss(ctx),
1581
1553
  setupRecipes(ctx),
1582
1554
  setupPatterns(ctx),
1583
1555
  setupCssIndex(ctx),
@@ -1588,30 +1560,30 @@ function generateSystem(ctx) {
1588
1560
 
1589
1561
  // src/messages.ts
1590
1562
  import { colors, logger as logger3, quote as quote2 } from "@pandacss/logger";
1591
- import { outdent as outdent25 } from "outdent";
1563
+ import { outdent as outdent24 } from "outdent";
1592
1564
  var tick = colors.green().bold("\u2714\uFE0F");
1593
1565
  function artifactsGeneratedMessage(ctx) {
1594
1566
  return [
1595
- outdent25`
1567
+ outdent24`
1596
1568
  ${tick} ${quote2(ctx.outdir, "/css")}: the css function to author styles
1597
1569
  `,
1598
- ctx.hasTokens && outdent25`
1570
+ ctx.hasTokens && outdent24`
1599
1571
  ${tick} ${quote2(ctx.outdir, "/tokens")}: the css variables and js function to query your tokens
1600
1572
  `,
1601
- ctx.hasPatterns && outdent25`
1573
+ ctx.hasPatterns && outdent24`
1602
1574
  ${tick} ${quote2(ctx.outdir, "/patterns")}: functions to implement common css patterns
1603
1575
  `,
1604
- ctx.hasRecipes && outdent25`
1576
+ ctx.hasRecipes && outdent24`
1605
1577
  ${tick} ${quote2(ctx.outdir, "/recipes")}: functions to create multi-variant styles
1606
1578
  `,
1607
- ctx.jsxFramework && outdent25`
1579
+ ctx.jsxFramework && outdent24`
1608
1580
  ${tick} ${quote2(ctx.outdir, "/jsx")}: style prop powered elements for ${ctx.jsxFramework}
1609
1581
  `,
1610
1582
  "\n"
1611
1583
  ].filter(Boolean).join("\n");
1612
1584
  }
1613
1585
  function configExistsMessage(cmd) {
1614
- return outdent25`
1586
+ return outdent24`
1615
1587
  \n
1616
1588
  It looks like you already have panda created\`.
1617
1589
 
@@ -1620,7 +1592,7 @@ function configExistsMessage(cmd) {
1620
1592
  `;
1621
1593
  }
1622
1594
  function thankYouMessage() {
1623
- return outdent25`
1595
+ return outdent24`
1624
1596
 
1625
1597
  🚀 Thanks for choosing ${colors.cyan("Panda")} to write your css.
1626
1598
 
@@ -1632,7 +1604,7 @@ var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
1632
1604
  var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
1633
1605
  function scaffoldCompleteMessage() {
1634
1606
  return logger3.box(
1635
- outdent25`
1607
+ outdent24`
1636
1608
 
1637
1609
  ${colors.bold().cyan("Next steps:")}
1638
1610
 
@@ -1648,12 +1620,12 @@ function scaffoldCompleteMessage() {
1648
1620
  );
1649
1621
  }
1650
1622
  function watchMessage() {
1651
- return outdent25`
1623
+ return outdent24`
1652
1624
  Watching for file changes...
1653
1625
  `;
1654
1626
  }
1655
1627
  function buildCompleteMessage(ctx) {
1656
- return outdent25`
1628
+ return outdent24`
1657
1629
  Successfully extracted css from ${ctx.files.length} file(s) ✨
1658
1630
  `;
1659
1631
  }
@@ -2018,9 +1990,6 @@ function createContext(conf, io = fileSystem) {
2018
1990
  }
2019
1991
  function getCss(collector, file) {
2020
1992
  const sheet = new Stylesheet2(context());
2021
- collector.globalCss.forEach((result) => {
2022
- sheet.processGlobalCss(result.data);
2023
- });
2024
1993
  collector.css.forEach((result) => {
2025
1994
  sheet.processAtomic(result.data);
2026
1995
  });
@@ -2401,9 +2370,9 @@ async function generate5(config, configPath) {
2401
2370
  // src/git-ignore.ts
2402
2371
  import { appendFileSync, readFileSync as readFileSync6, writeFileSync } from "fs";
2403
2372
  import { lookItUpSync as lookItUpSync2 } from "look-it-up";
2404
- import outdent26 from "outdent";
2373
+ import outdent25 from "outdent";
2405
2374
  function setupGitIgnore(ctx) {
2406
- const txt = outdent26`## CSS Panda
2375
+ const txt = outdent25`## CSS Panda
2407
2376
  ${ctx.outdir}
2408
2377
  ${ctx.outdir}-static
2409
2378
  `;
@@ -2421,7 +2390,7 @@ function setupGitIgnore(ctx) {
2421
2390
  import { logger as logger9, quote as quote3 } from "@pandacss/logger";
2422
2391
  import { writeFile as writeFile2 } from "fs-extra";
2423
2392
  import { lookItUpSync as lookItUpSync3 } from "look-it-up";
2424
- import { outdent as outdent27 } from "outdent";
2393
+ import { outdent as outdent26 } from "outdent";
2425
2394
  import { join as join4 } from "path";
2426
2395
  import getPackageManager2 from "preferred-pm";
2427
2396
  async function setupConfig(cwd, { force }) {
@@ -2435,7 +2404,7 @@ async function setupConfig(cwd, { force }) {
2435
2404
  if (!force && configFile) {
2436
2405
  logger9.warn("config exists", configExistsMessage(cmd));
2437
2406
  } else {
2438
- const content = outdent27`
2407
+ const content = outdent26`
2439
2408
  import { defineConfig } from "css-panda"
2440
2409
 
2441
2410
  export default defineConfig({
@@ -2461,7 +2430,7 @@ async function setupConfig(cwd, { force }) {
2461
2430
  }
2462
2431
  async function setupPostcss(cwd) {
2463
2432
  logger9.info({ type: "init", msg: `creating postcss config file: ${quote3("postcss.config.cjs")}` });
2464
- const content = outdent27`
2433
+ const content = outdent26`
2465
2434
  module.exports = {
2466
2435
  plugins: {
2467
2436
  'css-panda/postcss': {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20230106195931",
3
+ "version": "0.0.0-dev-20230106200853",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -30,15 +30,15 @@
30
30
  "telejson": "7.0.4",
31
31
  "ts-pattern": "4.0.6",
32
32
  "ts-morph": "17.0.1",
33
- "@pandacss/types": "0.0.0-dev-20230106195931",
34
- "@pandacss/is-valid-prop": "0.0.0-dev-20230106195931",
35
- "@pandacss/error": "0.0.0-dev-20230106195931",
36
- "@pandacss/parser": "0.0.0-dev-20230106195931",
37
- "@pandacss/shared": "0.0.0-dev-20230106195931",
38
- "@pandacss/token-dictionary": "0.0.0-dev-20230106195931",
39
- "@pandacss/logger": "0.0.0-dev-20230106195931",
40
- "@pandacss/core": "0.0.0-dev-20230106195931",
41
- "@pandacss/config": "0.0.0-dev-20230106195931"
33
+ "@pandacss/types": "0.0.0-dev-20230106200853",
34
+ "@pandacss/is-valid-prop": "0.0.0-dev-20230106200853",
35
+ "@pandacss/error": "0.0.0-dev-20230106200853",
36
+ "@pandacss/parser": "0.0.0-dev-20230106200853",
37
+ "@pandacss/shared": "0.0.0-dev-20230106200853",
38
+ "@pandacss/token-dictionary": "0.0.0-dev-20230106200853",
39
+ "@pandacss/logger": "0.0.0-dev-20230106200853",
40
+ "@pandacss/core": "0.0.0-dev-20230106200853",
41
+ "@pandacss/config": "0.0.0-dev-20230106200853"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/fs-extra": "9.0.13",
@@ -46,7 +46,7 @@
46
46
  "@types/glob-parent": "^5.1.1",
47
47
  "@types/pluralize": "0.0.29",
48
48
  "@types/lodash.merge": "4.6.7",
49
- "@pandacss/fixture": "0.0.0-dev-20230106195931"
49
+ "@pandacss/fixture": "0.0.0-dev-20230106200853"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",