tailwindcss 3.1.3 → 3.1.6
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/CHANGELOG.md +30 -2
- package/defaultTheme.d.ts +2 -1
- package/lib/corePlugins.js +4 -1
- package/lib/lib/defaultExtractor.js +44 -22
- package/lib/lib/evaluateTailwindFunctions.js +47 -15
- package/lib/lib/generateRules.js +5 -1
- package/lib/lib/setupContextUtils.js +6 -0
- package/lib/util/dataTypes.js +1 -3
- package/lib/util/formatVariantSelector.js +3 -2
- package/package.json +8 -8
- package/peers/index.js +286 -123
- package/scripts/generate-types.js +53 -0
- package/scripts/type-utils.js +27 -0
- package/src/corePlugins.js +2 -1
- package/src/lib/defaultExtractor.js +42 -26
- package/src/lib/evaluateTailwindFunctions.js +50 -18
- package/src/lib/generateRules.js +5 -0
- package/src/lib/setupContextUtils.js +11 -0
- package/src/util/dataTypes.js +1 -3
- package/src/util/formatVariantSelector.js +3 -1
- package/types/config.d.ts +7 -5
- package/types/generated/default-theme.d.ts +331 -0
package/peers/index.js
CHANGED
|
@@ -5978,6 +5978,7 @@ var require_core = __commonJS({
|
|
|
5978
5978
|
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
|
|
5979
5979
|
sys: [">= 0.4 && < 0.7", ">= 0.8"],
|
|
5980
5980
|
"node:sys": [">= 14.18 && < 15", ">= 16"],
|
|
5981
|
+
"node:test": ">= 18",
|
|
5981
5982
|
timers: true,
|
|
5982
5983
|
"node:timers": [">= 14.18 && < 15", ">= 16"],
|
|
5983
5984
|
"timers/promises": ">= 15",
|
|
@@ -6092,7 +6093,7 @@ var require_async = __commonJS({
|
|
|
6092
6093
|
var nodeModulesPaths = require_node_modules_paths();
|
|
6093
6094
|
var normalizeOptions = require_normalize_options();
|
|
6094
6095
|
var isCore = require_is_core_module();
|
|
6095
|
-
var realpathFS = fs.realpath && typeof fs.realpath.native === "function" ? fs.realpath.native : fs.realpath;
|
|
6096
|
+
var realpathFS = process.platform !== "win32" && fs.realpath && typeof fs.realpath.native === "function" ? fs.realpath.native : fs.realpath;
|
|
6096
6097
|
var homedir = getHomedir();
|
|
6097
6098
|
var defaultPaths = function() {
|
|
6098
6099
|
return [
|
|
@@ -6525,6 +6526,7 @@ var require_core2 = __commonJS({
|
|
|
6525
6526
|
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
|
|
6526
6527
|
sys: [">= 0.4 && < 0.7", ">= 0.8"],
|
|
6527
6528
|
"node:sys": [">= 14.18 && < 15", ">= 16"],
|
|
6529
|
+
"node:test": ">= 18",
|
|
6528
6530
|
timers: true,
|
|
6529
6531
|
"node:timers": [">= 14.18 && < 15", ">= 16"],
|
|
6530
6532
|
"timers/promises": ">= 15",
|
|
@@ -6647,7 +6649,7 @@ var require_sync = __commonJS({
|
|
|
6647
6649
|
var caller = require_caller();
|
|
6648
6650
|
var nodeModulesPaths = require_node_modules_paths();
|
|
6649
6651
|
var normalizeOptions = require_normalize_options();
|
|
6650
|
-
var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === "function" ? fs.realpathSync.native : fs.realpathSync;
|
|
6652
|
+
var realpathFS = process.platform !== "win32" && fs.realpathSync && typeof fs.realpathSync.native === "function" ? fs.realpathSync.native : fs.realpathSync;
|
|
6651
6653
|
var homedir = getHomedir();
|
|
6652
6654
|
var defaultPaths = function() {
|
|
6653
6655
|
return [
|
|
@@ -25862,6 +25864,155 @@ var require_main = __commonJS({
|
|
|
25862
25864
|
"background-attachment",
|
|
25863
25865
|
"background-color"
|
|
25864
25866
|
],
|
|
25867
|
+
"columns": [
|
|
25868
|
+
"column-width",
|
|
25869
|
+
"column-count"
|
|
25870
|
+
],
|
|
25871
|
+
"column-rule": [
|
|
25872
|
+
"column-rule-width",
|
|
25873
|
+
"column-rule-style",
|
|
25874
|
+
"column-rule-color"
|
|
25875
|
+
],
|
|
25876
|
+
"flex": [
|
|
25877
|
+
"flex-grow",
|
|
25878
|
+
"flex-shrink",
|
|
25879
|
+
"flex-basis"
|
|
25880
|
+
],
|
|
25881
|
+
"flex-flow": [
|
|
25882
|
+
"flex-direction",
|
|
25883
|
+
"flex-wrap"
|
|
25884
|
+
],
|
|
25885
|
+
"font": [
|
|
25886
|
+
"font-style",
|
|
25887
|
+
"font-variant",
|
|
25888
|
+
"font-weight",
|
|
25889
|
+
"font-stretch",
|
|
25890
|
+
"font-size",
|
|
25891
|
+
"font-family",
|
|
25892
|
+
"line-height"
|
|
25893
|
+
],
|
|
25894
|
+
"grid": [
|
|
25895
|
+
"grid-template-rows",
|
|
25896
|
+
"grid-template-columns",
|
|
25897
|
+
"grid-template-areas",
|
|
25898
|
+
"grid-auto-rows",
|
|
25899
|
+
"grid-auto-columns",
|
|
25900
|
+
"grid-auto-flow",
|
|
25901
|
+
"column-gap",
|
|
25902
|
+
"row-gap"
|
|
25903
|
+
],
|
|
25904
|
+
"grid-area": [
|
|
25905
|
+
"grid-row-start",
|
|
25906
|
+
"grid-column-start",
|
|
25907
|
+
"grid-row-end",
|
|
25908
|
+
"grid-column-end"
|
|
25909
|
+
],
|
|
25910
|
+
"grid-column": [
|
|
25911
|
+
"grid-column-start",
|
|
25912
|
+
"grid-column-end"
|
|
25913
|
+
],
|
|
25914
|
+
"grid-row": [
|
|
25915
|
+
"grid-row-start",
|
|
25916
|
+
"grid-row-end"
|
|
25917
|
+
],
|
|
25918
|
+
"grid-template": [
|
|
25919
|
+
"grid-template-columns",
|
|
25920
|
+
"grid-template-rows",
|
|
25921
|
+
"grid-template-areas"
|
|
25922
|
+
],
|
|
25923
|
+
"list-style": [
|
|
25924
|
+
"list-style-type",
|
|
25925
|
+
"list-style-position",
|
|
25926
|
+
"list-style-image"
|
|
25927
|
+
],
|
|
25928
|
+
"padding": [
|
|
25929
|
+
"padding-block",
|
|
25930
|
+
"padding-block-start",
|
|
25931
|
+
"padding-block-end",
|
|
25932
|
+
"padding-inline",
|
|
25933
|
+
"padding-inline-start",
|
|
25934
|
+
"padding-inline-end",
|
|
25935
|
+
"padding-top",
|
|
25936
|
+
"padding-right",
|
|
25937
|
+
"padding-bottom",
|
|
25938
|
+
"padding-left"
|
|
25939
|
+
],
|
|
25940
|
+
"padding-block": [
|
|
25941
|
+
"padding-block-start",
|
|
25942
|
+
"padding-block-end",
|
|
25943
|
+
"padding-top",
|
|
25944
|
+
"padding-right",
|
|
25945
|
+
"padding-bottom",
|
|
25946
|
+
"padding-left"
|
|
25947
|
+
],
|
|
25948
|
+
"padding-block-start": [
|
|
25949
|
+
"padding-top",
|
|
25950
|
+
"padding-right",
|
|
25951
|
+
"padding-left"
|
|
25952
|
+
],
|
|
25953
|
+
"padding-block-end": [
|
|
25954
|
+
"padding-right",
|
|
25955
|
+
"padding-bottom",
|
|
25956
|
+
"padding-left"
|
|
25957
|
+
],
|
|
25958
|
+
"padding-inline": [
|
|
25959
|
+
"padding-inline-start",
|
|
25960
|
+
"padding-inline-end",
|
|
25961
|
+
"padding-top",
|
|
25962
|
+
"padding-right",
|
|
25963
|
+
"padding-bottom",
|
|
25964
|
+
"padding-left"
|
|
25965
|
+
],
|
|
25966
|
+
"padding-inline-start": [
|
|
25967
|
+
"padding-top",
|
|
25968
|
+
"padding-right",
|
|
25969
|
+
"padding-left"
|
|
25970
|
+
],
|
|
25971
|
+
"padding-inline-end": [
|
|
25972
|
+
"padding-right",
|
|
25973
|
+
"padding-bottom",
|
|
25974
|
+
"padding-left"
|
|
25975
|
+
],
|
|
25976
|
+
"margin": [
|
|
25977
|
+
"margin-block",
|
|
25978
|
+
"margin-block-start",
|
|
25979
|
+
"margin-block-end",
|
|
25980
|
+
"margin-inline",
|
|
25981
|
+
"margin-inline-start",
|
|
25982
|
+
"margin-inline-end",
|
|
25983
|
+
"margin-top",
|
|
25984
|
+
"margin-right",
|
|
25985
|
+
"margin-bottom",
|
|
25986
|
+
"margin-left"
|
|
25987
|
+
],
|
|
25988
|
+
"margin-block": [
|
|
25989
|
+
"margin-block-start",
|
|
25990
|
+
"margin-block-end",
|
|
25991
|
+
"margin-top",
|
|
25992
|
+
"margin-right",
|
|
25993
|
+
"margin-bottom",
|
|
25994
|
+
"margin-left"
|
|
25995
|
+
],
|
|
25996
|
+
"margin-inline": [
|
|
25997
|
+
"margin-inline-start",
|
|
25998
|
+
"margin-inline-end",
|
|
25999
|
+
"margin-top",
|
|
26000
|
+
"margin-right",
|
|
26001
|
+
"margin-bottom",
|
|
26002
|
+
"margin-left"
|
|
26003
|
+
],
|
|
26004
|
+
"margin-inline-start": [
|
|
26005
|
+
"margin-top",
|
|
26006
|
+
"margin-right",
|
|
26007
|
+
"margin-bottom",
|
|
26008
|
+
"margin-left"
|
|
26009
|
+
],
|
|
26010
|
+
"margin-inline-end": [
|
|
26011
|
+
"margin-top",
|
|
26012
|
+
"margin-right",
|
|
26013
|
+
"margin-bottom",
|
|
26014
|
+
"margin-left"
|
|
26015
|
+
],
|
|
25865
26016
|
"border": [
|
|
25866
26017
|
"border-top",
|
|
25867
26018
|
"border-right",
|
|
@@ -25881,7 +26032,19 @@ var require_main = __commonJS({
|
|
|
25881
26032
|
"border-top-color",
|
|
25882
26033
|
"border-right-color",
|
|
25883
26034
|
"border-bottom-color",
|
|
25884
|
-
"border-left-color"
|
|
26035
|
+
"border-left-color",
|
|
26036
|
+
"border-block",
|
|
26037
|
+
"border-block-start",
|
|
26038
|
+
"border-block-end",
|
|
26039
|
+
"border-block-width",
|
|
26040
|
+
"border-block-style",
|
|
26041
|
+
"border-block-color",
|
|
26042
|
+
"border-inline",
|
|
26043
|
+
"border-inline-start",
|
|
26044
|
+
"border-inline-end",
|
|
26045
|
+
"border-inline-width",
|
|
26046
|
+
"border-inline-style",
|
|
26047
|
+
"border-inline-color"
|
|
25885
26048
|
],
|
|
25886
26049
|
"border-top": [
|
|
25887
26050
|
"border-width",
|
|
@@ -25939,99 +26102,64 @@ var require_main = __commonJS({
|
|
|
25939
26102
|
"border-bottom-right-radius",
|
|
25940
26103
|
"border-bottom-left-radius"
|
|
25941
26104
|
],
|
|
26105
|
+
"border-block": [
|
|
26106
|
+
"border-block-start",
|
|
26107
|
+
"border-block-end",
|
|
26108
|
+
"border-block-width",
|
|
26109
|
+
"border-width",
|
|
26110
|
+
"border-block-style",
|
|
26111
|
+
"border-style",
|
|
26112
|
+
"border-block-color",
|
|
26113
|
+
"border-color"
|
|
26114
|
+
],
|
|
25942
26115
|
"border-block-start": [
|
|
25943
26116
|
"border-block-start-width",
|
|
26117
|
+
"border-width",
|
|
25944
26118
|
"border-block-start-style",
|
|
25945
|
-
"border-
|
|
26119
|
+
"border-style",
|
|
26120
|
+
"border-block-start-color",
|
|
26121
|
+
"border-color"
|
|
25946
26122
|
],
|
|
25947
26123
|
"border-block-end": [
|
|
25948
26124
|
"border-block-end-width",
|
|
26125
|
+
"border-width",
|
|
25949
26126
|
"border-block-end-style",
|
|
25950
|
-
"border-
|
|
26127
|
+
"border-style",
|
|
26128
|
+
"border-block-end-color",
|
|
26129
|
+
"border-color"
|
|
25951
26130
|
],
|
|
25952
|
-
"border-
|
|
25953
|
-
"border-
|
|
25954
|
-
"border-
|
|
25955
|
-
"border-
|
|
25956
|
-
"border-
|
|
25957
|
-
"border-
|
|
26131
|
+
"border-inline": [
|
|
26132
|
+
"border-inline-start",
|
|
26133
|
+
"border-inline-end",
|
|
26134
|
+
"border-inline-width",
|
|
26135
|
+
"border-width",
|
|
26136
|
+
"border-inline-style",
|
|
26137
|
+
"border-style",
|
|
26138
|
+
"border-inline-color",
|
|
26139
|
+
"border-color"
|
|
25958
26140
|
],
|
|
25959
26141
|
"border-inline-start": [
|
|
25960
26142
|
"border-inline-start-width",
|
|
26143
|
+
"border-width",
|
|
25961
26144
|
"border-inline-start-style",
|
|
25962
|
-
"border-
|
|
26145
|
+
"border-style",
|
|
26146
|
+
"border-inline-start-color",
|
|
26147
|
+
"border-color"
|
|
25963
26148
|
],
|
|
25964
26149
|
"border-inline-end": [
|
|
25965
26150
|
"border-inline-end-width",
|
|
26151
|
+
"border-width",
|
|
25966
26152
|
"border-inline-end-style",
|
|
25967
|
-
"border-
|
|
25968
|
-
|
|
25969
|
-
|
|
25970
|
-
"column-width",
|
|
25971
|
-
"column-count"
|
|
25972
|
-
],
|
|
25973
|
-
"column-rule": [
|
|
25974
|
-
"column-rule-width",
|
|
25975
|
-
"column-rule-style",
|
|
25976
|
-
"column-rule-color"
|
|
25977
|
-
],
|
|
25978
|
-
"flex": [
|
|
25979
|
-
"flex-grow",
|
|
25980
|
-
"flex-shrink",
|
|
25981
|
-
"flex-basis"
|
|
25982
|
-
],
|
|
25983
|
-
"flex-flow": [
|
|
25984
|
-
"flex-direction",
|
|
25985
|
-
"flex-wrap"
|
|
25986
|
-
],
|
|
25987
|
-
"font": [
|
|
25988
|
-
"font-style",
|
|
25989
|
-
"font-variant",
|
|
25990
|
-
"font-weight",
|
|
25991
|
-
"font-stretch",
|
|
25992
|
-
"font-size",
|
|
25993
|
-
"font-family",
|
|
25994
|
-
"line-height"
|
|
25995
|
-
],
|
|
25996
|
-
"grid": [
|
|
25997
|
-
"grid-template-rows",
|
|
25998
|
-
"grid-template-columns",
|
|
25999
|
-
"grid-template-areas",
|
|
26000
|
-
"grid-auto-rows",
|
|
26001
|
-
"grid-auto-columns",
|
|
26002
|
-
"grid-auto-flow",
|
|
26003
|
-
"column-gap",
|
|
26004
|
-
"row-gap"
|
|
26005
|
-
],
|
|
26006
|
-
"grid-area": [
|
|
26007
|
-
"grid-row-start",
|
|
26008
|
-
"grid-column-start",
|
|
26009
|
-
"grid-row-end",
|
|
26010
|
-
"grid-column-end"
|
|
26011
|
-
],
|
|
26012
|
-
"grid-column": [
|
|
26013
|
-
"grid-column-start",
|
|
26014
|
-
"grid-column-end"
|
|
26015
|
-
],
|
|
26016
|
-
"grid-row": [
|
|
26017
|
-
"grid-row-start",
|
|
26018
|
-
"grid-row-end"
|
|
26019
|
-
],
|
|
26020
|
-
"grid-template": [
|
|
26021
|
-
"grid-template-columns",
|
|
26022
|
-
"grid-template-rows",
|
|
26023
|
-
"grid-template-areas"
|
|
26024
|
-
],
|
|
26025
|
-
"list-style": [
|
|
26026
|
-
"list-style-type",
|
|
26027
|
-
"list-style-position",
|
|
26028
|
-
"list-style-image"
|
|
26153
|
+
"border-style",
|
|
26154
|
+
"border-inline-end-color",
|
|
26155
|
+
"border-color"
|
|
26029
26156
|
],
|
|
26030
|
-
"
|
|
26031
|
-
"
|
|
26032
|
-
"
|
|
26033
|
-
"
|
|
26034
|
-
"
|
|
26157
|
+
"border-image": [
|
|
26158
|
+
"border-image-source",
|
|
26159
|
+
"border-image-slice",
|
|
26160
|
+
"border-image-width",
|
|
26161
|
+
"border-image-outset",
|
|
26162
|
+
"border-image-repeat"
|
|
26035
26163
|
],
|
|
26036
26164
|
"mask": [
|
|
26037
26165
|
"mask-image",
|
|
@@ -26043,6 +26171,50 @@ var require_main = __commonJS({
|
|
|
26043
26171
|
"mask-clip",
|
|
26044
26172
|
"mask-composite"
|
|
26045
26173
|
],
|
|
26174
|
+
"inline-size": [
|
|
26175
|
+
"width",
|
|
26176
|
+
"height"
|
|
26177
|
+
],
|
|
26178
|
+
"block-size": [
|
|
26179
|
+
"width",
|
|
26180
|
+
"height"
|
|
26181
|
+
],
|
|
26182
|
+
"max-inline-size": [
|
|
26183
|
+
"max-width",
|
|
26184
|
+
"max-height"
|
|
26185
|
+
],
|
|
26186
|
+
"max-block-size": [
|
|
26187
|
+
"max-width",
|
|
26188
|
+
"max-height"
|
|
26189
|
+
],
|
|
26190
|
+
"inset": [
|
|
26191
|
+
"inset-block",
|
|
26192
|
+
"inset-block-start",
|
|
26193
|
+
"inset-block-end",
|
|
26194
|
+
"inset-inline",
|
|
26195
|
+
"inset-inline-start",
|
|
26196
|
+
"inset-inline-end",
|
|
26197
|
+
"top",
|
|
26198
|
+
"right",
|
|
26199
|
+
"bottom",
|
|
26200
|
+
"left"
|
|
26201
|
+
],
|
|
26202
|
+
"inset-block": [
|
|
26203
|
+
"inset-block-start",
|
|
26204
|
+
"inset-block-end",
|
|
26205
|
+
"top",
|
|
26206
|
+
"right",
|
|
26207
|
+
"bottom",
|
|
26208
|
+
"left"
|
|
26209
|
+
],
|
|
26210
|
+
"inset-inline": [
|
|
26211
|
+
"inset-inline-start",
|
|
26212
|
+
"inset-inline-end",
|
|
26213
|
+
"top",
|
|
26214
|
+
"right",
|
|
26215
|
+
"bottom",
|
|
26216
|
+
"left"
|
|
26217
|
+
],
|
|
26046
26218
|
"outline": [
|
|
26047
26219
|
"outline-color",
|
|
26048
26220
|
"outline-style",
|
|
@@ -26052,28 +26224,6 @@ var require_main = __commonJS({
|
|
|
26052
26224
|
"overflow-x",
|
|
26053
26225
|
"overflow-y"
|
|
26054
26226
|
],
|
|
26055
|
-
"padding": [
|
|
26056
|
-
"padding-top",
|
|
26057
|
-
"padding-right",
|
|
26058
|
-
"padding-bottom",
|
|
26059
|
-
"padding-left"
|
|
26060
|
-
],
|
|
26061
|
-
"padding-inline": [
|
|
26062
|
-
"padding-inline-start",
|
|
26063
|
-
"padding-inline-end"
|
|
26064
|
-
],
|
|
26065
|
-
"padding-inline-start": [
|
|
26066
|
-
"padding-top",
|
|
26067
|
-
"padding-right",
|
|
26068
|
-
"padding-bottom",
|
|
26069
|
-
"padding-left"
|
|
26070
|
-
],
|
|
26071
|
-
"padding-inline-end": [
|
|
26072
|
-
"padding-top",
|
|
26073
|
-
"padding-right",
|
|
26074
|
-
"padding-bottom",
|
|
26075
|
-
"padding-left"
|
|
26076
|
-
],
|
|
26077
26227
|
"place-content": [
|
|
26078
26228
|
"align-content",
|
|
26079
26229
|
"justify-content"
|
|
@@ -26355,6 +26505,7 @@ var require_main = __commonJS({
|
|
|
26355
26505
|
"columns",
|
|
26356
26506
|
"contain",
|
|
26357
26507
|
"content",
|
|
26508
|
+
"content-visibility",
|
|
26358
26509
|
"counter-increment",
|
|
26359
26510
|
"counter-reset",
|
|
26360
26511
|
"counter-set",
|
|
@@ -26413,6 +26564,7 @@ var require_main = __commonJS({
|
|
|
26413
26564
|
"height",
|
|
26414
26565
|
"hyphenate-character",
|
|
26415
26566
|
"hyphens",
|
|
26567
|
+
"image-orientation",
|
|
26416
26568
|
"image-rendering",
|
|
26417
26569
|
"inline-size",
|
|
26418
26570
|
"inset",
|
|
@@ -26699,6 +26851,7 @@ var require_main = __commonJS({
|
|
|
26699
26851
|
"perspective-origin",
|
|
26700
26852
|
"appearance",
|
|
26701
26853
|
"visibility",
|
|
26854
|
+
"content-visibility",
|
|
26702
26855
|
"opacity",
|
|
26703
26856
|
"z-index",
|
|
26704
26857
|
"paint-order",
|
|
@@ -26853,6 +27006,7 @@ var require_main = __commonJS({
|
|
|
26853
27006
|
"padding-block",
|
|
26854
27007
|
"padding-block-start",
|
|
26855
27008
|
"padding-block-end",
|
|
27009
|
+
"image-orientation",
|
|
26856
27010
|
"image-rendering",
|
|
26857
27011
|
"aspect-ratio",
|
|
26858
27012
|
"width",
|
|
@@ -27004,6 +27158,7 @@ var require_main = __commonJS({
|
|
|
27004
27158
|
"display",
|
|
27005
27159
|
"appearance",
|
|
27006
27160
|
"visibility",
|
|
27161
|
+
"content-visibility",
|
|
27007
27162
|
"z-index",
|
|
27008
27163
|
"paint-order",
|
|
27009
27164
|
"position",
|
|
@@ -27303,6 +27458,7 @@ var require_main = __commonJS({
|
|
|
27303
27458
|
"cursor",
|
|
27304
27459
|
"empty-cells",
|
|
27305
27460
|
"filter",
|
|
27461
|
+
"image-orientation",
|
|
27306
27462
|
"image-rendering",
|
|
27307
27463
|
"mask",
|
|
27308
27464
|
"mask-border",
|
|
@@ -27484,7 +27640,7 @@ var require_src2 = __commonJS({
|
|
|
27484
27640
|
node.remove();
|
|
27485
27641
|
return;
|
|
27486
27642
|
}
|
|
27487
|
-
if (node.raws.between) {
|
|
27643
|
+
if (typeof node.raws.between === "string") {
|
|
27488
27644
|
node.raws.between = replaceComments(node.raws.between, list.space);
|
|
27489
27645
|
}
|
|
27490
27646
|
if (node.type === "decl") {
|
|
@@ -73215,11 +73371,12 @@ var require_src11 = __commonJS({
|
|
|
73215
73371
|
...grid,
|
|
73216
73372
|
...columnRules
|
|
73217
73373
|
]);
|
|
73374
|
+
var variableFunctions = /* @__PURE__ */ new Set(["var", "env", "constant"]);
|
|
73218
73375
|
function isVariableFunctionNode(node) {
|
|
73219
73376
|
if (node.type !== "function") {
|
|
73220
73377
|
return false;
|
|
73221
73378
|
}
|
|
73222
|
-
return
|
|
73379
|
+
return variableFunctions.has(node.value.toLowerCase());
|
|
73223
73380
|
}
|
|
73224
73381
|
function shouldAbort(parsed) {
|
|
73225
73382
|
let abort = false;
|
|
@@ -73386,15 +73543,17 @@ var require_src12 = __commonJS({
|
|
|
73386
73543
|
}
|
|
73387
73544
|
return;
|
|
73388
73545
|
}
|
|
73389
|
-
const uniques = /* @__PURE__ */ new Set();
|
|
73390
73546
|
selector.walk((child) => {
|
|
73391
|
-
if (child.type === "selector") {
|
|
73392
|
-
const
|
|
73393
|
-
|
|
73394
|
-
|
|
73395
|
-
|
|
73396
|
-
|
|
73397
|
-
|
|
73547
|
+
if (child.type === "selector" && child.parent) {
|
|
73548
|
+
const uniques = /* @__PURE__ */ new Set();
|
|
73549
|
+
child.parent.each((sibling) => {
|
|
73550
|
+
const siblingStr = String(sibling);
|
|
73551
|
+
if (!uniques.has(siblingStr)) {
|
|
73552
|
+
uniques.add(siblingStr);
|
|
73553
|
+
} else {
|
|
73554
|
+
sibling.remove();
|
|
73555
|
+
}
|
|
73556
|
+
});
|
|
73398
73557
|
}
|
|
73399
73558
|
});
|
|
73400
73559
|
if (pseudoElements.has(value)) {
|
|
@@ -75163,7 +75322,7 @@ var require_parseWsc = __commonJS({
|
|
|
75163
75322
|
var { list } = require_postcss();
|
|
75164
75323
|
var { isWidth, isStyle, isColor } = require_validateWsc();
|
|
75165
75324
|
var none = /^\s*(none|medium)(\s+none(\s+(none|currentcolor))?)?\s*$/i;
|
|
75166
|
-
var varRE = /--(\w
|
|
75325
|
+
var varRE = /--(\w|-|[^\x00-\x7F])+/g;
|
|
75167
75326
|
var toLower = (v) => {
|
|
75168
75327
|
let match;
|
|
75169
75328
|
let lastIndex = 0;
|
|
@@ -76246,11 +76405,12 @@ var require_src21 = __commonJS({
|
|
|
76246
76405
|
function isCommaNode(node) {
|
|
76247
76406
|
return node.type === "div" && node.value === ",";
|
|
76248
76407
|
}
|
|
76408
|
+
var variableFunctions = /* @__PURE__ */ new Set(["var", "env", "constant"]);
|
|
76249
76409
|
function isVariableFunctionNode(node) {
|
|
76250
76410
|
if (node.type !== "function") {
|
|
76251
76411
|
return false;
|
|
76252
76412
|
}
|
|
76253
|
-
return
|
|
76413
|
+
return variableFunctions.has(node.value.toLowerCase());
|
|
76254
76414
|
}
|
|
76255
76415
|
function transform(value) {
|
|
76256
76416
|
const parsed = valueParser(value);
|
|
@@ -76531,7 +76691,7 @@ var require_src22 = __commonJS({
|
|
|
76531
76691
|
}
|
|
76532
76692
|
function intersect(a, b, not) {
|
|
76533
76693
|
return a.filter((c) => {
|
|
76534
|
-
const index =
|
|
76694
|
+
const index = indexOfDeclaration(b, c) !== -1;
|
|
76535
76695
|
return not ? !index : index;
|
|
76536
76696
|
});
|
|
76537
76697
|
}
|
|
@@ -76549,14 +76709,16 @@ var require_src22 = __commonJS({
|
|
|
76549
76709
|
return false;
|
|
76550
76710
|
}
|
|
76551
76711
|
const parent = sameParent(ruleA, ruleB);
|
|
76552
|
-
|
|
76553
|
-
if (parent && name && name.includes("keyframes")) {
|
|
76712
|
+
if (parent && ruleA.parent && ruleA.parent.type === "atrule" && ruleA.parent.name.includes("keyframes")) {
|
|
76554
76713
|
return false;
|
|
76555
76714
|
}
|
|
76556
76715
|
return parent && (selectors.every(noVendor) || sameVendor(a, b));
|
|
76557
76716
|
}
|
|
76717
|
+
function isDeclaration(node) {
|
|
76718
|
+
return node.type === "decl";
|
|
76719
|
+
}
|
|
76558
76720
|
function getDecls(rule) {
|
|
76559
|
-
return rule.nodes.filter(
|
|
76721
|
+
return rule.nodes.filter(isDeclaration);
|
|
76560
76722
|
}
|
|
76561
76723
|
var joinSelectors = (...rules) => rules.map((s) => s.selector).join();
|
|
76562
76724
|
function ruleLength(...rules) {
|
|
@@ -76673,7 +76835,7 @@ var require_src22 = __commonJS({
|
|
|
76673
76835
|
const secondClone = second.clone();
|
|
76674
76836
|
function moveDecl(callback) {
|
|
76675
76837
|
return (decl) => {
|
|
76676
|
-
if (
|
|
76838
|
+
if (indexOfDeclaration(intersection, decl) !== -1) {
|
|
76677
76839
|
callback.call(this, decl);
|
|
76678
76840
|
}
|
|
76679
76841
|
};
|
|
@@ -76722,12 +76884,12 @@ var require_src22 = __commonJS({
|
|
|
76722
76884
|
}
|
|
76723
76885
|
if (cache.selector === rule.selector) {
|
|
76724
76886
|
const cached = getDecls(cache);
|
|
76725
|
-
rule.walk((
|
|
76726
|
-
if (
|
|
76727
|
-
|
|
76887
|
+
rule.walk((node) => {
|
|
76888
|
+
if (node.type === "decl" && indexOfDeclaration(cached, node) !== -1) {
|
|
76889
|
+
node.remove();
|
|
76728
76890
|
return;
|
|
76729
76891
|
}
|
|
76730
|
-
cache.append(
|
|
76892
|
+
cache.append(node);
|
|
76731
76893
|
});
|
|
76732
76894
|
rule.remove();
|
|
76733
76895
|
return;
|
|
@@ -77058,6 +77220,7 @@ var require_src26 = __commonJS({
|
|
|
77058
77220
|
["top", "0"]
|
|
77059
77221
|
]);
|
|
77060
77222
|
var mathFunctions = /* @__PURE__ */ new Set(["calc", "min", "max", "clamp"]);
|
|
77223
|
+
var variableFunctions = /* @__PURE__ */ new Set(["var", "env", "constant"]);
|
|
77061
77224
|
function isCommaNode(node) {
|
|
77062
77225
|
return node.type === "div" && node.value === ",";
|
|
77063
77226
|
}
|
|
@@ -77065,7 +77228,7 @@ var require_src26 = __commonJS({
|
|
|
77065
77228
|
if (node.type !== "function") {
|
|
77066
77229
|
return false;
|
|
77067
77230
|
}
|
|
77068
|
-
return
|
|
77231
|
+
return variableFunctions.has(node.value.toLowerCase());
|
|
77069
77232
|
}
|
|
77070
77233
|
function isMathFunctionNode(node) {
|
|
77071
77234
|
if (node.type !== "function") {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import prettier from 'prettier'
|
|
2
2
|
import { corePlugins } from '../src/corePlugins'
|
|
3
3
|
import colors from '../src/public/colors'
|
|
4
|
+
import defaultTheme from '../src/public/default-theme'
|
|
4
5
|
import fs from 'fs'
|
|
5
6
|
import path from 'path'
|
|
7
|
+
import * as types from './type-utils'
|
|
6
8
|
|
|
7
9
|
fs.writeFileSync(
|
|
8
10
|
path.join(process.cwd(), 'types', 'generated', 'corePluginList.d.ts'),
|
|
@@ -50,3 +52,54 @@ fs.writeFileSync(
|
|
|
50
52
|
}
|
|
51
53
|
)
|
|
52
54
|
)
|
|
55
|
+
|
|
56
|
+
const defaultThemeTypes = Object.entries(defaultTheme)
|
|
57
|
+
.map(([name, value]) => {
|
|
58
|
+
// Special cases for slightly more accurate types
|
|
59
|
+
if (name === 'keyframes') {
|
|
60
|
+
return [name, `Record<${types.forKeys(value)}, Record<string, CSSDeclarationList>>`]
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (name === 'fontSize') {
|
|
64
|
+
return [name, `Record<${types.forKeys(value)}, [string, { lineHeight: string }]>`]
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// General cases
|
|
68
|
+
if (typeof value === 'string') {
|
|
69
|
+
return [name, `string`]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (typeof value === 'function') {
|
|
73
|
+
return [name, null]
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (typeof value === 'object') {
|
|
77
|
+
if (Object.keys(value).length === 0) {
|
|
78
|
+
return [name, null]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return [name, types.forValue(value)]
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return [name, `unknown`]
|
|
85
|
+
})
|
|
86
|
+
.filter(([, type]) => type !== null)
|
|
87
|
+
.map(([name, type]) => `${name}: ${type}`)
|
|
88
|
+
.join('\n')
|
|
89
|
+
|
|
90
|
+
fs.writeFileSync(
|
|
91
|
+
path.join(process.cwd(), 'types', 'generated', 'default-theme.d.ts'),
|
|
92
|
+
prettier.format(
|
|
93
|
+
`
|
|
94
|
+
import { Config } from '../../types'
|
|
95
|
+
type CSSDeclarationList = Record<string, string>
|
|
96
|
+
export type DefaultTheme = Config['theme'] & { ${defaultThemeTypes} }
|
|
97
|
+
`,
|
|
98
|
+
{
|
|
99
|
+
semi: false,
|
|
100
|
+
singleQuote: true,
|
|
101
|
+
printWidth: 100,
|
|
102
|
+
parser: 'typescript',
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
)
|