@pandacss/node 0.0.0-dev-20221129125035 → 0.0.0-dev-20221130100047
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 +7 -1
- package/dist/index.js +42 -28
- package/dist/index.mjs +42 -28
- package/package.json +12 -12
package/dist/index.d.ts
CHANGED
|
@@ -141,8 +141,14 @@ declare function emitArtifacts(ctx: PandaContext): Promise<string>;
|
|
|
141
141
|
declare function emitAndExtract(ctx: PandaContext): Promise<void>;
|
|
142
142
|
|
|
143
143
|
declare class Builder {
|
|
144
|
+
/**
|
|
145
|
+
* Map of file path to modified time
|
|
146
|
+
*/
|
|
144
147
|
fileModifiedMap: Map<string, number>;
|
|
145
|
-
|
|
148
|
+
/**
|
|
149
|
+
* Map of file path to css
|
|
150
|
+
*/
|
|
151
|
+
fileCssMap: Map<string, string>;
|
|
146
152
|
context: PandaContext | undefined;
|
|
147
153
|
configChanged: boolean;
|
|
148
154
|
updateFile(file: string, css: string): void;
|
package/dist/index.js
CHANGED
|
@@ -454,6 +454,7 @@ var import_outdent8 = require("outdent");
|
|
|
454
454
|
var import_ts_pattern = require("ts-pattern");
|
|
455
455
|
function generate(name, pattern, jsxFactory) {
|
|
456
456
|
const upperName = (0, import_shared3.capitalize)(name);
|
|
457
|
+
const upperFn = `get${upperName}Style`;
|
|
457
458
|
const jsxName = pattern.jsx ?? upperName;
|
|
458
459
|
const keys = Object.keys(pattern.properties ?? {});
|
|
459
460
|
return {
|
|
@@ -461,18 +462,18 @@ function generate(name, pattern, jsxFactory) {
|
|
|
461
462
|
js: import_outdent8.outdent`
|
|
462
463
|
import { forwardRef } from 'preact/compat'
|
|
463
464
|
import { ${jsxFactory} } from './factory'
|
|
464
|
-
import {
|
|
465
|
+
import { ${upperFn} } from '../patterns/${(0, import_shared3.dashCase)(name)}'
|
|
465
466
|
|
|
466
467
|
export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
|
|
467
468
|
${(0, import_ts_pattern.match)(keys.length).with(
|
|
468
469
|
0,
|
|
469
|
-
() => `
|
|
470
|
+
() => import_outdent8.outdent`
|
|
470
471
|
return <${jsxFactory}.div ref={ref} {...props} />
|
|
471
472
|
`
|
|
472
473
|
).otherwise(
|
|
473
|
-
() => `
|
|
474
|
+
() => import_outdent8.outdent`
|
|
474
475
|
const { ${keys.join(", ")}, ...restProps } = props
|
|
475
|
-
const styleProps =
|
|
476
|
+
const styleProps = ${upperFn}({${keys.join(", ")}})
|
|
476
477
|
return <${jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
|
|
477
478
|
`
|
|
478
479
|
)}
|
|
@@ -640,6 +641,7 @@ var import_outdent11 = require("outdent");
|
|
|
640
641
|
var import_ts_pattern2 = require("ts-pattern");
|
|
641
642
|
function generate2(name, pattern, jsxFactory) {
|
|
642
643
|
const upperName = (0, import_shared5.capitalize)(name);
|
|
644
|
+
const upperFn = `get${upperName}Style`;
|
|
643
645
|
const jsxName = pattern.jsx ?? upperName;
|
|
644
646
|
const keys = Object.keys(pattern.properties ?? {});
|
|
645
647
|
return {
|
|
@@ -647,18 +649,18 @@ function generate2(name, pattern, jsxFactory) {
|
|
|
647
649
|
js: import_outdent11.outdent`
|
|
648
650
|
import { forwardRef } from 'react'
|
|
649
651
|
import { ${jsxFactory} } from './factory'
|
|
650
|
-
import {
|
|
652
|
+
import { ${upperFn} } from '../patterns/${(0, import_shared5.dashCase)(name)}'
|
|
651
653
|
|
|
652
654
|
export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
|
|
653
655
|
${(0, import_ts_pattern2.match)(keys.length).with(
|
|
654
656
|
0,
|
|
655
|
-
() => `
|
|
657
|
+
() => import_outdent11.outdent`
|
|
656
658
|
return <${jsxFactory}.div ref={ref} {...props} />
|
|
657
659
|
`
|
|
658
660
|
).otherwise(
|
|
659
|
-
() => `
|
|
661
|
+
() => import_outdent11.outdent`
|
|
660
662
|
const { ${keys.join(", ")}, ...restProps } = props
|
|
661
|
-
const styleProps =
|
|
663
|
+
const styleProps = ${upperFn}({${keys.join(", ")}})
|
|
662
664
|
return <${jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
|
|
663
665
|
`
|
|
664
666
|
)}
|
|
@@ -666,7 +668,7 @@ function generate2(name, pattern, jsxFactory) {
|
|
|
666
668
|
})
|
|
667
669
|
`,
|
|
668
670
|
dts: import_outdent11.outdent`
|
|
669
|
-
import { ComponentProps, ElementType
|
|
671
|
+
import { ComponentProps, ElementType } from 'react'
|
|
670
672
|
import { ${upperName}Properties } from '../patterns/${(0, import_shared5.dashCase)(name)}'
|
|
671
673
|
import { JSXStyleProperties, Assign } from '../types'
|
|
672
674
|
|
|
@@ -811,6 +813,7 @@ var import_outdent14 = require("outdent");
|
|
|
811
813
|
var import_ts_pattern3 = require("ts-pattern");
|
|
812
814
|
function generate3(name, pattern, jsxFactory) {
|
|
813
815
|
const upperName = (0, import_shared7.capitalize)(name);
|
|
816
|
+
const upperFn = `get${upperName}Style`;
|
|
814
817
|
const jsxName = pattern.jsx ?? upperName;
|
|
815
818
|
const keys = Object.keys(pattern.properties ?? {});
|
|
816
819
|
return {
|
|
@@ -818,18 +821,18 @@ function generate3(name, pattern, jsxFactory) {
|
|
|
818
821
|
js: import_outdent14.outdent`
|
|
819
822
|
import { splitProps } from 'solid-js'
|
|
820
823
|
import { ${jsxFactory} } from './factory'
|
|
821
|
-
import {
|
|
824
|
+
import { ${upperFn} } from '../patterns/${(0, import_shared7.dashCase)(name)}'
|
|
822
825
|
|
|
823
826
|
export function ${jsxName}(props) {
|
|
824
827
|
${(0, import_ts_pattern3.match)(keys.length).with(
|
|
825
828
|
0,
|
|
826
|
-
() => `
|
|
829
|
+
() => import_outdent14.outdent`
|
|
827
830
|
return <${jsxFactory}.div {...props} />
|
|
828
831
|
`
|
|
829
832
|
).otherwise(
|
|
830
|
-
() => `
|
|
833
|
+
() => import_outdent14.outdent`
|
|
831
834
|
const [patternProps, restProps] = splitProps(props, [${keys.map((v) => JSON.stringify(v)).join(", ")}]);
|
|
832
|
-
const styleProps =
|
|
835
|
+
const styleProps = ${upperFn}(patternProps)
|
|
833
836
|
return <${jsxFactory}.div {...styleProps} {...restProps} />
|
|
834
837
|
`
|
|
835
838
|
)}
|
|
@@ -891,6 +894,8 @@ var import_telejson = require("telejson");
|
|
|
891
894
|
var import_ts_pattern4 = require("ts-pattern");
|
|
892
895
|
function generate4(name, pattern) {
|
|
893
896
|
const { properties, transform, strict, description } = pattern;
|
|
897
|
+
const upperName = (0, import_shared8.capitalize)(name);
|
|
898
|
+
const upperFn = `get${upperName}Style`;
|
|
894
899
|
return {
|
|
895
900
|
name: (0, import_shared8.dashCase)(name),
|
|
896
901
|
dts: import_outdent15.outdent`
|
|
@@ -916,11 +921,11 @@ function generate4(name, pattern) {
|
|
|
916
921
|
}).join("\n ")}
|
|
917
922
|
}
|
|
918
923
|
|
|
919
|
-
${strict ? import_outdent15.outdent`export declare function ${name}(options: ${
|
|
924
|
+
${strict ? import_outdent15.outdent`export declare function ${name}(options: ${upperName}Properties): string` : import_outdent15.outdent`
|
|
920
925
|
type Merge<T> = Omit<SystemStyleObject, keyof T> & T
|
|
921
926
|
|
|
922
927
|
${description ? `/** ${description} */` : ""}
|
|
923
|
-
export declare function ${name}(options: Merge<${
|
|
928
|
+
export declare function ${name}(options: Merge<${upperName}Properties>): string
|
|
924
929
|
`}
|
|
925
930
|
|
|
926
931
|
`,
|
|
@@ -928,9 +933,11 @@ function generate4(name, pattern) {
|
|
|
928
933
|
import { mapObject } from "../helpers"
|
|
929
934
|
import { css } from "../css"
|
|
930
935
|
|
|
931
|
-
|
|
936
|
+
const config = ${(0, import_telejson.stringify)({ transform })}
|
|
932
937
|
|
|
933
|
-
export const ${
|
|
938
|
+
export const ${upperFn} = (styles) => config.transform(styles, { map: mapObject })
|
|
939
|
+
|
|
940
|
+
export const ${name} = (styles) => css(${upperFn}(styles))
|
|
934
941
|
`.replace(/"_function_([^|]*)\|(.*)"/, "$2").replace(/\\"/g, '"').replace("return", "; return").replace(";;", ";")
|
|
935
942
|
};
|
|
936
943
|
}
|
|
@@ -1922,7 +1929,7 @@ function createContext(conf, io = fileSystem) {
|
|
|
1922
1929
|
};
|
|
1923
1930
|
}
|
|
1924
1931
|
function extract(fn) {
|
|
1925
|
-
return Promise.all(
|
|
1932
|
+
return Promise.all(getFiles().map(fn));
|
|
1926
1933
|
}
|
|
1927
1934
|
return {
|
|
1928
1935
|
...config,
|
|
@@ -2036,15 +2043,16 @@ function getConfigHash() {
|
|
|
2036
2043
|
}
|
|
2037
2044
|
return (0, import_shared12.toHash)((0, import_fs4.readFileSync)(file, "utf-8"));
|
|
2038
2045
|
}
|
|
2046
|
+
var setupCount = 0;
|
|
2039
2047
|
var Builder = class {
|
|
2040
2048
|
fileModifiedMap = /* @__PURE__ */ new Map();
|
|
2041
|
-
|
|
2049
|
+
fileCssMap = /* @__PURE__ */ new Map();
|
|
2042
2050
|
context;
|
|
2043
2051
|
configChanged = true;
|
|
2044
2052
|
updateFile(file, css2) {
|
|
2045
|
-
const oldCss = this.
|
|
2053
|
+
const oldCss = this.fileCssMap?.get(file) ?? "";
|
|
2046
2054
|
const newCss = (0, import_core4.discardDuplicate)(oldCss + css2);
|
|
2047
|
-
this.
|
|
2055
|
+
this.fileCssMap?.set(file, newCss);
|
|
2048
2056
|
}
|
|
2049
2057
|
async setup() {
|
|
2050
2058
|
const configHash = getConfigHash();
|
|
@@ -2052,16 +2060,19 @@ var Builder = class {
|
|
|
2052
2060
|
if (cachedContext) {
|
|
2053
2061
|
cachedContext.reloadSourceFiles();
|
|
2054
2062
|
this.context = cachedContext;
|
|
2055
|
-
this.
|
|
2063
|
+
this.fileCssMap = builderCache.get(cachedContext).fileCssMap;
|
|
2056
2064
|
this.fileModifiedMap = builderCache.get(cachedContext).fileModifiedMap;
|
|
2057
2065
|
} else {
|
|
2058
2066
|
this.context = await loadConfigAndCreateContext();
|
|
2059
|
-
|
|
2060
|
-
|
|
2067
|
+
if (setupCount > 0) {
|
|
2068
|
+
emitArtifacts(this.context);
|
|
2069
|
+
}
|
|
2070
|
+
this.fileCssMap = /* @__PURE__ */ new Map([["base.css", getBaseCss(this.context)]]);
|
|
2061
2071
|
this.fileModifiedMap = /* @__PURE__ */ new Map();
|
|
2062
2072
|
contextCache.set(configHash, this.context);
|
|
2063
|
-
builderCache.set(this.context, {
|
|
2073
|
+
builderCache.set(this.context, { fileCssMap: this.fileCssMap, fileModifiedMap: this.fileModifiedMap });
|
|
2064
2074
|
}
|
|
2075
|
+
setupCount++;
|
|
2065
2076
|
}
|
|
2066
2077
|
ensure() {
|
|
2067
2078
|
if (!this.context)
|
|
@@ -2086,12 +2097,15 @@ var Builder = class {
|
|
|
2086
2097
|
done();
|
|
2087
2098
|
}
|
|
2088
2099
|
toString() {
|
|
2089
|
-
return Array.from(this.
|
|
2100
|
+
return Array.from(this.fileCssMap.values()).join("");
|
|
2090
2101
|
}
|
|
2091
2102
|
write(root) {
|
|
2092
|
-
const
|
|
2103
|
+
const rootCssContent = root.toString();
|
|
2093
2104
|
root.removeAll();
|
|
2094
|
-
const css2 = (0, import_core4.discardDuplicate)(
|
|
2105
|
+
const css2 = (0, import_core4.discardDuplicate)(`
|
|
2106
|
+
${rootCssContent}
|
|
2107
|
+
${this.toString()}
|
|
2108
|
+
`);
|
|
2095
2109
|
root.append(css2);
|
|
2096
2110
|
}
|
|
2097
2111
|
registerDependency(fn) {
|
package/dist/index.mjs
CHANGED
|
@@ -409,6 +409,7 @@ import { outdent as outdent8 } from "outdent";
|
|
|
409
409
|
import { match } from "ts-pattern";
|
|
410
410
|
function generate(name, pattern, jsxFactory) {
|
|
411
411
|
const upperName = capitalize2(name);
|
|
412
|
+
const upperFn = `get${upperName}Style`;
|
|
412
413
|
const jsxName = pattern.jsx ?? upperName;
|
|
413
414
|
const keys = Object.keys(pattern.properties ?? {});
|
|
414
415
|
return {
|
|
@@ -416,18 +417,18 @@ function generate(name, pattern, jsxFactory) {
|
|
|
416
417
|
js: outdent8`
|
|
417
418
|
import { forwardRef } from 'preact/compat'
|
|
418
419
|
import { ${jsxFactory} } from './factory'
|
|
419
|
-
import {
|
|
420
|
+
import { ${upperFn} } from '../patterns/${dashCase(name)}'
|
|
420
421
|
|
|
421
422
|
export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
|
|
422
423
|
${match(keys.length).with(
|
|
423
424
|
0,
|
|
424
|
-
() => `
|
|
425
|
+
() => outdent8`
|
|
425
426
|
return <${jsxFactory}.div ref={ref} {...props} />
|
|
426
427
|
`
|
|
427
428
|
).otherwise(
|
|
428
|
-
() => `
|
|
429
|
+
() => outdent8`
|
|
429
430
|
const { ${keys.join(", ")}, ...restProps } = props
|
|
430
|
-
const styleProps =
|
|
431
|
+
const styleProps = ${upperFn}({${keys.join(", ")}})
|
|
431
432
|
return <${jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
|
|
432
433
|
`
|
|
433
434
|
)}
|
|
@@ -595,6 +596,7 @@ import { outdent as outdent11 } from "outdent";
|
|
|
595
596
|
import { match as match2 } from "ts-pattern";
|
|
596
597
|
function generate2(name, pattern, jsxFactory) {
|
|
597
598
|
const upperName = capitalize4(name);
|
|
599
|
+
const upperFn = `get${upperName}Style`;
|
|
598
600
|
const jsxName = pattern.jsx ?? upperName;
|
|
599
601
|
const keys = Object.keys(pattern.properties ?? {});
|
|
600
602
|
return {
|
|
@@ -602,18 +604,18 @@ function generate2(name, pattern, jsxFactory) {
|
|
|
602
604
|
js: outdent11`
|
|
603
605
|
import { forwardRef } from 'react'
|
|
604
606
|
import { ${jsxFactory} } from './factory'
|
|
605
|
-
import {
|
|
607
|
+
import { ${upperFn} } from '../patterns/${dashCase2(name)}'
|
|
606
608
|
|
|
607
609
|
export const ${jsxName} = forwardRef(function ${jsxName}(props, ref) {
|
|
608
610
|
${match2(keys.length).with(
|
|
609
611
|
0,
|
|
610
|
-
() => `
|
|
612
|
+
() => outdent11`
|
|
611
613
|
return <${jsxFactory}.div ref={ref} {...props} />
|
|
612
614
|
`
|
|
613
615
|
).otherwise(
|
|
614
|
-
() => `
|
|
616
|
+
() => outdent11`
|
|
615
617
|
const { ${keys.join(", ")}, ...restProps } = props
|
|
616
|
-
const styleProps =
|
|
618
|
+
const styleProps = ${upperFn}({${keys.join(", ")}})
|
|
617
619
|
return <${jsxFactory}.div ref={ref} {...styleProps} {...restProps} />
|
|
618
620
|
`
|
|
619
621
|
)}
|
|
@@ -621,7 +623,7 @@ function generate2(name, pattern, jsxFactory) {
|
|
|
621
623
|
})
|
|
622
624
|
`,
|
|
623
625
|
dts: outdent11`
|
|
624
|
-
import { ComponentProps, ElementType
|
|
626
|
+
import { ComponentProps, ElementType } from 'react'
|
|
625
627
|
import { ${upperName}Properties } from '../patterns/${dashCase2(name)}'
|
|
626
628
|
import { JSXStyleProperties, Assign } from '../types'
|
|
627
629
|
|
|
@@ -766,6 +768,7 @@ import { outdent as outdent14 } from "outdent";
|
|
|
766
768
|
import { match as match3 } from "ts-pattern";
|
|
767
769
|
function generate3(name, pattern, jsxFactory) {
|
|
768
770
|
const upperName = capitalize6(name);
|
|
771
|
+
const upperFn = `get${upperName}Style`;
|
|
769
772
|
const jsxName = pattern.jsx ?? upperName;
|
|
770
773
|
const keys = Object.keys(pattern.properties ?? {});
|
|
771
774
|
return {
|
|
@@ -773,18 +776,18 @@ function generate3(name, pattern, jsxFactory) {
|
|
|
773
776
|
js: outdent14`
|
|
774
777
|
import { splitProps } from 'solid-js'
|
|
775
778
|
import { ${jsxFactory} } from './factory'
|
|
776
|
-
import {
|
|
779
|
+
import { ${upperFn} } from '../patterns/${dashCase3(name)}'
|
|
777
780
|
|
|
778
781
|
export function ${jsxName}(props) {
|
|
779
782
|
${match3(keys.length).with(
|
|
780
783
|
0,
|
|
781
|
-
() => `
|
|
784
|
+
() => outdent14`
|
|
782
785
|
return <${jsxFactory}.div {...props} />
|
|
783
786
|
`
|
|
784
787
|
).otherwise(
|
|
785
|
-
() => `
|
|
788
|
+
() => outdent14`
|
|
786
789
|
const [patternProps, restProps] = splitProps(props, [${keys.map((v) => JSON.stringify(v)).join(", ")}]);
|
|
787
|
-
const styleProps =
|
|
790
|
+
const styleProps = ${upperFn}(patternProps)
|
|
788
791
|
return <${jsxFactory}.div {...styleProps} {...restProps} />
|
|
789
792
|
`
|
|
790
793
|
)}
|
|
@@ -846,6 +849,8 @@ import { stringify as stringify2 } from "telejson";
|
|
|
846
849
|
import { match as match4 } from "ts-pattern";
|
|
847
850
|
function generate4(name, pattern) {
|
|
848
851
|
const { properties, transform, strict, description } = pattern;
|
|
852
|
+
const upperName = capitalize7(name);
|
|
853
|
+
const upperFn = `get${upperName}Style`;
|
|
849
854
|
return {
|
|
850
855
|
name: dashCase4(name),
|
|
851
856
|
dts: outdent15`
|
|
@@ -871,11 +876,11 @@ function generate4(name, pattern) {
|
|
|
871
876
|
}).join("\n ")}
|
|
872
877
|
}
|
|
873
878
|
|
|
874
|
-
${strict ? outdent15`export declare function ${name}(options: ${
|
|
879
|
+
${strict ? outdent15`export declare function ${name}(options: ${upperName}Properties): string` : outdent15`
|
|
875
880
|
type Merge<T> = Omit<SystemStyleObject, keyof T> & T
|
|
876
881
|
|
|
877
882
|
${description ? `/** ${description} */` : ""}
|
|
878
|
-
export declare function ${name}(options: Merge<${
|
|
883
|
+
export declare function ${name}(options: Merge<${upperName}Properties>): string
|
|
879
884
|
`}
|
|
880
885
|
|
|
881
886
|
`,
|
|
@@ -883,9 +888,11 @@ function generate4(name, pattern) {
|
|
|
883
888
|
import { mapObject } from "../helpers"
|
|
884
889
|
import { css } from "../css"
|
|
885
890
|
|
|
886
|
-
|
|
891
|
+
const config = ${stringify2({ transform })}
|
|
887
892
|
|
|
888
|
-
export const ${
|
|
893
|
+
export const ${upperFn} = (styles) => config.transform(styles, { map: mapObject })
|
|
894
|
+
|
|
895
|
+
export const ${name} = (styles) => css(${upperFn}(styles))
|
|
889
896
|
`.replace(/"_function_([^|]*)\|(.*)"/, "$2").replace(/\\"/g, '"').replace("return", "; return").replace(";;", ";")
|
|
890
897
|
};
|
|
891
898
|
}
|
|
@@ -1883,7 +1890,7 @@ function createContext(conf, io = fileSystem) {
|
|
|
1883
1890
|
};
|
|
1884
1891
|
}
|
|
1885
1892
|
function extract(fn) {
|
|
1886
|
-
return Promise.all(
|
|
1893
|
+
return Promise.all(getFiles().map(fn));
|
|
1887
1894
|
}
|
|
1888
1895
|
return {
|
|
1889
1896
|
...config,
|
|
@@ -1997,15 +2004,16 @@ function getConfigHash() {
|
|
|
1997
2004
|
}
|
|
1998
2005
|
return toHash(readFileSync5(file, "utf-8"));
|
|
1999
2006
|
}
|
|
2007
|
+
var setupCount = 0;
|
|
2000
2008
|
var Builder = class {
|
|
2001
2009
|
fileModifiedMap = /* @__PURE__ */ new Map();
|
|
2002
|
-
|
|
2010
|
+
fileCssMap = /* @__PURE__ */ new Map();
|
|
2003
2011
|
context;
|
|
2004
2012
|
configChanged = true;
|
|
2005
2013
|
updateFile(file, css2) {
|
|
2006
|
-
const oldCss = this.
|
|
2014
|
+
const oldCss = this.fileCssMap?.get(file) ?? "";
|
|
2007
2015
|
const newCss = discardDuplicate2(oldCss + css2);
|
|
2008
|
-
this.
|
|
2016
|
+
this.fileCssMap?.set(file, newCss);
|
|
2009
2017
|
}
|
|
2010
2018
|
async setup() {
|
|
2011
2019
|
const configHash = getConfigHash();
|
|
@@ -2013,16 +2021,19 @@ var Builder = class {
|
|
|
2013
2021
|
if (cachedContext) {
|
|
2014
2022
|
cachedContext.reloadSourceFiles();
|
|
2015
2023
|
this.context = cachedContext;
|
|
2016
|
-
this.
|
|
2024
|
+
this.fileCssMap = builderCache.get(cachedContext).fileCssMap;
|
|
2017
2025
|
this.fileModifiedMap = builderCache.get(cachedContext).fileModifiedMap;
|
|
2018
2026
|
} else {
|
|
2019
2027
|
this.context = await loadConfigAndCreateContext();
|
|
2020
|
-
|
|
2021
|
-
|
|
2028
|
+
if (setupCount > 0) {
|
|
2029
|
+
emitArtifacts(this.context);
|
|
2030
|
+
}
|
|
2031
|
+
this.fileCssMap = /* @__PURE__ */ new Map([["base.css", getBaseCss(this.context)]]);
|
|
2022
2032
|
this.fileModifiedMap = /* @__PURE__ */ new Map();
|
|
2023
2033
|
contextCache.set(configHash, this.context);
|
|
2024
|
-
builderCache.set(this.context, {
|
|
2034
|
+
builderCache.set(this.context, { fileCssMap: this.fileCssMap, fileModifiedMap: this.fileModifiedMap });
|
|
2025
2035
|
}
|
|
2036
|
+
setupCount++;
|
|
2026
2037
|
}
|
|
2027
2038
|
ensure() {
|
|
2028
2039
|
if (!this.context)
|
|
@@ -2047,12 +2058,15 @@ var Builder = class {
|
|
|
2047
2058
|
done();
|
|
2048
2059
|
}
|
|
2049
2060
|
toString() {
|
|
2050
|
-
return Array.from(this.
|
|
2061
|
+
return Array.from(this.fileCssMap.values()).join("");
|
|
2051
2062
|
}
|
|
2052
2063
|
write(root) {
|
|
2053
|
-
const
|
|
2064
|
+
const rootCssContent = root.toString();
|
|
2054
2065
|
root.removeAll();
|
|
2055
|
-
const css2 = discardDuplicate2(
|
|
2066
|
+
const css2 = discardDuplicate2(`
|
|
2067
|
+
${rootCssContent}
|
|
2068
|
+
${this.toString()}
|
|
2069
|
+
`);
|
|
2056
2070
|
root.append(css2);
|
|
2057
2071
|
}
|
|
2058
2072
|
registerDependency(fn) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20221130100047",
|
|
4
4
|
"description": "The core css panda library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"chokidar": "^3.5.3",
|
|
18
18
|
"fast-glob": "^3.2.11",
|
|
19
|
-
"fs-extra": "
|
|
19
|
+
"fs-extra": "11.0.0",
|
|
20
20
|
"is-glob": "^4.0.3",
|
|
21
21
|
"glob-parent": "^6.0.2",
|
|
22
22
|
"hookable": "5.4.2",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"telejson": "7.0.3",
|
|
31
31
|
"ts-pattern": "4.0.6",
|
|
32
32
|
"ts-morph": "17.0.1",
|
|
33
|
-
"@pandacss/types": "0.0.0-dev-
|
|
34
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
35
|
-
"@pandacss/error": "0.0.0-dev-
|
|
36
|
-
"@pandacss/parser": "0.0.0-dev-
|
|
37
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
38
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
39
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
40
|
-
"@pandacss/core": "0.0.0-dev-
|
|
41
|
-
"@pandacss/config": "0.0.0-dev-
|
|
33
|
+
"@pandacss/types": "0.0.0-dev-20221130100047",
|
|
34
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20221130100047",
|
|
35
|
+
"@pandacss/error": "0.0.0-dev-20221130100047",
|
|
36
|
+
"@pandacss/parser": "0.0.0-dev-20221130100047",
|
|
37
|
+
"@pandacss/shared": "0.0.0-dev-20221130100047",
|
|
38
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20221130100047",
|
|
39
|
+
"@pandacss/logger": "0.0.0-dev-20221130100047",
|
|
40
|
+
"@pandacss/core": "0.0.0-dev-20221130100047",
|
|
41
|
+
"@pandacss/config": "0.0.0-dev-20221130100047"
|
|
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-
|
|
49
|
+
"@pandacss/fixture": "0.0.0-dev-20221130100047"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|