mantine-reduce-css 1.0.1 → 1.1.1

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/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  A CLI tool to generate a reduced CSS bundle for your Mantine-based project by scanning your codebase for Mantine imports.
4
4
 
5
+ > [!NOTE]
6
+ > This package supports Mantine v8.1.0 and above (it probably works with earlier versions, but is not tested).
7
+ > The current mantine version is `8.1.3`.
8
+
5
9
  ## Usage
6
10
 
7
11
  ```sh
package/dist/index.js CHANGED
@@ -26,6 +26,9 @@ function extractMantineImports(props) {
26
26
  if (props.tiptap) {
27
27
  allResults.add("@mantine/tiptap");
28
28
  }
29
+ if (props.modals) {
30
+ allResults.add("modal");
31
+ }
29
32
  function processDirectory(dir, allResults2) {
30
33
  const entries = readdirSync(dir, { withFileTypes: true });
31
34
  for (const entry of entries) {
@@ -682,8 +685,8 @@ var data_default = [
682
685
  module: "@mantine/core",
683
686
  css_name: "@mantine/core/styles/Accordion.css",
684
687
  dependency: [
685
- "Collapse",
686
- "UnstyledButton"
688
+ "UnstyledButton",
689
+ "Collapse"
687
690
  ]
688
691
  },
689
692
  {
@@ -743,10 +746,10 @@ var data_default = [
743
746
  module: "@mantine/core",
744
747
  css_name: "",
745
748
  dependency: [
746
- "Combobox",
747
- "ScrollArea",
748
749
  "Input",
749
- "InputBase"
750
+ "InputBase",
751
+ "ScrollArea",
752
+ "Combobox"
750
753
  ]
751
754
  },
752
755
  {
@@ -816,10 +819,8 @@ var data_default = [
816
819
  module: "@mantine/core",
817
820
  css_name: "@mantine/core/styles/Checkbox.css",
818
821
  dependency: [
819
- "InlineInput",
820
- "InputsGroupFieldset",
821
- "UnstyledButton",
822
- "Input"
822
+ "Input",
823
+ "UnstyledButton"
823
824
  ]
824
825
  },
825
826
  {
@@ -855,12 +856,12 @@ var data_default = [
855
856
  module: "@mantine/core",
856
857
  css_name: "@mantine/core/styles/ColorInput.css",
857
858
  dependency: [
859
+ "ColorPicker",
860
+ "Input",
858
861
  "ActionIcon",
859
862
  "Popover",
860
- "InputBase",
861
- "Input",
862
863
  "ColorSwatch",
863
- "ColorPicker"
864
+ "InputBase"
864
865
  ]
865
866
  },
866
867
  {
@@ -882,8 +883,8 @@ var data_default = [
882
883
  module: "@mantine/core",
883
884
  css_name: "@mantine/core/styles/Combobox.css",
884
885
  dependency: [
885
- "Popover",
886
886
  "Input",
887
+ "Popover",
887
888
  "Checkbox"
888
889
  ]
889
890
  },
@@ -904,8 +905,8 @@ var data_default = [
904
905
  module: "@mantine/core",
905
906
  css_name: "@mantine/core/styles/Dialog.css",
906
907
  dependency: [
907
- "CloseButton",
908
908
  "Paper",
909
+ "CloseButton",
909
910
  "Transition",
910
911
  "Affix"
911
912
  ]
@@ -942,8 +943,8 @@ var data_default = [
942
943
  css_name: "",
943
944
  dependency: [
944
945
  "Input",
945
- "FileButton",
946
- "CloseButton"
946
+ "CloseButton",
947
+ "FileButton"
947
948
  ]
948
949
  },
949
950
  {
@@ -983,8 +984,8 @@ var data_default = [
983
984
  module: "@mantine/core",
984
985
  css_name: "",
985
986
  dependency: [
986
- "Text",
987
- "Mark"
987
+ "Mark",
988
+ "Text"
988
989
  ]
989
990
  },
990
991
  {
@@ -992,8 +993,7 @@ var data_default = [
992
993
  module: "@mantine/core",
993
994
  css_name: "",
994
995
  dependency: [
995
- "Popover",
996
- "Floating"
996
+ "Popover"
997
997
  ]
998
998
  },
999
999
  {
@@ -1008,14 +1008,6 @@ var data_default = [
1008
1008
  css_name: "@mantine/core/styles/Indicator.css",
1009
1009
  dependency: []
1010
1010
  },
1011
- {
1012
- name: "InlineInput",
1013
- module: "@mantine/core",
1014
- css_name: "@mantine/core/styles/InlineInput.css",
1015
- dependency: [
1016
- "Input"
1017
- ]
1018
- },
1019
1011
  {
1020
1012
  name: "Input",
1021
1013
  module: "@mantine/core",
@@ -1032,14 +1024,6 @@ var data_default = [
1032
1024
  "Input"
1033
1025
  ]
1034
1026
  },
1035
- {
1036
- name: "InputsGroupFieldset",
1037
- module: "@mantine/core",
1038
- css_name: "",
1039
- dependency: [
1040
- "Input"
1041
- ]
1042
- },
1043
1027
  {
1044
1028
  name: "JsonInput",
1045
1029
  module: "@mantine/core",
@@ -1089,11 +1073,10 @@ var data_default = [
1089
1073
  module: "@mantine/core",
1090
1074
  css_name: "@mantine/core/styles/Menu.css",
1091
1075
  dependency: [
1092
- "Floating",
1093
- "Transition",
1094
1076
  "Popover",
1095
- "Accordion",
1096
- "UnstyledButton"
1077
+ "UnstyledButton",
1078
+ "Transition",
1079
+ "Accordion"
1097
1080
  ]
1098
1081
  },
1099
1082
  {
@@ -1118,12 +1101,12 @@ var data_default = [
1118
1101
  module: "@mantine/core",
1119
1102
  css_name: "",
1120
1103
  dependency: [
1121
- "Combobox",
1122
- "ScrollArea",
1123
- "Pill",
1124
1104
  "PillsInput",
1105
+ "Input",
1106
+ "Pill",
1125
1107
  "InputBase",
1126
- "Input"
1108
+ "ScrollArea",
1109
+ "Combobox"
1127
1110
  ]
1128
1111
  },
1129
1112
  {
@@ -1131,9 +1114,9 @@ var data_default = [
1131
1114
  module: "@mantine/core",
1132
1115
  css_name: "",
1133
1116
  dependency: [
1134
- "Combobox",
1135
1117
  "Input",
1136
- "InputBase"
1118
+ "InputBase",
1119
+ "Combobox"
1137
1120
  ]
1138
1121
  },
1139
1122
  {
@@ -1141,9 +1124,9 @@ var data_default = [
1141
1124
  module: "@mantine/core",
1142
1125
  css_name: "@mantine/core/styles/NavLink.css",
1143
1126
  dependency: [
1127
+ "UnstyledButton",
1144
1128
  "Accordion",
1145
- "Collapse",
1146
- "UnstyledButton"
1129
+ "Collapse"
1147
1130
  ]
1148
1131
  },
1149
1132
  {
@@ -1166,9 +1149,9 @@ var data_default = [
1166
1149
  module: "@mantine/core",
1167
1150
  css_name: "@mantine/core/styles/NumberInput.css",
1168
1151
  dependency: [
1169
- "UnstyledButton",
1170
1152
  "Input",
1171
- "InputBase"
1153
+ "InputBase",
1154
+ "UnstyledButton"
1172
1155
  ]
1173
1156
  },
1174
1157
  {
@@ -1196,9 +1179,9 @@ var data_default = [
1196
1179
  module: "@mantine/core",
1197
1180
  css_name: "@mantine/core/styles/PasswordInput.css",
1198
1181
  dependency: [
1199
- "ActionIcon",
1200
1182
  "Input",
1201
- "InputBase"
1183
+ "InputBase",
1184
+ "ActionIcon"
1202
1185
  ]
1203
1186
  },
1204
1187
  {
@@ -1233,11 +1216,10 @@ var data_default = [
1233
1216
  module: "@mantine/core",
1234
1217
  css_name: "@mantine/core/styles/Popover.css",
1235
1218
  dependency: [
1236
- "Portal",
1237
- "Floating",
1238
- "Transition",
1239
1219
  "Overlay",
1240
- "FocusTrap"
1220
+ "FocusTrap",
1221
+ "Portal",
1222
+ "Transition"
1241
1223
  ]
1242
1224
  },
1243
1225
  {
@@ -1257,10 +1239,8 @@ var data_default = [
1257
1239
  module: "@mantine/core",
1258
1240
  css_name: "@mantine/core/styles/Radio.css",
1259
1241
  dependency: [
1260
- "InlineInput",
1261
- "InputsGroupFieldset",
1262
- "UnstyledButton",
1263
- "Input"
1242
+ "Input",
1243
+ "UnstyledButton"
1264
1244
  ]
1265
1245
  },
1266
1246
  {
@@ -1296,10 +1276,10 @@ var data_default = [
1296
1276
  module: "@mantine/core",
1297
1277
  css_name: "",
1298
1278
  dependency: [
1299
- "Combobox",
1300
- "ScrollArea",
1301
1279
  "Input",
1302
- "InputBase"
1280
+ "InputBase",
1281
+ "ScrollArea",
1282
+ "Combobox"
1303
1283
  ]
1304
1284
  },
1305
1285
  {
@@ -1345,8 +1325,8 @@ var data_default = [
1345
1325
  module: "@mantine/core",
1346
1326
  css_name: "@mantine/core/styles/Stepper.css",
1347
1327
  dependency: [
1348
- "UnstyledButton",
1349
1328
  "Checkbox",
1329
+ "UnstyledButton",
1350
1330
  "Transition",
1351
1331
  "Loader"
1352
1332
  ]
@@ -1356,8 +1336,6 @@ var data_default = [
1356
1336
  module: "@mantine/core",
1357
1337
  css_name: "@mantine/core/styles/Switch.css",
1358
1338
  dependency: [
1359
- "InlineInput",
1360
- "InputsGroupFieldset",
1361
1339
  "Input"
1362
1340
  ]
1363
1341
  },
@@ -1388,12 +1366,12 @@ var data_default = [
1388
1366
  module: "@mantine/core",
1389
1367
  css_name: "",
1390
1368
  dependency: [
1391
- "Combobox",
1392
- "ScrollArea",
1393
- "Pill",
1394
1369
  "PillsInput",
1370
+ "Input",
1371
+ "Pill",
1395
1372
  "InputBase",
1396
- "Input"
1373
+ "ScrollArea",
1374
+ "Combobox"
1397
1375
  ]
1398
1376
  },
1399
1377
  {
@@ -1444,7 +1422,6 @@ var data_default = [
1444
1422
  css_name: "@mantine/core/styles/Tooltip.css",
1445
1423
  dependency: [
1446
1424
  "Portal",
1447
- "Floating",
1448
1425
  "Transition"
1449
1426
  ]
1450
1427
  },
@@ -1461,9 +1438,9 @@ var data_default = [
1461
1438
  dependency: []
1462
1439
  },
1463
1440
  {
1464
- name: "TypographyStylesProvider",
1441
+ name: "Typography",
1465
1442
  module: "@mantine/core",
1466
- css_name: "@mantine/core/styles/TypographyStylesProvider.css",
1443
+ css_name: "",
1467
1444
  dependency: []
1468
1445
  },
1469
1446
  {
@@ -1498,17 +1475,8 @@ var data_default = [
1498
1475
  css_name: "@mantine/dates/styles.css",
1499
1476
  dependency: [
1500
1477
  "Input",
1501
- "Popover",
1502
- "CloseButton"
1503
- ]
1504
- },
1505
- {
1506
- name: "DateInputMask",
1507
- module: "@mantine/dates",
1508
- css_name: "@mantine/dates/styles.css",
1509
- dependency: [
1510
- "Popover",
1511
- "InputBase"
1478
+ "CloseButton",
1479
+ "Popover"
1512
1480
  ]
1513
1481
  },
1514
1482
  {
@@ -1620,9 +1588,9 @@ var data_default = [
1620
1588
  module: "@mantine/dates",
1621
1589
  css_name: "@mantine/dates/styles.css",
1622
1590
  dependency: [
1623
- "Popover",
1624
1591
  "Input",
1625
- "Modal"
1592
+ "Modal",
1593
+ "Popover"
1626
1594
  ]
1627
1595
  },
1628
1596
  {
@@ -1652,11 +1620,11 @@ var data_default = [
1652
1620
  module: "@mantine/dates",
1653
1621
  css_name: "@mantine/dates/styles.css",
1654
1622
  dependency: [
1623
+ "CloseButton",
1655
1624
  "SimpleGrid",
1656
- "ScrollArea",
1657
1625
  "Popover",
1658
- "CloseButton",
1659
- "InputBase"
1626
+ "InputBase",
1627
+ "ScrollArea"
1660
1628
  ]
1661
1629
  },
1662
1630
  {
@@ -1812,9 +1780,18 @@ var data_default = [
1812
1780
  name: "@mantine/tiptap",
1813
1781
  module: "@mantine/tiptap",
1814
1782
  css_name: "@mantine/tiptap/styles.css",
1783
+ dependency: [
1784
+ "Typography",
1785
+ "UnstyledButton"
1786
+ ]
1787
+ },
1788
+ {
1789
+ name: "@mantine/code-highlight",
1790
+ module: "@mantine/code-highlight",
1791
+ css_name: "@mantine/code-highlight/styles.css",
1815
1792
  dependency: [
1816
1793
  "UnstyledButton",
1817
- "TypographyStylesProvider"
1794
+ "ScrollArea"
1818
1795
  ]
1819
1796
  },
1820
1797
  {
@@ -1830,11 +1807,11 @@ var data_default = [
1830
1807
  module: "@mantine/spotlight",
1831
1808
  css_name: "@mantine/spotlight/styles.css",
1832
1809
  dependency: [
1810
+ "UnstyledButton",
1833
1811
  "Highlight",
1834
1812
  "Input",
1835
1813
  "ScrollArea",
1836
- "Modal",
1837
- "UnstyledButton"
1814
+ "Modal"
1838
1815
  ]
1839
1816
  },
1840
1817
  {
@@ -1911,7 +1888,7 @@ var hierarchy_default = [
1911
1888
  "Title",
1912
1889
  "Transition",
1913
1890
  "Tree",
1914
- "TypographyStylesProvider",
1891
+ "Typography",
1915
1892
  "UnstyledButton",
1916
1893
  "VisuallyHidden",
1917
1894
  "Calendar",
@@ -1950,78 +1927,76 @@ var hierarchy_default = [
1950
1927
  "ChartLegend",
1951
1928
  "ColorPicker",
1952
1929
  "SegmentedControl",
1953
- "Card",
1954
1930
  "RadialBarChart",
1931
+ "Card",
1955
1932
  "Affix",
1956
1933
  "@mantine/nprogress",
1957
1934
  "TimeGrid",
1958
- "Anchor",
1959
1935
  "BubbleChart",
1936
+ "Anchor",
1960
1937
  "Highlight",
1938
+ "LoadingOverlay",
1961
1939
  "ModalBase",
1962
1940
  "Tooltip",
1963
- "LoadingOverlay",
1964
- "PickerControl",
1965
- "Burger",
1941
+ "@mantine/code-highlight",
1966
1942
  "Tabs",
1967
1943
  "Day",
1968
- "CalendarHeader",
1969
- "Accordion",
1970
- "Pagination",
1971
- "TableOfContents",
1972
- "Button",
1973
1944
  "DatePicker",
1945
+ "@mantine/tiptap",
1946
+ "@mantine/carousel",
1974
1947
  "ActionIcon",
1948
+ "Button",
1949
+ "TableOfContents",
1950
+ "Accordion",
1951
+ "CalendarHeader",
1975
1952
  "CloseButton",
1976
- "@mantine/carousel",
1977
- "@mantine/tiptap",
1953
+ "PickerControl",
1954
+ "Pagination",
1955
+ "Burger",
1978
1956
  "FocusTrap",
1979
1957
  "Spoiler",
1980
- "Drawer",
1958
+ "@mantine/dropzone",
1981
1959
  "Modal",
1960
+ "Drawer",
1982
1961
  "RingProgress",
1983
1962
  "Heatmap",
1984
- "@mantine/dropzone",
1985
- "NavLink",
1986
1963
  "DateTimePicker",
1987
- "Notification",
1964
+ "NavLink",
1965
+ "Input",
1988
1966
  "Alert",
1989
1967
  "Pill",
1990
- "Input",
1991
1968
  "Dialog",
1969
+ "Notification",
1992
1970
  "Popover",
1993
- "@mantine/notifications",
1994
- "@mantine/spotlight",
1995
1971
  "InputBase",
1972
+ "Radio",
1973
+ "Checkbox",
1974
+ "Switch",
1996
1975
  "FileInput",
1997
- "InputsGroupFieldset",
1998
- "InlineInput",
1976
+ "@mantine/spotlight",
1977
+ "@mantine/notifications",
1978
+ "HoverCard",
1999
1979
  "PickerInputBase",
2000
1980
  "Menu",
2001
- "HoverCard",
2002
1981
  "DateInput",
2003
- "DateInputMask",
2004
- "PasswordInput",
2005
1982
  "ColorInput",
2006
- "PinInput",
2007
- "TimeInput",
2008
- "TimePicker",
2009
1983
  "PillsInput",
2010
- "Textarea",
2011
- "TextInput",
1984
+ "TimePicker",
1985
+ "TimeInput",
2012
1986
  "NumberInput",
2013
- "Switch",
2014
- "Radio",
2015
- "Checkbox",
2016
- "JsonInput",
2017
- "Combobox",
2018
- "Stepper",
1987
+ "PasswordInput",
1988
+ "TextInput",
1989
+ "PinInput",
1990
+ "Textarea",
2019
1991
  "Chip",
2020
- "Select",
1992
+ "Stepper",
1993
+ "Combobox",
1994
+ "JsonInput",
2021
1995
  "MultiSelect",
1996
+ "TagsInput",
1997
+ "Select",
2022
1998
  "Autocomplete",
2023
- "NativeSelect",
2024
- "TagsInput"
1999
+ "NativeSelect"
2025
2000
  ];
2026
2001
 
2027
2002
  // src/generate.ts
@@ -2106,6 +2081,8 @@ cli.command("run", "Run Mantine CSS reduction").option("--in <dir>", "Directory
2106
2081
  default: false
2107
2082
  }).option("--tiptap", "Include @mantine/tiptap CSS in the output file", {
2108
2083
  default: false
2084
+ }).option("--modals", "Include Mantine modals manager CSS in the output file", {
2085
+ default: false
2109
2086
  }).option("--ext <extension>", "File extension to scan for Mantine imports", {
2110
2087
  default: ["tsx", "jsx"]
2111
2088
  }).action((options) => {
@@ -2121,6 +2098,7 @@ cli.command("run", "Run Mantine CSS reduction").option("--in <dir>", "Directory
2121
2098
  charts: options.charts,
2122
2099
  core: options.core,
2123
2100
  tiptap: options.tiptap,
2101
+ modals: options.modals,
2124
2102
  extensions: options.ext
2125
2103
  });
2126
2104
  generateCssFiles(data, options.out, options.base);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mantine-reduce-css",
3
3
  "type": "module",
4
- "version": "1.0.1",
4
+ "version": "1.1.1",
5
5
  "description": "cli tool for reducing global css for mantine",
6
6
  "bin": {
7
7
  "mantine-reduce-css": "./dist/index.js"
@@ -1,15 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: [hilmoo]
4
- patreon: # Replace with a single Patreon username
5
- open_collective: # Replace with a single Open Collective username
6
- ko_fi: # Replace with a single Ko-fi username
7
- tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
- community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
- liberapay: # Replace with a single Liberapay username
10
- issuehunt: # Replace with a single IssueHunt username
11
- lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12
- polar: # Replace with a single Polar username
13
- buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14
- thanks_dev: # Replace with a single thanks.dev username
15
- custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -1,21 +0,0 @@
1
- name: Publish And Build
2
- on:
3
- release:
4
- types: [published]
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
- permissions:
9
- contents: read
10
- id-token: write
11
- steps:
12
- - uses: actions/checkout@v4
13
- - uses: actions/setup-node@v4
14
- with:
15
- node-version: "20.x"
16
- registry-url: "https://registry.npmjs.org"
17
- - run: npm ci
18
- - run: npm run build
19
- - run: npm publish --provenance --access public
20
- env:
21
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}