@pandacss/node 0.0.0-dev-20230105084653 → 0.0.0-dev-20230106105402
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 +3 -0
- package/dist/index.js +12 -11
- package/dist/index.mjs +12 -11
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -119,6 +119,7 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
119
119
|
}[];
|
|
120
120
|
}[];
|
|
121
121
|
jsxFramework: "solid" | "react" | "preact" | undefined;
|
|
122
|
+
jsxFactoryName: string;
|
|
122
123
|
jsxFactory: string;
|
|
123
124
|
cssVarRoot: string;
|
|
124
125
|
properties: string[];
|
|
@@ -255,6 +256,7 @@ declare class Builder {
|
|
|
255
256
|
}[];
|
|
256
257
|
}[];
|
|
257
258
|
jsxFramework: "solid" | "react" | "preact" | undefined;
|
|
259
|
+
jsxFactoryName: string;
|
|
258
260
|
jsxFactory: string;
|
|
259
261
|
cssVarRoot: string;
|
|
260
262
|
properties: string[];
|
|
@@ -383,6 +385,7 @@ declare function loadConfigAndCreateContext(options?: {
|
|
|
383
385
|
}[];
|
|
384
386
|
}[];
|
|
385
387
|
jsxFramework: "solid" | "react" | "preact" | undefined;
|
|
388
|
+
jsxFactoryName: string;
|
|
386
389
|
jsxFactory: string;
|
|
387
390
|
cssVarRoot: string;
|
|
388
391
|
properties: string[];
|
package/dist/index.js
CHANGED
|
@@ -721,23 +721,17 @@ import type { ElementType, ComponentProps } from 'react'
|
|
|
721
721
|
import type { JsxStyleProps, Assign } from '.'
|
|
722
722
|
|
|
723
723
|
type Element = keyof JSX.IntrinsicElements
|
|
724
|
-
type As<P = any> = ElementType<P>
|
|
725
724
|
type Dict<T = unknown> = Record<string, T>
|
|
726
725
|
|
|
727
|
-
type Clean<T> = Omit<T, '
|
|
726
|
+
type Clean<T> = Omit<T, 'color'>
|
|
728
727
|
|
|
729
728
|
type PolymorphicProps<
|
|
730
729
|
ComponentProps extends Dict,
|
|
731
|
-
AsProps extends Dict,
|
|
732
730
|
AdditionalProps extends Dict = {},
|
|
733
|
-
|
|
734
|
-
> = Assign<Clean<ComponentProps>, AdditionalProps> &
|
|
735
|
-
Assign<Clean<AsProps>, AdditionalProps> & {
|
|
736
|
-
as?: AsComponent
|
|
737
|
-
}
|
|
731
|
+
> = Assign<Clean<ComponentProps>, AdditionalProps>
|
|
738
732
|
|
|
739
|
-
export type PolymorphicComponent<C extends
|
|
740
|
-
|
|
733
|
+
export type PolymorphicComponent<C extends ElementType, P extends Dict = {}> = {
|
|
734
|
+
(props: PolymorphicProps<ComponentProps<C>, P> & JsxStyleProps<P>): JSX.Element
|
|
741
735
|
displayName?: string
|
|
742
736
|
}
|
|
743
737
|
|
|
@@ -745,7 +739,7 @@ export type PolymorphicComponents = {
|
|
|
745
739
|
[K in Element]: PolymorphicComponent<K, {}>
|
|
746
740
|
}
|
|
747
741
|
|
|
748
|
-
export type HTML${upperName}Props<T extends
|
|
742
|
+
export type HTML${upperName}Props<T extends ElementType> = Assign<Clean<ComponentProps<T>>, JsxStyleProps>
|
|
749
743
|
`
|
|
750
744
|
};
|
|
751
745
|
}
|
|
@@ -1388,11 +1382,15 @@ function generateCssType(ctx) {
|
|
|
1388
1382
|
import { Conditions } from './conditions'
|
|
1389
1383
|
|
|
1390
1384
|
export type SystemStyleObject<Overrides extends Record<string, unknown> = {}> = System.StyleObject<Conditions, PropTypes, ${strictArg}, Overrides>
|
|
1385
|
+
|
|
1391
1386
|
export type GlobalStyleObject<Overrides extends Record<string, unknown> = {}> = System.GlobalStyleObject<Conditions, PropTypes, ${strictArg}, Overrides>
|
|
1387
|
+
|
|
1392
1388
|
export type JsxStyleProps<Overrides extends Record<string, unknown> = {}> = System.JsxStyleProps<Conditions, PropTypes, ${strictArg}, Overrides>
|
|
1389
|
+
|
|
1393
1390
|
export type ConditionalValue<Value> = System.Conditional<Conditions, Value>
|
|
1394
1391
|
|
|
1395
1392
|
type DistributiveOmit<T, U> = T extends any ? Pick<T, Exclude<keyof T, U>> : never
|
|
1393
|
+
|
|
1396
1394
|
export type Assign<Target, Override> = DistributiveOmit<Target, keyof Override> & Override
|
|
1397
1395
|
`
|
|
1398
1396
|
};
|
|
@@ -1529,6 +1527,7 @@ function setupJsx(ctx) {
|
|
|
1529
1527
|
export * from './factory'
|
|
1530
1528
|
export * from './layout-grid'
|
|
1531
1529
|
${import_outdent24.default.string(patterns.map((file) => `export * from './${file.name}'`).join("\n"))}
|
|
1530
|
+
export type { HTML${ctx.jsxFactoryName}Props } from '../types/jsx'
|
|
1532
1531
|
`;
|
|
1533
1532
|
return {
|
|
1534
1533
|
dir: ctx.paths.jsx,
|
|
@@ -1763,6 +1762,7 @@ function createContext(conf, io = fileSystem) {
|
|
|
1763
1762
|
textStyles,
|
|
1764
1763
|
layerStyles
|
|
1765
1764
|
} = theme;
|
|
1765
|
+
const jsxFactoryName = (0, import_shared14.capitalize)(jsxFactory);
|
|
1766
1766
|
const cwd = (0, import_path2.resolve)(cwdProp);
|
|
1767
1767
|
const exclude = [".git", "node_modules", "test-results"].concat(excludeProp);
|
|
1768
1768
|
const tokens = new import_token_dictionary.TokenDictionary({
|
|
@@ -2103,6 +2103,7 @@ function createContext(conf, io = fileSystem) {
|
|
|
2103
2103
|
hasRecipes,
|
|
2104
2104
|
getRecipeDetails,
|
|
2105
2105
|
jsxFramework,
|
|
2106
|
+
jsxFactoryName,
|
|
2106
2107
|
jsxFactory,
|
|
2107
2108
|
cssVarRoot,
|
|
2108
2109
|
properties,
|
package/dist/index.mjs
CHANGED
|
@@ -675,23 +675,17 @@ import type { ElementType, ComponentProps } from 'react'
|
|
|
675
675
|
import type { JsxStyleProps, Assign } from '.'
|
|
676
676
|
|
|
677
677
|
type Element = keyof JSX.IntrinsicElements
|
|
678
|
-
type As<P = any> = ElementType<P>
|
|
679
678
|
type Dict<T = unknown> = Record<string, T>
|
|
680
679
|
|
|
681
|
-
type Clean<T> = Omit<T, '
|
|
680
|
+
type Clean<T> = Omit<T, 'color'>
|
|
682
681
|
|
|
683
682
|
type PolymorphicProps<
|
|
684
683
|
ComponentProps extends Dict,
|
|
685
|
-
AsProps extends Dict,
|
|
686
684
|
AdditionalProps extends Dict = {},
|
|
687
|
-
|
|
688
|
-
> = Assign<Clean<ComponentProps>, AdditionalProps> &
|
|
689
|
-
Assign<Clean<AsProps>, AdditionalProps> & {
|
|
690
|
-
as?: AsComponent
|
|
691
|
-
}
|
|
685
|
+
> = Assign<Clean<ComponentProps>, AdditionalProps>
|
|
692
686
|
|
|
693
|
-
export type PolymorphicComponent<C extends
|
|
694
|
-
|
|
687
|
+
export type PolymorphicComponent<C extends ElementType, P extends Dict = {}> = {
|
|
688
|
+
(props: PolymorphicProps<ComponentProps<C>, P> & JsxStyleProps<P>): JSX.Element
|
|
695
689
|
displayName?: string
|
|
696
690
|
}
|
|
697
691
|
|
|
@@ -699,7 +693,7 @@ export type PolymorphicComponents = {
|
|
|
699
693
|
[K in Element]: PolymorphicComponent<K, {}>
|
|
700
694
|
}
|
|
701
695
|
|
|
702
|
-
export type HTML${upperName}Props<T extends
|
|
696
|
+
export type HTML${upperName}Props<T extends ElementType> = Assign<Clean<ComponentProps<T>>, JsxStyleProps>
|
|
703
697
|
`
|
|
704
698
|
};
|
|
705
699
|
}
|
|
@@ -1342,11 +1336,15 @@ function generateCssType(ctx) {
|
|
|
1342
1336
|
import { Conditions } from './conditions'
|
|
1343
1337
|
|
|
1344
1338
|
export type SystemStyleObject<Overrides extends Record<string, unknown> = {}> = System.StyleObject<Conditions, PropTypes, ${strictArg}, Overrides>
|
|
1339
|
+
|
|
1345
1340
|
export type GlobalStyleObject<Overrides extends Record<string, unknown> = {}> = System.GlobalStyleObject<Conditions, PropTypes, ${strictArg}, Overrides>
|
|
1341
|
+
|
|
1346
1342
|
export type JsxStyleProps<Overrides extends Record<string, unknown> = {}> = System.JsxStyleProps<Conditions, PropTypes, ${strictArg}, Overrides>
|
|
1343
|
+
|
|
1347
1344
|
export type ConditionalValue<Value> = System.Conditional<Conditions, Value>
|
|
1348
1345
|
|
|
1349
1346
|
type DistributiveOmit<T, U> = T extends any ? Pick<T, Exclude<keyof T, U>> : never
|
|
1347
|
+
|
|
1350
1348
|
export type Assign<Target, Override> = DistributiveOmit<Target, keyof Override> & Override
|
|
1351
1349
|
`
|
|
1352
1350
|
};
|
|
@@ -1483,6 +1481,7 @@ function setupJsx(ctx) {
|
|
|
1483
1481
|
export * from './factory'
|
|
1484
1482
|
export * from './layout-grid'
|
|
1485
1483
|
${outdent24.string(patterns.map((file) => `export * from './${file.name}'`).join("\n"))}
|
|
1484
|
+
export type { HTML${ctx.jsxFactoryName}Props } from '../types/jsx'
|
|
1486
1485
|
`;
|
|
1487
1486
|
return {
|
|
1488
1487
|
dir: ctx.paths.jsx,
|
|
@@ -1724,6 +1723,7 @@ function createContext(conf, io = fileSystem) {
|
|
|
1724
1723
|
textStyles,
|
|
1725
1724
|
layerStyles
|
|
1726
1725
|
} = theme;
|
|
1726
|
+
const jsxFactoryName = capitalize13(jsxFactory);
|
|
1727
1727
|
const cwd = resolve(cwdProp);
|
|
1728
1728
|
const exclude = [".git", "node_modules", "test-results"].concat(excludeProp);
|
|
1729
1729
|
const tokens = new TokenDictionary({
|
|
@@ -2064,6 +2064,7 @@ function createContext(conf, io = fileSystem) {
|
|
|
2064
2064
|
hasRecipes,
|
|
2065
2065
|
getRecipeDetails,
|
|
2066
2066
|
jsxFramework,
|
|
2067
|
+
jsxFactoryName,
|
|
2067
2068
|
jsxFactory,
|
|
2068
2069
|
cssVarRoot,
|
|
2069
2070
|
properties,
|
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-20230106105402",
|
|
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-
|
|
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-20230106105402",
|
|
34
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20230106105402",
|
|
35
|
+
"@pandacss/error": "0.0.0-dev-20230106105402",
|
|
36
|
+
"@pandacss/parser": "0.0.0-dev-20230106105402",
|
|
37
|
+
"@pandacss/shared": "0.0.0-dev-20230106105402",
|
|
38
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230106105402",
|
|
39
|
+
"@pandacss/logger": "0.0.0-dev-20230106105402",
|
|
40
|
+
"@pandacss/core": "0.0.0-dev-20230106105402",
|
|
41
|
+
"@pandacss/config": "0.0.0-dev-20230106105402"
|
|
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-20230106105402"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|