@likec4/styles 1.48.0 → 1.49.0
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/css/conditions.mjs +1 -1
- package/dist/jsx/is-valid-prop.mjs +1 -1
- package/dist/recipes/element-shape-recipe.d.mts +4 -0
- package/dist/recipes/element-shape-recipe.mjs +6 -1
- package/dist/recipes/index.d.mts +1 -0
- package/dist/recipes/index.mjs +1 -0
- package/dist/recipes/node-notes.d.mts +34 -0
- package/dist/recipes/node-notes.mjs +31 -0
- package/dist/tokens/index.mjs +116 -16
- package/dist/tokens/tokens.d.mts +7 -4
- package/dist/types/conditions.d.mts +3 -5
- package/dist/types/prop-type.d.mts +18 -2
- package/dist/types/style-props.d.mts +21 -21
- package/package.json +28 -31
- package/{dist → preset}/_chunks/libs/@radix-ui/colors.mjs +1 -5
- package/preset/_chunks/libs/pandacss-preset-radix-colors.mjs +147 -0
- package/{dist → preset}/_chunks/libs/remeda.mjs +3 -47
- package/preset/_chunks/rolldown-runtime.mjs +11 -0
- package/preset/package.json +2 -2
- package/{dist → preset}/preset.d.mts +231 -32
- package/{dist → preset}/preset.mjs +519 -431
- package/vars/package.json +2 -2
- package/vars/vars.mjs +415 -0
- package/dist/_chunks/libs/pandacss-preset-radix-colors.mjs +0 -106
- package/dist/_chunks/rolldown-runtime.mjs +0 -18
- package/dist/vars/index.mjs +0 -426
- /package/{dist/vars/index.d.mts → vars/vars.d.mts} +0 -0
|
@@ -854,7 +854,7 @@ borderBlockEndStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties["
|
|
|
854
854
|
*
|
|
855
855
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-width
|
|
856
856
|
*/
|
|
857
|
-
borderBlockEndWidth?: ConditionalValue<
|
|
857
|
+
borderBlockEndWidth?: ConditionalValue<UtilityValues["borderBlockEndWidth"] | CssVars | CssProperties["borderBlockEndWidth"]>
|
|
858
858
|
/**
|
|
859
859
|
* The **`border-block-start`** CSS property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet.
|
|
860
860
|
*
|
|
@@ -908,7 +908,7 @@ borderBlockStartStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties
|
|
|
908
908
|
*
|
|
909
909
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-width
|
|
910
910
|
*/
|
|
911
|
-
borderBlockStartWidth?: ConditionalValue<
|
|
911
|
+
borderBlockStartWidth?: ConditionalValue<UtilityValues["borderBlockStartWidth"] | CssVars | CssProperties["borderBlockStartWidth"]>
|
|
912
912
|
/**
|
|
913
913
|
* The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`.
|
|
914
914
|
*
|
|
@@ -936,7 +936,7 @@ borderBlockStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties["bor
|
|
|
936
936
|
*
|
|
937
937
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-block-width
|
|
938
938
|
*/
|
|
939
|
-
borderBlockWidth?: ConditionalValue<
|
|
939
|
+
borderBlockWidth?: ConditionalValue<UtilityValues["borderBlockWidth"] | CssVars | CssProperties["borderBlockWidth"]>
|
|
940
940
|
/**
|
|
941
941
|
* The **`border-bottom`** shorthand CSS property sets an element's bottom border. It sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`.
|
|
942
942
|
*
|
|
@@ -1020,7 +1020,7 @@ borderBottomStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties["bo
|
|
|
1020
1020
|
*
|
|
1021
1021
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-width
|
|
1022
1022
|
*/
|
|
1023
|
-
borderBottomWidth?: ConditionalValue<
|
|
1023
|
+
borderBottomWidth?: ConditionalValue<UtilityValues["borderBottomWidth"] | CssVars | CssProperties["borderBottomWidth"]>
|
|
1024
1024
|
/**
|
|
1025
1025
|
* The **`border-collapse`** CSS property sets whether cells inside a `<table>` have shared or separate borders.
|
|
1026
1026
|
*
|
|
@@ -1240,7 +1240,7 @@ borderInlineEndStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties[
|
|
|
1240
1240
|
*
|
|
1241
1241
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width
|
|
1242
1242
|
*/
|
|
1243
|
-
borderInlineEndWidth?: ConditionalValue<
|
|
1243
|
+
borderInlineEndWidth?: ConditionalValue<UtilityValues["borderInlineEndWidth"] | CssVars | CssProperties["borderInlineEndWidth"]>
|
|
1244
1244
|
/**
|
|
1245
1245
|
* The **`border-inline-start`** CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet.
|
|
1246
1246
|
*
|
|
@@ -1296,7 +1296,7 @@ borderInlineStartStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssPropertie
|
|
|
1296
1296
|
*
|
|
1297
1297
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width
|
|
1298
1298
|
*/
|
|
1299
|
-
borderInlineStartWidth?: ConditionalValue<
|
|
1299
|
+
borderInlineStartWidth?: ConditionalValue<UtilityValues["borderInlineStartWidth"] | CssVars | CssProperties["borderInlineStartWidth"]>
|
|
1300
1300
|
/**
|
|
1301
1301
|
* The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`.
|
|
1302
1302
|
*
|
|
@@ -1324,7 +1324,7 @@ borderInlineStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties["bo
|
|
|
1324
1324
|
*
|
|
1325
1325
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width
|
|
1326
1326
|
*/
|
|
1327
|
-
borderInlineWidth?: ConditionalValue<
|
|
1327
|
+
borderInlineWidth?: ConditionalValue<UtilityValues["borderInlineWidth"] | CssVars | CssProperties["borderInlineWidth"]>
|
|
1328
1328
|
/**
|
|
1329
1329
|
* The **`border-left`** shorthand CSS property sets all the properties of an element's left border.
|
|
1330
1330
|
*
|
|
@@ -1378,7 +1378,7 @@ borderLeftStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties["bord
|
|
|
1378
1378
|
*
|
|
1379
1379
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-left-width
|
|
1380
1380
|
*/
|
|
1381
|
-
borderLeftWidth?: ConditionalValue<
|
|
1381
|
+
borderLeftWidth?: ConditionalValue<UtilityValues["borderLeftWidth"] | CssVars | CssProperties["borderLeftWidth"]>
|
|
1382
1382
|
/**
|
|
1383
1383
|
* The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.
|
|
1384
1384
|
*
|
|
@@ -1445,7 +1445,7 @@ borderRightStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties["bor
|
|
|
1445
1445
|
*
|
|
1446
1446
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-right-width
|
|
1447
1447
|
*/
|
|
1448
|
-
borderRightWidth?: ConditionalValue<
|
|
1448
|
+
borderRightWidth?: ConditionalValue<UtilityValues["borderRightWidth"] | CssVars | CssProperties["borderRightWidth"]>
|
|
1449
1449
|
/**
|
|
1450
1450
|
* The **`border-spacing`** CSS property sets the distance between the borders of adjacent cells in a `<table>`. This property applies only when `border-collapse` is `separate`.
|
|
1451
1451
|
*
|
|
@@ -1583,7 +1583,7 @@ borderTopStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties["borde
|
|
|
1583
1583
|
*
|
|
1584
1584
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-top-width
|
|
1585
1585
|
*/
|
|
1586
|
-
borderTopWidth?: ConditionalValue<
|
|
1586
|
+
borderTopWidth?: ConditionalValue<UtilityValues["borderTopWidth"] | CssVars | CssProperties["borderTopWidth"]>
|
|
1587
1587
|
/**
|
|
1588
1588
|
* The **`border-width`** shorthand CSS property sets the width of an element's border.
|
|
1589
1589
|
*
|
|
@@ -1595,7 +1595,7 @@ borderTopWidth?: ConditionalValue<WithEscapeHatch<CssProperties["borderTopWidth"
|
|
|
1595
1595
|
*
|
|
1596
1596
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-width
|
|
1597
1597
|
*/
|
|
1598
|
-
borderWidth?: ConditionalValue<
|
|
1598
|
+
borderWidth?: ConditionalValue<UtilityValues["borderWidth"] | CssVars | CssProperties["borderWidth"]>
|
|
1599
1599
|
/**
|
|
1600
1600
|
* The **`bottom`** CSS property participates in setting the vertical position of a positioned element. It has no effect on non-positioned elements.
|
|
1601
1601
|
*
|
|
@@ -4187,7 +4187,7 @@ outlineStyle?: ConditionalValue<WithEscapeHatch<CssVars | CssProperties["outline
|
|
|
4187
4187
|
*
|
|
4188
4188
|
* @see https://developer.mozilla.org/docs/Web/CSS/outline-width
|
|
4189
4189
|
*/
|
|
4190
|
-
outlineWidth?: ConditionalValue<
|
|
4190
|
+
outlineWidth?: ConditionalValue<UtilityValues["outlineWidth"] | CssVars | CssProperties["outlineWidth"]>
|
|
4191
4191
|
/**
|
|
4192
4192
|
* The **`overflow`** CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to fit in its block formatting context — in both directions.
|
|
4193
4193
|
*
|
|
@@ -5340,7 +5340,7 @@ shapeOutside?: ConditionalValue<WithEscapeHatch<CssProperties["shapeOutside"]>>
|
|
|
5340
5340
|
strokeLinejoin?: ConditionalValue<WithEscapeHatch<CssProperties["strokeLinejoin"]>>
|
|
5341
5341
|
strokeMiterlimit?: ConditionalValue<WithEscapeHatch<CssProperties["strokeMiterlimit"]>>
|
|
5342
5342
|
strokeOpacity?: ConditionalValue<WithEscapeHatch<CssProperties["strokeOpacity"]>>
|
|
5343
|
-
strokeWidth?: ConditionalValue<
|
|
5343
|
+
strokeWidth?: ConditionalValue<UtilityValues["strokeWidth"] | CssVars | CssProperties["strokeWidth"]>
|
|
5344
5344
|
/**
|
|
5345
5345
|
* The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009).
|
|
5346
5346
|
*
|
|
@@ -6697,7 +6697,7 @@ marginStart?: ConditionalValue<WithEscapeHatch<UtilityValues["marginInlineStart"
|
|
|
6697
6697
|
*
|
|
6698
6698
|
* @see https://developer.mozilla.org/docs/Web/CSS/outline-width
|
|
6699
6699
|
*/
|
|
6700
|
-
ringWidth?: ConditionalValue<
|
|
6700
|
+
ringWidth?: ConditionalValue<UtilityValues["outlineWidth"] | CssVars | CssProperties["outlineWidth"]>
|
|
6701
6701
|
/**
|
|
6702
6702
|
* The **`outline-color`** CSS property sets the color of an element's outline.
|
|
6703
6703
|
*
|
|
@@ -7155,7 +7155,7 @@ borderX?: ConditionalValue<UtilityValues["borderInline"] | CssVars | CssProperti
|
|
|
7155
7155
|
*
|
|
7156
7156
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width
|
|
7157
7157
|
*/
|
|
7158
|
-
borderXWidth?: ConditionalValue<
|
|
7158
|
+
borderXWidth?: ConditionalValue<UtilityValues["borderInlineWidth"] | CssVars | CssProperties["borderInlineWidth"]>
|
|
7159
7159
|
/**
|
|
7160
7160
|
* The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`.
|
|
7161
7161
|
*
|
|
@@ -7195,7 +7195,7 @@ borderY?: ConditionalValue<UtilityValues["borderBlock"] | CssVars | CssPropertie
|
|
|
7195
7195
|
*
|
|
7196
7196
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-block-width
|
|
7197
7197
|
*/
|
|
7198
|
-
borderYWidth?: ConditionalValue<
|
|
7198
|
+
borderYWidth?: ConditionalValue<UtilityValues["borderBlockWidth"] | CssVars | CssProperties["borderBlockWidth"]>
|
|
7199
7199
|
/**
|
|
7200
7200
|
* The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`.
|
|
7201
7201
|
*
|
|
@@ -7235,7 +7235,7 @@ borderStart?: ConditionalValue<UtilityValues["borderInlineStart"] | CssVars | Cs
|
|
|
7235
7235
|
*
|
|
7236
7236
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width
|
|
7237
7237
|
*/
|
|
7238
|
-
borderStartWidth?: ConditionalValue<
|
|
7238
|
+
borderStartWidth?: ConditionalValue<UtilityValues["borderInlineStartWidth"] | CssVars | CssProperties["borderInlineStartWidth"]>
|
|
7239
7239
|
/**
|
|
7240
7240
|
* The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`.
|
|
7241
7241
|
*
|
|
@@ -7277,7 +7277,7 @@ borderEnd?: ConditionalValue<UtilityValues["borderInlineEnd"] | CssVars | CssPro
|
|
|
7277
7277
|
*
|
|
7278
7278
|
* @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width
|
|
7279
7279
|
*/
|
|
7280
|
-
borderEndWidth?: ConditionalValue<
|
|
7280
|
+
borderEndWidth?: ConditionalValue<UtilityValues["borderInlineEndWidth"] | CssVars | CssProperties["borderInlineEndWidth"]>
|
|
7281
7281
|
/**
|
|
7282
7282
|
* The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`.
|
|
7283
7283
|
*
|
|
@@ -7366,10 +7366,10 @@ scrollPaddingX?: ConditionalValue<WithEscapeHatch<UtilityValues["scrollPaddingIn
|
|
|
7366
7366
|
focusVisibleRing?: ConditionalValue<UtilityValues["focusVisibleRing"] | CssVars | CssProperties["focusVisibleRing"]>
|
|
7367
7367
|
focusRingColor?: ConditionalValue<WithEscapeHatch<UtilityValues["focusRingColor"] | CssVars>>
|
|
7368
7368
|
focusRingOffset?: ConditionalValue<WithEscapeHatch<UtilityValues["focusRingOffset"] | CssVars>>
|
|
7369
|
-
focusRingWidth?: ConditionalValue<
|
|
7369
|
+
focusRingWidth?: ConditionalValue<UtilityValues["focusRingWidth"] | CssVars | CssProperties["focusRingWidth"]>
|
|
7370
7370
|
focusRingStyle?: ConditionalValue<string | number | CssProperties["focusRingStyle"]>
|
|
7371
|
-
divideX?: ConditionalValue<
|
|
7372
|
-
divideY?: ConditionalValue<
|
|
7371
|
+
divideX?: ConditionalValue<UtilityValues["divideX"] | CssVars | CssProperties["divideX"]>
|
|
7372
|
+
divideY?: ConditionalValue<UtilityValues["divideY"] | CssVars | CssProperties["divideY"]>
|
|
7373
7373
|
divideColor?: ConditionalValue<WithEscapeHatch<UtilityValues["divideColor"] | CssVars>>
|
|
7374
7374
|
divideStyle?: ConditionalValue<string | number | CssProperties["divideStyle"]>
|
|
7375
7375
|
boxSize?: ConditionalValue<UtilityValues["boxSize"] | CssVars | CssProperties["boxSize"]>
|
package/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"name": "@likec4/styles",
|
|
3
3
|
"description": "Shared PandaCSS preset and generated styles, used in LikeC4",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.49.0",
|
|
6
6
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
7
7
|
"homepage": "https://likec4.dev",
|
|
8
8
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.mjs",
|
|
13
13
|
"**/package.json",
|
|
14
14
|
"!build.config.ts"
|
|
15
15
|
],
|
|
@@ -23,8 +23,6 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
|
-
"types": "dist/types/index.d.mts",
|
|
27
|
-
"module": "dist/types/index.mjs",
|
|
28
26
|
"sideEffects": false,
|
|
29
27
|
"exports": {
|
|
30
28
|
".": {
|
|
@@ -60,58 +58,55 @@
|
|
|
60
58
|
"default": "./dist/recipes/index.mjs"
|
|
61
59
|
},
|
|
62
60
|
"./preset": {
|
|
63
|
-
"
|
|
64
|
-
"default":
|
|
61
|
+
"sources": "./preset.ts",
|
|
62
|
+
"default": {
|
|
63
|
+
"types": "./preset/preset.d.mts",
|
|
64
|
+
"default": "./preset/preset.mjs"
|
|
65
|
+
}
|
|
65
66
|
},
|
|
66
67
|
"./vars": {
|
|
67
|
-
"
|
|
68
|
-
"default":
|
|
68
|
+
"sources": "./vars.ts",
|
|
69
|
+
"default": {
|
|
70
|
+
"types": "./vars/vars.d.mts",
|
|
71
|
+
"default": "./vars/vars.mjs"
|
|
72
|
+
}
|
|
69
73
|
},
|
|
70
74
|
"./dev": {
|
|
71
75
|
"types": "./dev.d.mts",
|
|
72
76
|
"default": "./dev.mjs"
|
|
73
77
|
}
|
|
74
78
|
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"@pandacss/types": "^1.8.1"
|
|
81
|
+
},
|
|
75
82
|
"peerDependencies": {
|
|
76
83
|
"@pandacss/dev": "^1.8.1",
|
|
77
|
-
"
|
|
78
|
-
"react": "^18.x || ^19.x",
|
|
79
|
-
"react-dom": "^18.x || ^19.x",
|
|
80
|
-
"@types/react": "^18.x || ^19.x",
|
|
81
|
-
"@types/react-dom": "^18.x || ^19.x"
|
|
84
|
+
"react": "^18.x || ^19.x"
|
|
82
85
|
},
|
|
83
86
|
"peerDependenciesMeta": {
|
|
84
|
-
"
|
|
85
|
-
"optional": true
|
|
86
|
-
},
|
|
87
|
-
"react-dom": {
|
|
87
|
+
"@pandacss/dev": {
|
|
88
88
|
"optional": true
|
|
89
89
|
},
|
|
90
|
-
"
|
|
91
|
-
"optional": true
|
|
92
|
-
},
|
|
93
|
-
"@types/react-dom": {
|
|
90
|
+
"react": {
|
|
94
91
|
"optional": true
|
|
95
92
|
}
|
|
96
93
|
},
|
|
97
94
|
"devDependencies": {
|
|
98
|
-
"@types/node": "~22.19.
|
|
95
|
+
"@types/node": "~22.19.10",
|
|
99
96
|
"@pandabox/panda-plugins": "^0.0.8",
|
|
100
97
|
"@pandabox/utils": "^0.0.5",
|
|
101
98
|
"@pandabox/unplugin": "^0.2.2",
|
|
102
99
|
"@pandacss/dev": "^1.8.1",
|
|
103
|
-
"@pandacss/types": "^1.8.1",
|
|
104
100
|
"@types/picomatch": "^4.0.2",
|
|
105
|
-
"@types/react": "19.2.
|
|
106
|
-
"@types/react-dom": "19.2.3",
|
|
101
|
+
"@types/react": "19.2.13",
|
|
107
102
|
"postcss": "8.5.6",
|
|
108
|
-
"remeda": "^2.
|
|
103
|
+
"remeda": "^2.33.5",
|
|
109
104
|
"nano-spawn": "^2.0.0",
|
|
110
|
-
"obuild": "^0.4.
|
|
105
|
+
"obuild": "^0.4.27",
|
|
111
106
|
"typescript": "5.9.3",
|
|
107
|
+
"@likec4/style-preset": "1.49.0",
|
|
112
108
|
"@likec4/devops": "1.42.0",
|
|
113
|
-
"@likec4/tsconfig": "1.
|
|
114
|
-
"@likec4/style-preset": "1.48.0"
|
|
109
|
+
"@likec4/tsconfig": "1.49.0"
|
|
115
110
|
},
|
|
116
111
|
"scripts": {
|
|
117
112
|
"typecheck": "tsc --noEmit",
|
|
@@ -120,5 +115,7 @@
|
|
|
120
115
|
"clean": "likec4ops clean",
|
|
121
116
|
"pack": "pnpm pack",
|
|
122
117
|
"lint:package": "pnpx publint ./package.tgz"
|
|
123
|
-
}
|
|
118
|
+
},
|
|
119
|
+
"types": "dist/types/index.d.mts",
|
|
120
|
+
"module": "dist/types/index.mjs"
|
|
124
121
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { t as __exportAll } from "../../rolldown-runtime.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@radix-ui+colors@3.0.0/node_modules/@radix-ui/colors/index.mjs
|
|
4
2
|
var colors_exports = /* @__PURE__ */ __exportAll({
|
|
5
3
|
amber: () => amber,
|
|
6
4
|
amberA: () => amberA,
|
|
@@ -3783,6 +3781,4 @@ const whiteP3A = {
|
|
|
3783
3781
|
whiteA11: "color(display-p3 1 1 1 / 0.9)",
|
|
3784
3782
|
whiteA12: "color(display-p3 1 1 1 / 0.95)"
|
|
3785
3783
|
};
|
|
3786
|
-
|
|
3787
|
-
//#endregion
|
|
3788
|
-
export { colors_exports as t };
|
|
3784
|
+
export { grass as a, orange as c, red as d, ruby as f, yellow as g, violet as h, crimson as i, pink as l, tomato as m, blue as n, indigo as o, teal as p, colors_exports as r, lime as s, amber as t, purple as u };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { r as colors_exports } from "./@radix-ui/colors.mjs";
|
|
2
|
+
import { definePreset } from "@pandacss/dev";
|
|
3
|
+
var SCALE_TAGS_REGEX = new RegExp(`(${["P3"].join("|")})|(?=[A-Z0-9])`, "g");
|
|
4
|
+
function getScaleTags(fullName) {
|
|
5
|
+
return fullName.split(SCALE_TAGS_REGEX).filter(Boolean).map((x) => x.toLowerCase());
|
|
6
|
+
}
|
|
7
|
+
function getScalePath(tags) {
|
|
8
|
+
return tags.join(".");
|
|
9
|
+
}
|
|
10
|
+
function isScaleAlpha(tags) {
|
|
11
|
+
return tags.includes("a");
|
|
12
|
+
}
|
|
13
|
+
function isScaleDark(tags) {
|
|
14
|
+
return tags.includes("dark");
|
|
15
|
+
}
|
|
16
|
+
function isScaleP3(tags) {
|
|
17
|
+
return tags.includes("p3");
|
|
18
|
+
}
|
|
19
|
+
function getScaleName(tags) {
|
|
20
|
+
return tags[0];
|
|
21
|
+
}
|
|
22
|
+
function getScaleShades(value) {
|
|
23
|
+
return Object.assign({}, ...Object.values(value).map((shade, i) => ({ [++i]: shade })));
|
|
24
|
+
}
|
|
25
|
+
function getScales(lightPrefix) {
|
|
26
|
+
return Object.entries(colors_exports).map(([fullName, value]) => {
|
|
27
|
+
const tags = getScaleTags(fullName);
|
|
28
|
+
const dark = isScaleDark(tags);
|
|
29
|
+
if (!dark && lightPrefix) tags.splice(1, 0, "light");
|
|
30
|
+
return {
|
|
31
|
+
fullName,
|
|
32
|
+
tags,
|
|
33
|
+
name: getScaleName(tags),
|
|
34
|
+
path: getScalePath(tags),
|
|
35
|
+
dark,
|
|
36
|
+
alpha: isScaleAlpha(tags),
|
|
37
|
+
p3: isScaleP3(tags),
|
|
38
|
+
shades: getScaleShades(value)
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function keysToObj(keys, value) {
|
|
43
|
+
if (keys.length === 0) return value;
|
|
44
|
+
const key = keys[0];
|
|
45
|
+
const obj = keysToObj(keys.slice(1), value);
|
|
46
|
+
return { [key]: obj };
|
|
47
|
+
}
|
|
48
|
+
function isObject(value) {
|
|
49
|
+
return value !== null && value !== void 0 && typeof value === "object" && !Array.isArray(value);
|
|
50
|
+
}
|
|
51
|
+
function mergeObjs(target, ...sources) {
|
|
52
|
+
if (!sources.length) return target;
|
|
53
|
+
const source = sources.shift();
|
|
54
|
+
if (isObject(target) && isObject(source)) for (const key in source) if (isObject(source[key])) {
|
|
55
|
+
if (!target[key]) Object.assign(target, { [key]: {} });
|
|
56
|
+
mergeObjs(target[key], source[key]);
|
|
57
|
+
} else Object.assign(target, { [key]: source[key] });
|
|
58
|
+
return mergeObjs(target, ...sources);
|
|
59
|
+
}
|
|
60
|
+
function findDarkScale(scale, scales) {
|
|
61
|
+
return scales.find((x) => x.name === scale.name && x.alpha === scale.alpha && x.p3 === scale.p3 && x.dark);
|
|
62
|
+
}
|
|
63
|
+
function findP3Scale(scale, scales) {
|
|
64
|
+
return scales.find((x) => x.name === scale.name && x.alpha === scale.alpha && x.dark === scale.dark && x.p3);
|
|
65
|
+
}
|
|
66
|
+
function findLightScale(scale, scales) {
|
|
67
|
+
return scales.find((x) => x.name === scale.name && x.alpha === scale.alpha && x.dark === scale.dark && x.p3 === scale.p3 && x.tags.includes("light"));
|
|
68
|
+
}
|
|
69
|
+
function findRelatedScales(scale, scales, enableDarkMode, enableAutoP3) {
|
|
70
|
+
const result = { current: scale };
|
|
71
|
+
if (enableDarkMode && !scale.dark && !scale.tags.includes("light")) result.dark = findDarkScale(scale, scales);
|
|
72
|
+
if (!result.dark && enableAutoP3 && !scale.p3) result.p3 = findP3Scale(scale, scales);
|
|
73
|
+
if (result.dark) result.light = scale.tags.includes("light") ? scale : findLightScale(scale, scales);
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
function buildTokenValue(shade, shadeIndex, relatedScales) {
|
|
77
|
+
if (relatedScales.dark) return {
|
|
78
|
+
base: `{colors.${relatedScales.light?.path}.${shadeIndex}}`,
|
|
79
|
+
_dark: `{colors.${relatedScales.dark.path}.${shadeIndex}}`
|
|
80
|
+
};
|
|
81
|
+
if (relatedScales.p3) return {
|
|
82
|
+
base: shade,
|
|
83
|
+
_p3: `{colors.${relatedScales.p3.path}.${shadeIndex}}`
|
|
84
|
+
};
|
|
85
|
+
return shade;
|
|
86
|
+
}
|
|
87
|
+
function getSemanticTokens(darkMode, autoP3, colorScales = []) {
|
|
88
|
+
let scales = getScales(darkMode);
|
|
89
|
+
if (darkMode) scales = scales.concat(getScales(false).filter((x) => !x.dark));
|
|
90
|
+
const filteredScales = scales.filter((scale) => shouldIncludeScale(scale, colorScales));
|
|
91
|
+
return mergeObjs({}, ...filteredScales.map((scale) => generateScaleTokens(scale, filteredScales, darkMode, autoP3)));
|
|
92
|
+
}
|
|
93
|
+
function shouldIncludeScale(scale, colorScales) {
|
|
94
|
+
if (colorScales.length === 0) return true;
|
|
95
|
+
return colorScales.some((colorScale) => {
|
|
96
|
+
return scale.path === colorScale || scale.path.startsWith(colorScale + ".");
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function generateScaleTokens(scale, allScales, enableDarkMode = false, enableAutoP3 = false) {
|
|
100
|
+
const relatedScales = findRelatedScales(scale, allScales, enableDarkMode, enableAutoP3);
|
|
101
|
+
const mergedShades = mergeObjs({}, ...Object.entries(scale.shades).map(([shadeIndex, color]) => {
|
|
102
|
+
const tokenValue = buildTokenValue(color, shadeIndex, relatedScales);
|
|
103
|
+
return { [shadeIndex]: { value: tokenValue } };
|
|
104
|
+
}));
|
|
105
|
+
return keysToObj(scale.tags, mergedShades);
|
|
106
|
+
}
|
|
107
|
+
var name = "pandacss-preset-radix-colors";
|
|
108
|
+
var DEFAULT_DARK_MODE_CONDITION = ".dark &";
|
|
109
|
+
function getConditions(darkModeCondition) {
|
|
110
|
+
const conditions = {};
|
|
111
|
+
if (darkModeCondition) conditions["dark"] = darkModeCondition;
|
|
112
|
+
conditions["p3"] = "@media (color-gamut: p3)";
|
|
113
|
+
return conditions;
|
|
114
|
+
}
|
|
115
|
+
function normalizeDarkMode(darkModeOption) {
|
|
116
|
+
if (!darkModeOption) return { enabled: false };
|
|
117
|
+
if (typeof darkModeOption === "boolean") return {
|
|
118
|
+
enabled: true,
|
|
119
|
+
condition: DEFAULT_DARK_MODE_CONDITION
|
|
120
|
+
};
|
|
121
|
+
return {
|
|
122
|
+
enabled: darkModeOption.enabled ?? true,
|
|
123
|
+
condition: darkModeOption.condition
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function validateColorScales(colorScales) {
|
|
127
|
+
if (!colorScales || colorScales.length === 0) return;
|
|
128
|
+
const scales = getScales();
|
|
129
|
+
const unmatchedScales = colorScales.filter((colorScale) => {
|
|
130
|
+
return !scales.some((scale) => scale.path === colorScale || scale.path.startsWith(colorScale + "."));
|
|
131
|
+
});
|
|
132
|
+
if (unmatchedScales.length > 0) console.warn(`[pandacss-preset-radix-colors] Color scale paths don't match any available scales: ${unmatchedScales.join(", ")}. Valid examples: "amber", "blue.dark", "gray.p3", "red.dark.a". Available base colors: ${Array.from(new Set(scales.map((s) => s.name))).join(", ")}.`);
|
|
133
|
+
}
|
|
134
|
+
function createPreset(options) {
|
|
135
|
+
const darkModeConfig = normalizeDarkMode(options?.darkMode);
|
|
136
|
+
validateColorScales(options?.colorScales);
|
|
137
|
+
return definePreset({
|
|
138
|
+
name,
|
|
139
|
+
conditions: { extend: getConditions(darkModeConfig.enabled ? darkModeConfig.condition : void 0) },
|
|
140
|
+
theme: { extend: { semanticTokens: { colors: getSemanticTokens(darkModeConfig.enabled, options?.autoP3, options?.colorScales) } } }
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function transformScaleName(scale) {
|
|
144
|
+
return scale.split(/(Dark|P3|A)/).map((x) => x.toLowerCase()).filter(Boolean).join(".");
|
|
145
|
+
}
|
|
146
|
+
Object.keys(colors_exports).filter((scale) => !scale.includes("default")).map(transformScaleName);
|
|
147
|
+
export { createPreset as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js
|
|
2
1
|
function e$3(e, t, n) {
|
|
3
2
|
let r = (n) => e(n, ...t);
|
|
4
3
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -6,39 +5,19 @@ function e$3(e, t, n) {
|
|
|
6
5
|
lazyArgs: t
|
|
7
6
|
});
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
12
8
|
function t$9(t, n, r) {
|
|
13
9
|
let i = t.length - n.length;
|
|
14
10
|
if (i === 0) return t(...n);
|
|
15
11
|
if (i === 1) return e$3(t, n, r);
|
|
16
12
|
throw Error(`Wrong number of arguments`);
|
|
17
13
|
}
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/capitalize-DktTi0gl.js
|
|
21
14
|
function t$8(...t) {
|
|
22
15
|
return t$9(n$6, t);
|
|
23
16
|
}
|
|
24
|
-
const n$6 = (e) => `${e[0]?.toUpperCase() ?? ``}${e.slice(1)}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/utilityEvaluators-DORpnx39.js
|
|
28
|
-
const e$2 = {
|
|
29
|
-
done: !0,
|
|
30
|
-
hasNext: !1
|
|
31
|
-
}, t$7 = {
|
|
17
|
+
const n$6 = (e) => `${e[0]?.toUpperCase() ?? ``}${e.slice(1)}`, t$7 = {
|
|
32
18
|
done: !1,
|
|
33
19
|
hasNext: !1
|
|
34
|
-
}
|
|
35
|
-
hasNext: !0,
|
|
36
|
-
next: e,
|
|
37
|
-
done: !1
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/pipe-jLehR9-P.js
|
|
20
|
+
};
|
|
42
21
|
function t$6(e, ...t) {
|
|
43
22
|
let a = e, o = t.map((e) => `lazy` in e ? r(e) : void 0), s = 0;
|
|
44
23
|
for (; s < t.length;) {
|
|
@@ -87,28 +66,16 @@ function r(e) {
|
|
|
87
66
|
function i(e) {
|
|
88
67
|
return typeof e == `string` || typeof e == `object` && !!e && Symbol.iterator in e;
|
|
89
68
|
}
|
|
90
|
-
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/hasAtLeast-F1Oj_xBB.js
|
|
93
69
|
function t$5(...t) {
|
|
94
70
|
return t$9(n$3, t);
|
|
95
71
|
}
|
|
96
72
|
const n$3 = (e, t) => e.length >= t;
|
|
97
|
-
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/isString-BPlksnnG.js
|
|
100
73
|
function e$1(e) {
|
|
101
74
|
return typeof e == `string`;
|
|
102
75
|
}
|
|
103
|
-
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/keys-CT72t2DB.js
|
|
106
76
|
function t$4(...t) {
|
|
107
77
|
return t$9(Object.keys, t);
|
|
108
78
|
}
|
|
109
|
-
|
|
110
|
-
//#endregion
|
|
111
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/mapKeys-CKFpUwVc.js
|
|
112
79
|
function t$3(...t) {
|
|
113
80
|
return t$9(n$2, t);
|
|
114
81
|
}
|
|
@@ -120,9 +87,6 @@ function n$2(e, t) {
|
|
|
120
87
|
}
|
|
121
88
|
return n;
|
|
122
89
|
}
|
|
123
|
-
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/mapToObj-8STtUbFK.js
|
|
126
90
|
function t$2(...t) {
|
|
127
91
|
return t$9(n$1, t);
|
|
128
92
|
}
|
|
@@ -134,9 +98,6 @@ function n$1(e, t) {
|
|
|
134
98
|
}
|
|
135
99
|
return n;
|
|
136
100
|
}
|
|
137
|
-
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/mapValues-D8ywfrE_.js
|
|
140
101
|
function t$1(...t) {
|
|
141
102
|
return t$9(n, t);
|
|
142
103
|
}
|
|
@@ -145,9 +106,6 @@ function n(e, t) {
|
|
|
145
106
|
for (let [r, i] of Object.entries(e)) n[r] = t(i, r, e);
|
|
146
107
|
return n;
|
|
147
108
|
}
|
|
148
|
-
|
|
149
|
-
//#endregion
|
|
150
|
-
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/prop-Cv_AVBuA.js
|
|
151
109
|
function e(e, ...n) {
|
|
152
110
|
return typeof e == `string` || typeof e == `number` || typeof e == `symbol` ? (r) => t(r, e, ...n) : t(e, ...n);
|
|
153
111
|
}
|
|
@@ -159,6 +117,4 @@ function t(e, ...t) {
|
|
|
159
117
|
}
|
|
160
118
|
return n;
|
|
161
119
|
}
|
|
162
|
-
|
|
163
|
-
//#endregion
|
|
164
|
-
export { t$4 as a, t$6 as c, t$3 as i, t$8 as l, t$1 as n, e$1 as o, t$2 as r, t$5 as s, e as t };
|
|
120
|
+
export { t$4 as a, t$6 as c, t$3 as i, t$8 as l, t$1 as n, e$1 as o, t$2 as r, t$5 as s, e as t };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __exportAll = (all, no_symbols) => {
|
|
3
|
+
let target = {};
|
|
4
|
+
for (var name in all) __defProp(target, name, {
|
|
5
|
+
get: all[name],
|
|
6
|
+
enumerable: true
|
|
7
|
+
});
|
|
8
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
9
|
+
return target;
|
|
10
|
+
};
|
|
11
|
+
export { __exportAll as t };
|
package/preset/package.json
CHANGED