@superad/ui 0.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.
Files changed (343) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -0
  3. package/es/Button/Button.d.mts +7 -0
  4. package/es/Button/Button.mjs +29 -0
  5. package/es/Button/Button.mjs.map +1 -0
  6. package/es/Button/index.d.mts +3 -0
  7. package/es/Button/index.d.ts +1 -0
  8. package/es/Button/index.js +1 -0
  9. package/es/Button/index.mjs +2 -0
  10. package/es/Button/style.mjs +33 -0
  11. package/es/Button/style.mjs.map +1 -0
  12. package/es/Button/type.d.mts +21 -0
  13. package/es/ConfigProvider/index.d.mts +9 -0
  14. package/es/ConfigProvider/index.d.ts +1 -0
  15. package/es/ConfigProvider/index.js +1 -0
  16. package/es/ConfigProvider/index.mjs +82 -0
  17. package/es/ConfigProvider/index.mjs.map +1 -0
  18. package/es/ConfigProvider/type.d.mts +24 -0
  19. package/es/DraggablePanel/DraggablePanel.d.mts +6 -0
  20. package/es/DraggablePanel/DraggablePanel.mjs +104 -0
  21. package/es/DraggablePanel/DraggablePanel.mjs.map +1 -0
  22. package/es/DraggablePanel/index.d.mts +3 -0
  23. package/es/DraggablePanel/index.d.ts +1 -0
  24. package/es/DraggablePanel/index.js +1 -0
  25. package/es/DraggablePanel/index.mjs +3 -0
  26. package/es/DraggablePanel/style.mjs +86 -0
  27. package/es/DraggablePanel/style.mjs.map +1 -0
  28. package/es/DraggablePanel/type.d.mts +27 -0
  29. package/es/Flex/Center.d.mts +7 -0
  30. package/es/Flex/Center.mjs +14 -0
  31. package/es/Flex/Center.mjs.map +1 -0
  32. package/es/Flex/FlexBasic.d.mts +6 -0
  33. package/es/Flex/FlexBasic.mjs +46 -0
  34. package/es/Flex/FlexBasic.mjs.map +1 -0
  35. package/es/Flex/Flexbox.d.mts +2 -0
  36. package/es/Flex/index.d.mts +5 -0
  37. package/es/Flex/index.d.ts +1 -0
  38. package/es/Flex/index.js +1 -0
  39. package/es/Flex/index.mjs +3 -0
  40. package/es/Flex/type.d.mts +35 -0
  41. package/es/Flex/utils.mjs +24 -0
  42. package/es/Flex/utils.mjs.map +1 -0
  43. package/es/FontLoader/index.d.mts +9 -0
  44. package/es/FontLoader/index.d.ts +1 -0
  45. package/es/FontLoader/index.js +1 -0
  46. package/es/FontLoader/index.mjs +23 -0
  47. package/es/FontLoader/index.mjs.map +1 -0
  48. package/es/GlobalFocusRing/index.d.mts +6 -0
  49. package/es/GlobalFocusRing/index.d.ts +1 -0
  50. package/es/GlobalFocusRing/index.js +1 -0
  51. package/es/GlobalFocusRing/index.mjs +204 -0
  52. package/es/GlobalFocusRing/index.mjs.map +1 -0
  53. package/es/GlobalFocusRing/style.mjs +35 -0
  54. package/es/GlobalFocusRing/style.mjs.map +1 -0
  55. package/es/Provider.d.mts +5 -0
  56. package/es/Table/canvas/canvasPalette.mjs +11 -0
  57. package/es/Table/canvas/canvasPalette.mjs.map +1 -0
  58. package/es/Table/canvas/chipPainters.mjs +408 -0
  59. package/es/Table/canvas/chipPainters.mjs.map +1 -0
  60. package/es/Table/canvas/controlPainters.mjs +193 -0
  61. package/es/Table/canvas/controlPainters.mjs.map +1 -0
  62. package/es/Table/canvas/groupTitle.mjs +181 -0
  63. package/es/Table/canvas/groupTitle.mjs.map +1 -0
  64. package/es/Table/canvas/paintUtils.mjs +70 -0
  65. package/es/Table/canvas/paintUtils.mjs.map +1 -0
  66. package/es/Table/canvas/rowSeries.mjs +130 -0
  67. package/es/Table/canvas/rowSeries.mjs.map +1 -0
  68. package/es/Table/canvas/textPainters.mjs +97 -0
  69. package/es/Table/canvas/textPainters.mjs.map +1 -0
  70. package/es/Table/canvas/theme.d.mts +14 -0
  71. package/es/Table/canvas/theme.mjs +276 -0
  72. package/es/Table/canvas/theme.mjs.map +1 -0
  73. package/es/Table/core/cellValue.d.mts +1 -0
  74. package/es/Table/core/cellValue.mjs +240 -0
  75. package/es/Table/core/cellValue.mjs.map +1 -0
  76. package/es/Table/core/rowSelection.mjs +138 -0
  77. package/es/Table/core/rowSelection.mjs.map +1 -0
  78. package/es/Table/core/size.mjs +60 -0
  79. package/es/Table/core/size.mjs.map +1 -0
  80. package/es/Table/core/tableI18n.d.mts +11 -0
  81. package/es/Table/core/tableI18n.mjs +123 -0
  82. package/es/Table/core/tableI18n.mjs.map +1 -0
  83. package/es/Table/core/tagTone.mjs +245 -0
  84. package/es/Table/core/tagTone.mjs.map +1 -0
  85. package/es/Table/core/zIndex.mjs +7 -0
  86. package/es/Table/core/zIndex.mjs.map +1 -0
  87. package/es/Table/index.d.mts +6 -0
  88. package/es/Table/index.d.ts +1 -0
  89. package/es/Table/index.js +1 -0
  90. package/es/Table/index.mjs +6 -0
  91. package/es/Table/react/Table.d.mts +9 -0
  92. package/es/Table/react/Table.mjs +407 -0
  93. package/es/Table/react/Table.mjs.map +1 -0
  94. package/es/Table/react/TableColumnSettings.mjs +65 -0
  95. package/es/Table/react/TableColumnSettings.mjs.map +1 -0
  96. package/es/Table/react/a11y.mjs +72 -0
  97. package/es/Table/react/a11y.mjs.map +1 -0
  98. package/es/Table/react/editors/base.mjs +427 -0
  99. package/es/Table/react/editors/base.mjs.map +1 -0
  100. package/es/Table/react/editors/inline.mjs +225 -0
  101. package/es/Table/react/editors/inline.mjs.map +1 -0
  102. package/es/Table/react/editors/picker.mjs +368 -0
  103. package/es/Table/react/editors/picker.mjs.map +1 -0
  104. package/es/Table/react/overlayChips.mjs +50 -0
  105. package/es/Table/react/overlayChips.mjs.map +1 -0
  106. package/es/Table/react/sameRenderInputs.mjs +50 -0
  107. package/es/Table/react/sameRenderInputs.mjs.map +1 -0
  108. package/es/Table/react/style.mjs +650 -0
  109. package/es/Table/react/style.mjs.map +1 -0
  110. package/es/Table/react/useTableCellEvents.mjs +32 -0
  111. package/es/Table/react/useTableCellEvents.mjs.map +1 -0
  112. package/es/Table/react/useTableColumnSettings.mjs +107 -0
  113. package/es/Table/react/useTableColumnSettings.mjs.map +1 -0
  114. package/es/Table/react/useTableEditorSync.mjs +41 -0
  115. package/es/Table/react/useTableEditorSync.mjs.map +1 -0
  116. package/es/Table/react/useTableHoverHint.mjs +62 -0
  117. package/es/Table/react/useTableHoverHint.mjs.map +1 -0
  118. package/es/Table/react/useTableKeyboard.mjs +41 -0
  119. package/es/Table/react/useTableKeyboard.mjs.map +1 -0
  120. package/es/Table/react/useTableRenderState.mjs +194 -0
  121. package/es/Table/react/useTableRenderState.mjs.map +1 -0
  122. package/es/Table/react/useTableScroll.mjs +33 -0
  123. package/es/Table/react/useTableScroll.mjs.map +1 -0
  124. package/es/Table/react/useTableSelectionInfo.mjs +48 -0
  125. package/es/Table/react/useTableSelectionInfo.mjs.map +1 -0
  126. package/es/Table/react/useTableVTableEvents.mjs +132 -0
  127. package/es/Table/react/useTableVTableEvents.mjs.map +1 -0
  128. package/es/Table/type.d.mts +279 -0
  129. package/es/Table/type.mjs +34 -0
  130. package/es/Table/type.mjs.map +1 -0
  131. package/es/Table/vtable/columns.d.mts +17 -0
  132. package/es/Table/vtable/columns.mjs +381 -0
  133. package/es/Table/vtable/columns.mjs.map +1 -0
  134. package/es/Table/vtable/frozenShadow.mjs +27 -0
  135. package/es/Table/vtable/frozenShadow.mjs.map +1 -0
  136. package/es/Table/vtable/interaction.mjs +175 -0
  137. package/es/Table/vtable/interaction.mjs.map +1 -0
  138. package/es/Table/vtable/option.d.mts +39 -0
  139. package/es/Table/vtable/option.mjs +232 -0
  140. package/es/Table/vtable/option.mjs.map +1 -0
  141. package/es/Table/vtable/seriesSelection.mjs +374 -0
  142. package/es/Table/vtable/seriesSelection.mjs.map +1 -0
  143. package/es/Table/vtable/vtableAdapter.mjs +96 -0
  144. package/es/Table/vtable/vtableAdapter.mjs.map +1 -0
  145. package/es/ThemeProvider/AppElementContext.d.mts +5 -0
  146. package/es/ThemeProvider/AppElementContext.mjs +10 -0
  147. package/es/ThemeProvider/AppElementContext.mjs.map +1 -0
  148. package/es/ThemeProvider/ConfigProvider.mjs +29 -0
  149. package/es/ThemeProvider/ConfigProvider.mjs.map +1 -0
  150. package/es/ThemeProvider/GlobalStyle/antdOverride.mjs +73 -0
  151. package/es/ThemeProvider/GlobalStyle/antdOverride.mjs.map +1 -0
  152. package/es/ThemeProvider/GlobalStyle/essential.mjs +50 -0
  153. package/es/ThemeProvider/GlobalStyle/essential.mjs.map +1 -0
  154. package/es/ThemeProvider/GlobalStyle/global.mjs +90 -0
  155. package/es/ThemeProvider/GlobalStyle/global.mjs.map +1 -0
  156. package/es/ThemeProvider/GlobalStyle/index.mjs +14 -0
  157. package/es/ThemeProvider/GlobalStyle/index.mjs.map +1 -0
  158. package/es/ThemeProvider/Meta.d.mts +7 -0
  159. package/es/ThemeProvider/Meta.mjs +48 -0
  160. package/es/ThemeProvider/Meta.mjs.map +1 -0
  161. package/es/ThemeProvider/ThemeProvider.d.mts +6 -0
  162. package/es/ThemeProvider/ThemeProvider.mjs +89 -0
  163. package/es/ThemeProvider/ThemeProvider.mjs.map +1 -0
  164. package/es/ThemeProvider/constants.d.mts +5 -0
  165. package/es/ThemeProvider/constants.mjs +6 -0
  166. package/es/ThemeProvider/constants.mjs.map +1 -0
  167. package/es/ThemeProvider/index.d.mts +6 -0
  168. package/es/ThemeProvider/index.d.ts +1 -0
  169. package/es/ThemeProvider/index.js +1 -0
  170. package/es/ThemeProvider/index.mjs +5 -0
  171. package/es/ThemeProvider/type.d.mts +48 -0
  172. package/es/_virtual/_rolldown/runtime.mjs +13 -0
  173. package/es/color/colors/blue.d.mts +6 -0
  174. package/es/color/colors/blue.mjs +67 -0
  175. package/es/color/colors/blue.mjs.map +1 -0
  176. package/es/color/colors/cyan.d.mts +6 -0
  177. package/es/color/colors/cyan.mjs +67 -0
  178. package/es/color/colors/cyan.mjs.map +1 -0
  179. package/es/color/colors/geekblue.d.mts +6 -0
  180. package/es/color/colors/geekblue.mjs +67 -0
  181. package/es/color/colors/geekblue.mjs.map +1 -0
  182. package/es/color/colors/gold.d.mts +6 -0
  183. package/es/color/colors/gold.mjs +67 -0
  184. package/es/color/colors/gold.mjs.map +1 -0
  185. package/es/color/colors/gray.d.mts +6 -0
  186. package/es/color/colors/gray.mjs +67 -0
  187. package/es/color/colors/gray.mjs.map +1 -0
  188. package/es/color/colors/green.d.mts +6 -0
  189. package/es/color/colors/green.mjs +67 -0
  190. package/es/color/colors/green.mjs.map +1 -0
  191. package/es/color/colors/index.d.mts +22 -0
  192. package/es/color/colors/index.mjs +35 -0
  193. package/es/color/colors/index.mjs.map +1 -0
  194. package/es/color/colors/lime.d.mts +6 -0
  195. package/es/color/colors/lime.mjs +67 -0
  196. package/es/color/colors/lime.mjs.map +1 -0
  197. package/es/color/colors/magenta.d.mts +6 -0
  198. package/es/color/colors/magenta.mjs +67 -0
  199. package/es/color/colors/magenta.mjs.map +1 -0
  200. package/es/color/colors/orange.d.mts +6 -0
  201. package/es/color/colors/orange.mjs +67 -0
  202. package/es/color/colors/orange.mjs.map +1 -0
  203. package/es/color/colors/primary.d.mts +6 -0
  204. package/es/color/colors/primary.mjs +67 -0
  205. package/es/color/colors/primary.mjs.map +1 -0
  206. package/es/color/colors/purple.d.mts +6 -0
  207. package/es/color/colors/purple.mjs +67 -0
  208. package/es/color/colors/purple.mjs.map +1 -0
  209. package/es/color/colors/red.d.mts +6 -0
  210. package/es/color/colors/red.mjs +67 -0
  211. package/es/color/colors/red.mjs.map +1 -0
  212. package/es/color/colors/volcano.d.mts +6 -0
  213. package/es/color/colors/volcano.mjs +67 -0
  214. package/es/color/colors/volcano.mjs.map +1 -0
  215. package/es/color/colors/yellow.d.mts +6 -0
  216. package/es/color/colors/yellow.mjs +67 -0
  217. package/es/color/colors/yellow.mjs.map +1 -0
  218. package/es/color/index.d.mts +23 -0
  219. package/es/color/index.d.ts +1 -0
  220. package/es/color/index.js +1 -0
  221. package/es/color/index.mjs +22 -0
  222. package/es/color/neutrals/index.d.mts +13 -0
  223. package/es/color/neutrals/index.mjs +17 -0
  224. package/es/color/neutrals/index.mjs.map +1 -0
  225. package/es/color/neutrals/mauve.d.mts +6 -0
  226. package/es/color/neutrals/mauve.mjs +67 -0
  227. package/es/color/neutrals/mauve.mjs.map +1 -0
  228. package/es/color/neutrals/olive.d.mts +6 -0
  229. package/es/color/neutrals/olive.mjs +67 -0
  230. package/es/color/neutrals/olive.mjs.map +1 -0
  231. package/es/color/neutrals/sage.d.mts +6 -0
  232. package/es/color/neutrals/sage.mjs +67 -0
  233. package/es/color/neutrals/sage.mjs.map +1 -0
  234. package/es/color/neutrals/sand.d.mts +6 -0
  235. package/es/color/neutrals/sand.mjs +67 -0
  236. package/es/color/neutrals/sand.mjs.map +1 -0
  237. package/es/color/neutrals/slate.d.mts +6 -0
  238. package/es/color/neutrals/slate.mjs +67 -0
  239. package/es/color/neutrals/slate.mjs.map +1 -0
  240. package/es/color/types.d.mts +16 -0
  241. package/es/eslint/index.d.mts +26 -0
  242. package/es/eslint/index.d.ts +1 -0
  243. package/es/eslint/index.js +1 -0
  244. package/es/eslint/index.mjs +11 -0
  245. package/es/eslint/index.mjs.map +1 -0
  246. package/es/hooks/useIsClient.d.mts +8 -0
  247. package/es/hooks/useIsClient.mjs +13 -0
  248. package/es/hooks/useIsClient.mjs.map +1 -0
  249. package/es/i18n/context.d.mts +7 -0
  250. package/es/i18n/context.mjs +16 -0
  251. package/es/i18n/context.mjs.map +1 -0
  252. package/es/i18n/index.d.mts +6 -0
  253. package/es/i18n/index.d.ts +1 -0
  254. package/es/i18n/index.js +1 -0
  255. package/es/i18n/index.mjs +5 -0
  256. package/es/i18n/resources/en/common.d.mts +35 -0
  257. package/es/i18n/resources/en/common.mjs +36 -0
  258. package/es/i18n/resources/en/common.mjs.map +1 -0
  259. package/es/i18n/resources/en/index.d.mts +7 -0
  260. package/es/i18n/resources/en/index.mjs +8 -0
  261. package/es/i18n/resources/en/index.mjs.map +1 -0
  262. package/es/i18n/resources/zhCn/common.d.mts +35 -0
  263. package/es/i18n/resources/zhCn/common.mjs +36 -0
  264. package/es/i18n/resources/zhCn/common.mjs.map +1 -0
  265. package/es/i18n/resources/zhCn/index.d.mts +7 -0
  266. package/es/i18n/resources/zhCn/index.mjs +8 -0
  267. package/es/i18n/resources/zhCn/index.mjs.map +1 -0
  268. package/es/i18n/types.d.mts +22 -0
  269. package/es/i18n/useTranslation.d.mts +12 -0
  270. package/es/i18n/useTranslation.mjs +22 -0
  271. package/es/i18n/useTranslation.mjs.map +1 -0
  272. package/es/index.d.mts +43 -0
  273. package/es/index.mjs +26 -0
  274. package/es/storybook/StoryBook/StoryBook.d.mts +7 -0
  275. package/es/storybook/StoryBook/StoryBook.mjs +52 -0
  276. package/es/storybook/StoryBook/StoryBook.mjs.map +1 -0
  277. package/es/storybook/StoryBook/index.d.mts +3 -0
  278. package/es/storybook/StoryBook/style.mjs +97 -0
  279. package/es/storybook/StoryBook/style.mjs.map +1 -0
  280. package/es/storybook/StoryBook/type.d.mts +13 -0
  281. package/es/storybook/index.d.mts +4 -0
  282. package/es/storybook/index.d.ts +1 -0
  283. package/es/storybook/index.js +1 -0
  284. package/es/storybook/index.mjs +2 -0
  285. package/es/styles/classNames.d.mts +11 -0
  286. package/es/styles/classNames.mjs +12 -0
  287. package/es/styles/classNames.mjs.map +1 -0
  288. package/es/styles/customTheme.d.mts +36 -0
  289. package/es/styles/customTheme.mjs +71 -0
  290. package/es/styles/customTheme.mjs.map +1 -0
  291. package/es/styles/index.d.mts +6 -0
  292. package/es/styles/index.d.ts +1 -0
  293. package/es/styles/index.js +1 -0
  294. package/es/styles/index.mjs +6 -0
  295. package/es/styles/theme/algorithms/darkAlgorithm.mjs +18 -0
  296. package/es/styles/theme/algorithms/darkAlgorithm.mjs.map +1 -0
  297. package/es/styles/theme/algorithms/lightAlgorithm.mjs +18 -0
  298. package/es/styles/theme/algorithms/lightAlgorithm.mjs.map +1 -0
  299. package/es/styles/theme/algorithms/resolveScales.mjs +25 -0
  300. package/es/styles/theme/algorithms/resolveScales.mjs.map +1 -0
  301. package/es/styles/theme/antdTheme.mjs +31 -0
  302. package/es/styles/theme/antdTheme.mjs.map +1 -0
  303. package/es/styles/theme/customStylish.d.mts +7 -0
  304. package/es/styles/theme/customStylish.mjs +158 -0
  305. package/es/styles/theme/customStylish.mjs.map +1 -0
  306. package/es/styles/theme/customStylishStatic.d.mts +6 -0
  307. package/es/styles/theme/customStylishStatic.mjs +156 -0
  308. package/es/styles/theme/customStylishStatic.mjs.map +1 -0
  309. package/es/styles/theme/customToken.d.mts +7 -0
  310. package/es/styles/theme/customToken.mjs +127 -0
  311. package/es/styles/theme/customToken.mjs.map +1 -0
  312. package/es/styles/theme/generateColorPalette.d.mts +16 -0
  313. package/es/styles/theme/generateColorPalette.mjs +170 -0
  314. package/es/styles/theme/generateColorPalette.mjs.map +1 -0
  315. package/es/styles/theme/token/base.mjs +64 -0
  316. package/es/styles/theme/token/base.mjs.map +1 -0
  317. package/es/styles/theme/token/dark.mjs +37 -0
  318. package/es/styles/theme/token/dark.mjs.map +1 -0
  319. package/es/styles/theme/token/light.mjs +37 -0
  320. package/es/styles/theme/token/light.mjs.map +1 -0
  321. package/es/types/customStylish.d.mts +28 -0
  322. package/es/types/customToken.d.mts +34 -0
  323. package/es/types/customToken.mjs +32 -0
  324. package/es/types/customToken.mjs.map +1 -0
  325. package/es/types/index.d.mts +15 -0
  326. package/es/types/index.d.ts +1 -0
  327. package/es/types/index.js +1 -0
  328. package/es/types/index.mjs +2 -0
  329. package/es/utils/composeEventHandlers.d.mts +5 -0
  330. package/es/utils/composeEventHandlers.mjs +10 -0
  331. package/es/utils/composeEventHandlers.mjs.map +1 -0
  332. package/es/utils/copyToClipboard.d.mts +5 -0
  333. package/es/utils/copyToClipboard.mjs +28 -0
  334. package/es/utils/copyToClipboard.mjs.map +1 -0
  335. package/es/utils/dom.d.mts +15 -0
  336. package/es/utils/dom.mjs +16 -0
  337. package/es/utils/dom.mjs.map +1 -0
  338. package/es/utils/genCdnUrl.d.mts +12 -0
  339. package/es/utils/genCdnUrl.mjs +17 -0
  340. package/es/utils/genCdnUrl.mjs.map +1 -0
  341. package/es/utils/safeReadableColor.mjs +6 -0
  342. package/es/utils/safeReadableColor.mjs.map +1 -0
  343. package/package.json +96 -0
@@ -0,0 +1,170 @@
1
+ import { capitalize } from "es-toolkit/compat";
2
+ //#region src/styles/theme/generateColorPalette.ts
3
+ const COLOR_SLOT_RULES = [
4
+ [
5
+ "Fill",
6
+ 3,
7
+ 4,
8
+ true
9
+ ],
10
+ [
11
+ "FillSecondary",
12
+ 2,
13
+ 3,
14
+ true
15
+ ],
16
+ [
17
+ "FillTertiary",
18
+ 1,
19
+ 2,
20
+ true
21
+ ],
22
+ [
23
+ "FillQuaternary",
24
+ 0,
25
+ 1,
26
+ true
27
+ ],
28
+ [
29
+ "Bg",
30
+ 1,
31
+ 1
32
+ ],
33
+ [
34
+ "BgHover",
35
+ 2,
36
+ 2
37
+ ],
38
+ [
39
+ "Border",
40
+ 4,
41
+ 4
42
+ ],
43
+ [
44
+ "BorderHover",
45
+ 5,
46
+ 3
47
+ ],
48
+ [
49
+ "Hover",
50
+ 10,
51
+ 8
52
+ ],
53
+ [
54
+ "",
55
+ 9,
56
+ 9
57
+ ],
58
+ [
59
+ "Active",
60
+ 7,
61
+ 10
62
+ ],
63
+ [
64
+ "TextHover",
65
+ 10,
66
+ 8
67
+ ],
68
+ [
69
+ "Text",
70
+ 9,
71
+ 9
72
+ ],
73
+ [
74
+ "TextActive",
75
+ 7,
76
+ 10
77
+ ]
78
+ ];
79
+ const NEUTRAL_SLOT_RULES = [
80
+ [
81
+ "colorBgContainer",
82
+ 1,
83
+ 0
84
+ ],
85
+ [
86
+ "colorBgElevated",
87
+ 2,
88
+ 0
89
+ ],
90
+ [
91
+ "colorBgLayout",
92
+ 0,
93
+ 1
94
+ ],
95
+ [
96
+ "colorBgSpotlight",
97
+ 4,
98
+ 4
99
+ ],
100
+ [
101
+ "colorBorder",
102
+ 3,
103
+ 3
104
+ ],
105
+ [
106
+ "colorBorderSecondary",
107
+ 2,
108
+ 2
109
+ ],
110
+ [
111
+ "colorFill",
112
+ 3,
113
+ 3,
114
+ true
115
+ ],
116
+ [
117
+ "colorFillQuaternary",
118
+ 0,
119
+ 0,
120
+ true
121
+ ],
122
+ [
123
+ "colorFillSecondary",
124
+ 2,
125
+ 2,
126
+ true
127
+ ],
128
+ [
129
+ "colorFillTertiary",
130
+ 1,
131
+ 1,
132
+ true
133
+ ],
134
+ [
135
+ "colorText",
136
+ 12,
137
+ 12
138
+ ],
139
+ [
140
+ "colorTextQuaternary",
141
+ 6,
142
+ 6
143
+ ],
144
+ [
145
+ "colorTextSecondary",
146
+ 10,
147
+ 10
148
+ ],
149
+ [
150
+ "colorTextTertiary",
151
+ 8,
152
+ 8
153
+ ]
154
+ ];
155
+ const pickStep = (scale, appearance, step, alpha = false) => {
156
+ return scale[alpha ? `${appearance}A` : appearance][step];
157
+ };
158
+ const applyRules = (scale, appearance, rules, prefix = "") => {
159
+ const isDark = appearance === "dark";
160
+ return Object.fromEntries(rules.map(([suffix, darkStep, lightStep, alpha]) => [`${prefix}${suffix}`, pickStep(scale, appearance, isDark ? darkStep : lightStep, alpha)]));
161
+ };
162
+ const generateColorPalette = ({ type, scale, appearance }) => applyRules(scale, appearance, COLOR_SLOT_RULES, `color${capitalize(type)}`);
163
+ const generateColorNeutralPalette = ({ scale, appearance }) => ({
164
+ ...applyRules(scale, appearance, NEUTRAL_SLOT_RULES),
165
+ colorBgMask: scale.lightA[8]
166
+ });
167
+ //#endregion
168
+ export { generateColorNeutralPalette, generateColorPalette };
169
+
170
+ //# sourceMappingURL=generateColorPalette.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateColorPalette.mjs","names":[],"sources":["../../../src/styles/theme/generateColorPalette.ts"],"sourcesContent":["import type { AliasToken } from 'antd/es/theme/interface';\nimport { capitalize } from 'es-toolkit/compat';\n\nimport type { ColorScaleItem } from '@/color/types';\n\ntype Appearance = 'light' | 'dark';\n\n/**\n * 语义槽位 → 色阶步进的映射规则。\n * 元组含义:[token 后缀, 暗色步进, 亮色步进, 是否取透明系列]。\n * 步进 0-12,0 靠背景端,12 靠文字端。\n */\ntype SlotRule = readonly [suffix: string, darkStep: number, lightStep: number, alpha?: boolean];\n\nconst COLOR_SLOT_RULES: readonly SlotRule[] = [\n ['Fill', 3, 4, true],\n ['FillSecondary', 2, 3, true],\n ['FillTertiary', 1, 2, true],\n ['FillQuaternary', 0, 1, true],\n ['Bg', 1, 1],\n ['BgHover', 2, 2],\n ['Border', 4, 4],\n ['BorderHover', 5, 3],\n ['Hover', 10, 8],\n ['', 9, 9],\n ['Active', 7, 10],\n ['TextHover', 10, 8],\n ['Text', 9, 9],\n ['TextActive', 7, 10],\n];\n\nconst NEUTRAL_SLOT_RULES: readonly SlotRule[] = [\n ['colorBgContainer', 1, 0],\n ['colorBgElevated', 2, 0],\n ['colorBgLayout', 0, 1],\n ['colorBgSpotlight', 4, 4],\n ['colorBorder', 3, 3],\n ['colorBorderSecondary', 2, 2],\n ['colorFill', 3, 3, true],\n ['colorFillQuaternary', 0, 0, true],\n ['colorFillSecondary', 2, 2, true],\n ['colorFillTertiary', 1, 1, true],\n ['colorText', 12, 12],\n ['colorTextQuaternary', 6, 6],\n ['colorTextSecondary', 10, 10],\n ['colorTextTertiary', 8, 8],\n];\n\nconst pickStep = (scale: ColorScaleItem, appearance: Appearance, step: number, alpha = false) => {\n const series: keyof ColorScaleItem = alpha ? `${appearance}A` : appearance;\n return scale[series][step];\n};\n\nconst applyRules = (\n scale: ColorScaleItem,\n appearance: Appearance,\n rules: readonly SlotRule[],\n prefix = '',\n): Partial<AliasToken> => {\n const isDark = appearance === 'dark';\n return Object.fromEntries(\n rules.map(([suffix, darkStep, lightStep, alpha]) => [\n `${prefix}${suffix}`,\n pickStep(scale, appearance, isDark ? darkStep : lightStep, alpha),\n ]),\n );\n};\n\nexport const generateColorPalette = ({\n type,\n scale,\n appearance,\n}: {\n appearance: Appearance;\n scale: ColorScaleItem;\n type: 'Primary' | 'Success' | 'Warning' | 'Error' | 'Info' | string;\n}): Partial<AliasToken> =>\n applyRules(scale, appearance, COLOR_SLOT_RULES, `color${capitalize(type)}`);\n\nexport const generateColorNeutralPalette = ({\n scale,\n appearance,\n}: {\n appearance: Appearance;\n scale: ColorScaleItem;\n}): Partial<AliasToken> => ({\n ...applyRules(scale, appearance, NEUTRAL_SLOT_RULES),\n // 遮罩固定取亮色透明系列,不随外观切换\n colorBgMask: scale.lightA[8],\n});\n"],"mappings":";;AAcA,MAAM,mBAAwC;CAC5C;EAAC;EAAQ;EAAG;EAAG;CAAI;CACnB;EAAC;EAAiB;EAAG;EAAG;CAAI;CAC5B;EAAC;EAAgB;EAAG;EAAG;CAAI;CAC3B;EAAC;EAAkB;EAAG;EAAG;CAAI;CAC7B;EAAC;EAAM;EAAG;CAAC;CACX;EAAC;EAAW;EAAG;CAAC;CAChB;EAAC;EAAU;EAAG;CAAC;CACf;EAAC;EAAe;EAAG;CAAC;CACpB;EAAC;EAAS;EAAI;CAAC;CACf;EAAC;EAAI;EAAG;CAAC;CACT;EAAC;EAAU;EAAG;CAAE;CAChB;EAAC;EAAa;EAAI;CAAC;CACnB;EAAC;EAAQ;EAAG;CAAC;CACb;EAAC;EAAc;EAAG;CAAE;AACtB;AAEA,MAAM,qBAA0C;CAC9C;EAAC;EAAoB;EAAG;CAAC;CACzB;EAAC;EAAmB;EAAG;CAAC;CACxB;EAAC;EAAiB;EAAG;CAAC;CACtB;EAAC;EAAoB;EAAG;CAAC;CACzB;EAAC;EAAe;EAAG;CAAC;CACpB;EAAC;EAAwB;EAAG;CAAC;CAC7B;EAAC;EAAa;EAAG;EAAG;CAAI;CACxB;EAAC;EAAuB;EAAG;EAAG;CAAI;CAClC;EAAC;EAAsB;EAAG;EAAG;CAAI;CACjC;EAAC;EAAqB;EAAG;EAAG;CAAI;CAChC;EAAC;EAAa;EAAI;CAAE;CACpB;EAAC;EAAuB;EAAG;CAAC;CAC5B;EAAC;EAAsB;EAAI;CAAE;CAC7B;EAAC;EAAqB;EAAG;CAAC;AAC5B;AAEA,MAAM,YAAY,OAAuB,YAAwB,MAAc,QAAQ,UAAU;CAE/F,OAAO,MAD8B,QAAQ,GAAG,WAAW,KAAK,WAC5C,CAAC;AACvB;AAEA,MAAM,cACJ,OACA,YACA,OACA,SAAS,OACe;CACxB,MAAM,SAAS,eAAe;CAC9B,OAAO,OAAO,YACZ,MAAM,KAAK,CAAC,QAAQ,UAAU,WAAW,WAAW,CAClD,GAAG,SAAS,UACZ,SAAS,OAAO,YAAY,SAAS,WAAW,WAAW,KAAK,CAClE,CAAC,CACH;AACF;AAEA,MAAa,wBAAwB,EACnC,MACA,OACA,iBAMA,WAAW,OAAO,YAAY,kBAAkB,QAAQ,WAAW,IAAI,GAAG;AAE5E,MAAa,+BAA+B,EAC1C,OACA,kBAI0B;CAC1B,GAAG,WAAW,OAAO,YAAY,kBAAkB;CAEnD,aAAa,MAAM,OAAO;AAC5B"}
@@ -0,0 +1,64 @@
1
+ //#region src/styles/theme/token/base.ts
2
+ /** 含空格的字体名需要加引号。 */
3
+ const quoteFont = (font) => font.includes(" ") ? `"${font}"` : font;
4
+ const FONT_STACK_LATIN = [
5
+ "Geist",
6
+ "-apple-system",
7
+ "BlinkMacSystemFont",
8
+ "Segoe UI Variable Display",
9
+ "Segoe UI",
10
+ "Roboto",
11
+ "Helvetica Neue",
12
+ "Arial"
13
+ ];
14
+ const FONT_STACK_CJK = [
15
+ "HarmonyOS Sans SC",
16
+ "PingFang SC",
17
+ "Hiragino Sans GB",
18
+ "Microsoft YaHei UI",
19
+ "Microsoft YaHei",
20
+ "Source Han Sans SC",
21
+ "Noto Sans CJK SC"
22
+ ];
23
+ const FONT_STACK_MONO = [
24
+ "Geist Mono",
25
+ "ui-monospace",
26
+ "SFMono-Regular",
27
+ "SF Mono",
28
+ "Menlo",
29
+ "Cascadia Code",
30
+ "Consolas",
31
+ "Liberation Mono"
32
+ ];
33
+ const FONT_STACK_EMOJI = [
34
+ "Apple Color Emoji",
35
+ "Segoe UI Emoji",
36
+ "Segoe UI Symbol",
37
+ "Noto Color Emoji"
38
+ ];
39
+ const joinStack = (fonts) => fonts.map(quoteFont).join(",");
40
+ const baseToken = {
41
+ borderRadius: 6,
42
+ borderRadiusLG: 8,
43
+ borderRadiusSM: 4,
44
+ borderRadiusXS: 2,
45
+ controlHeight: 32,
46
+ fontFamily: joinStack([
47
+ ...FONT_STACK_LATIN,
48
+ ...FONT_STACK_CJK,
49
+ "ui-sans-serif",
50
+ "system-ui",
51
+ "sans-serif",
52
+ ...FONT_STACK_EMOJI
53
+ ]),
54
+ fontFamilyCode: joinStack([
55
+ ...FONT_STACK_MONO,
56
+ ...FONT_STACK_CJK,
57
+ "monospace",
58
+ ...FONT_STACK_EMOJI
59
+ ])
60
+ };
61
+ //#endregion
62
+ export { baseToken };
63
+
64
+ //# sourceMappingURL=base.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.mjs","names":[],"sources":["../../../../src/styles/theme/token/base.ts"],"sourcesContent":["import type { AliasToken } from 'antd/es/theme/interface';\n\n/** 含空格的字体名需要加引号。 */\nconst quoteFont = (font: string) => (font.includes(' ') ? `\"${font}\"` : font);\n\nconst FONT_STACK_LATIN = [\n 'Geist',\n '-apple-system',\n 'BlinkMacSystemFont',\n 'Segoe UI Variable Display',\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n 'Arial',\n];\n\nconst FONT_STACK_CJK = [\n 'HarmonyOS Sans SC',\n 'PingFang SC',\n 'Hiragino Sans GB',\n 'Microsoft YaHei UI',\n 'Microsoft YaHei',\n 'Source Han Sans SC',\n 'Noto Sans CJK SC',\n];\n\nconst FONT_STACK_MONO = [\n 'Geist Mono',\n 'ui-monospace',\n 'SFMono-Regular',\n 'SF Mono',\n 'Menlo',\n 'Cascadia Code',\n 'Consolas',\n 'Liberation Mono',\n];\n\nconst FONT_STACK_EMOJI = [\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol',\n 'Noto Color Emoji',\n];\n\nconst joinStack = (fonts: string[]) => fonts.map(quoteFont).join(',');\n\nexport const baseToken: Partial<AliasToken> = {\n // 圆角走 Linear 式的小圆角体系\n borderRadius: 6,\n borderRadiusLG: 8,\n borderRadiusSM: 4,\n borderRadiusXS: 2,\n // Linear 式紧凑密度\n controlHeight: 32,\n fontFamily: joinStack([\n ...FONT_STACK_LATIN,\n ...FONT_STACK_CJK,\n 'ui-sans-serif',\n 'system-ui',\n 'sans-serif',\n ...FONT_STACK_EMOJI,\n ]),\n fontFamilyCode: joinStack([\n ...FONT_STACK_MONO,\n ...FONT_STACK_CJK,\n 'monospace',\n ...FONT_STACK_EMOJI,\n ]),\n};\n"],"mappings":";;AAGA,MAAM,aAAa,SAAkB,KAAK,SAAS,GAAG,IAAI,IAAI,KAAK,KAAK;AAExE,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,iBAAiB;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,kBAAkB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;AACF;AAEA,MAAM,aAAa,UAAoB,MAAM,IAAI,SAAS,CAAC,CAAC,KAAK,GAAG;AAEpE,MAAa,YAAiC;CAE5C,cAAc;CACd,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAEhB,eAAe;CACf,YAAY,UAAU;EACpB,GAAG;EACH,GAAG;EACH;EACA;EACA;EACA,GAAG;CACL,CAAC;CACD,gBAAgB,UAAU;EACxB,GAAG;EACH,GAAG;EACH;EACA,GAAG;CACL,CAAC;AACH"}
@@ -0,0 +1,37 @@
1
+ import blue from "../../../color/colors/blue.mjs";
2
+ import gold from "../../../color/colors/gold.mjs";
3
+ import gray from "../../../color/colors/gray.mjs";
4
+ import lime from "../../../color/colors/lime.mjs";
5
+ import primary from "../../../color/colors/primary.mjs";
6
+ import red from "../../../color/colors/red.mjs";
7
+ import { generateColorNeutralPalette, generateColorPalette } from "../generateColorPalette.mjs";
8
+ //#region src/styles/theme/token/dark.ts
9
+ const darkBaseToken = {
10
+ ...Object.assign({}, ...[
11
+ ["Primary", primary],
12
+ ["Success", lime],
13
+ ["Warning", gold],
14
+ ["Error", red],
15
+ ["Info", blue]
16
+ ].map(([type, scale]) => generateColorPalette({
17
+ appearance: "dark",
18
+ scale,
19
+ type
20
+ })), generateColorNeutralPalette({
21
+ appearance: "dark",
22
+ scale: gray
23
+ })),
24
+ boxShadow: "0 16px 24px -12px rgba(0, 0, 0, 0.48)",
25
+ boxShadowSecondary: "0 6px 14px -6px rgba(0, 0, 0, 0.4)",
26
+ boxShadowTertiary: "0 2px 4px -1px rgba(0, 0, 0, 0.24)",
27
+ colorTextLightSolid: gray.dark[0]
28
+ };
29
+ Object.assign(darkBaseToken, {
30
+ colorLink: darkBaseToken.colorInfoText,
31
+ colorLinkActive: darkBaseToken.colorInfoTextActive,
32
+ colorLinkHover: darkBaseToken.colorInfoTextHover
33
+ });
34
+ //#endregion
35
+ export { darkBaseToken as default };
36
+
37
+ //# sourceMappingURL=dark.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dark.mjs","names":[],"sources":["../../../../src/styles/theme/token/dark.ts"],"sourcesContent":["import type { AliasToken } from 'antd/es/theme/interface';\n\nimport { blue, gold, gray, lime, primary, red } from '@/color/colors';\n\nimport { generateColorNeutralPalette, generateColorPalette } from '../generateColorPalette';\n\n/** 语义色 → 色板。暗色主题的语义色取更亮的色板变体保证对比度。 */\nconst SEMANTIC_SCALES = [\n ['Primary', primary],\n ['Success', lime],\n ['Warning', gold],\n ['Error', red],\n ['Info', blue],\n] as const;\n\nconst darkBaseToken: Partial<AliasToken> = {\n ...Object.assign(\n {},\n ...SEMANTIC_SCALES.map(([type, scale]) =>\n generateColorPalette({ appearance: 'dark', scale, type }),\n ),\n generateColorNeutralPalette({ appearance: 'dark', scale: gray }),\n ),\n // 暗色下阴影让位于发丝边框,只保留轻微层次\n boxShadow: '0 16px 24px -12px rgba(0, 0, 0, 0.48)',\n boxShadowSecondary: '0 6px 14px -6px rgba(0, 0, 0, 0.4)',\n boxShadowTertiary: '0 2px 4px -1px rgba(0, 0, 0, 0.24)',\n colorTextLightSolid: gray.dark[0],\n};\n\nObject.assign(darkBaseToken, {\n colorLink: darkBaseToken.colorInfoText,\n colorLinkActive: darkBaseToken.colorInfoTextActive,\n colorLinkHover: darkBaseToken.colorInfoTextHover,\n});\n\nexport default darkBaseToken;\n"],"mappings":";;;;;;;;AAeA,MAAM,gBAAqC;CACzC,GAAG,OAAO,OACR,CAAC,GACD,GAAG;EAVL,CAAC,WAAW,OAAO;EACnB,CAAC,WAAW,IAAI;EAChB,CAAC,WAAW,IAAI;EAChB,CAAC,SAAS,GAAG;EACb,CAAC,QAAQ,IAAI;CAMM,CAAC,CAAC,KAAK,CAAC,MAAM,WAC7B,qBAAqB;EAAE,YAAY;EAAQ;EAAO;CAAK,CAAC,CAC1D,GACA,4BAA4B;EAAE,YAAY;EAAQ,OAAO;CAAK,CAAC,CACjE;CAEA,WAAW;CACX,oBAAoB;CACpB,mBAAmB;CACnB,qBAAqB,KAAK,KAAK;AACjC;AAEA,OAAO,OAAO,eAAe;CAC3B,WAAW,cAAc;CACzB,iBAAiB,cAAc;CAC/B,gBAAgB,cAAc;AAChC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import geekblue from "../../../color/colors/geekblue.mjs";
2
+ import gold from "../../../color/colors/gold.mjs";
3
+ import gray from "../../../color/colors/gray.mjs";
4
+ import green from "../../../color/colors/green.mjs";
5
+ import primary from "../../../color/colors/primary.mjs";
6
+ import volcano from "../../../color/colors/volcano.mjs";
7
+ import { generateColorNeutralPalette, generateColorPalette } from "../generateColorPalette.mjs";
8
+ //#region src/styles/theme/token/light.ts
9
+ const lightBaseToken = {
10
+ ...Object.assign({}, ...[
11
+ ["Primary", primary],
12
+ ["Success", green],
13
+ ["Warning", gold],
14
+ ["Error", volcano],
15
+ ["Info", geekblue]
16
+ ].map(([type, scale]) => generateColorPalette({
17
+ appearance: "light",
18
+ scale,
19
+ type
20
+ })), generateColorNeutralPalette({
21
+ appearance: "light",
22
+ scale: gray
23
+ })),
24
+ boxShadow: "0 16px 24px -12px rgba(0, 0, 0, 0.28)",
25
+ boxShadowSecondary: "0 6px 14px -6px rgba(0, 0, 0, 0.2)",
26
+ boxShadowTertiary: "0 2px 4px -1px rgba(0, 0, 0, 0.08)",
27
+ colorTextLightSolid: gray.light[1]
28
+ };
29
+ Object.assign(lightBaseToken, {
30
+ colorLink: lightBaseToken.colorInfoText,
31
+ colorLinkActive: lightBaseToken.colorInfoTextActive,
32
+ colorLinkHover: lightBaseToken.colorInfoTextHover
33
+ });
34
+ //#endregion
35
+ export { lightBaseToken as default };
36
+
37
+ //# sourceMappingURL=light.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"light.mjs","names":[],"sources":["../../../../src/styles/theme/token/light.ts"],"sourcesContent":["import type { AliasToken } from 'antd/es/theme/interface';\n\nimport { geekblue, gold, gray, green, primary, volcano } from '@/color/colors';\n\nimport { generateColorNeutralPalette, generateColorPalette } from '../generateColorPalette';\n\n/** 语义色 → 色板。亮色主题的语义色取常规色板。 */\nconst SEMANTIC_SCALES = [\n ['Primary', primary],\n ['Success', green],\n ['Warning', gold],\n ['Error', volcano],\n ['Info', geekblue],\n] as const;\n\nconst lightBaseToken: Partial<AliasToken> = {\n ...Object.assign(\n {},\n ...SEMANTIC_SCALES.map(([type, scale]) =>\n generateColorPalette({ appearance: 'light', scale, type }),\n ),\n generateColorNeutralPalette({ appearance: 'light', scale: gray }),\n ),\n // Linear 式收敛的阴影:小弥散、低透明\n boxShadow: '0 16px 24px -12px rgba(0, 0, 0, 0.28)',\n boxShadowSecondary: '0 6px 14px -6px rgba(0, 0, 0, 0.2)',\n boxShadowTertiary: '0 2px 4px -1px rgba(0, 0, 0, 0.08)',\n colorTextLightSolid: gray.light[1],\n};\n\nObject.assign(lightBaseToken, {\n colorLink: lightBaseToken.colorInfoText,\n colorLinkActive: lightBaseToken.colorInfoTextActive,\n colorLinkHover: lightBaseToken.colorInfoTextHover,\n});\n\nexport default lightBaseToken;\n"],"mappings":";;;;;;;;AAeA,MAAM,iBAAsC;CAC1C,GAAG,OAAO,OACR,CAAC,GACD,GAAG;EAVL,CAAC,WAAW,OAAO;EACnB,CAAC,WAAW,KAAK;EACjB,CAAC,WAAW,IAAI;EAChB,CAAC,SAAS,OAAO;EACjB,CAAC,QAAQ,QAAQ;CAME,CAAC,CAAC,KAAK,CAAC,MAAM,WAC7B,qBAAqB;EAAE,YAAY;EAAS;EAAO;CAAK,CAAC,CAC3D,GACA,4BAA4B;EAAE,YAAY;EAAS,OAAO;CAAK,CAAC,CAClE;CAEA,WAAW;CACX,oBAAoB;CACpB,mBAAmB;CACnB,qBAAqB,KAAK,MAAM;AAClC;AAEA,OAAO,OAAO,gBAAgB;CAC5B,WAAW,eAAe;CAC1B,iBAAiB,eAAe;CAChC,gBAAgB,eAAe;AACjC,CAAC"}
@@ -0,0 +1,28 @@
1
+ //#region src/types/customStylish.d.ts
2
+ /**
3
+ * 自定义 stylish 的契约:每个键是一段可组合的 CSS(SerializedStyles)。
4
+ * 实现见 styles/theme/customStylish.ts(token 版)与 customStylishStatic.ts(cssVar 静态版)。
5
+ */
6
+ interface SuperadCustomStylish {
7
+ active: string;
8
+ blur: string;
9
+ blurStrong: string;
10
+ bottomScrollbar: string;
11
+ disabled: string;
12
+ gradientAnimation: string;
13
+ noScrollbar: string;
14
+ resetLinkColor: string;
15
+ shadow: string;
16
+ variantBorderless: string;
17
+ variantBorderlessDanger: string;
18
+ variantBorderlessWithoutHover: string;
19
+ variantFilled: string;
20
+ variantFilledDanger: string;
21
+ variantFilledWithoutHover: string;
22
+ variantOutlined: string;
23
+ variantOutlinedDanger: string;
24
+ variantOutlinedWithoutHover: string;
25
+ }
26
+ //#endregion
27
+ export { SuperadCustomStylish };
28
+ //# sourceMappingURL=customStylish.d.mts.map
@@ -0,0 +1,34 @@
1
+ //#region src/types/customToken.d.ts
2
+ /**
3
+ * 自定义 token 的类型契约。
4
+ * 由 generateCustomColorToken 在运行期按色板生成,这里给出静态类型。
5
+ */
6
+ /** 彩色色板名(色轮顺序,驱动主题面板的色板展示顺序) */
7
+ declare const PresetColors: readonly ["red", "volcano", "orange", "gold", "yellow", "lime", "green", "cyan", "blue", "geekblue", "purple", "magenta", "gray"];
8
+ /** 语义色名 */
9
+ declare const PresetSystemColors: readonly ["Error", "Warning", "Success", "Info"];
10
+ type PresetColorKey = (typeof PresetColors)[number];
11
+ type PresetSystemColorKey = (typeof PresetSystemColors)[number];
12
+ type PresetColorType = Record<PresetColorKey, string>;
13
+ type PresetSystemColorType = Record<PresetSystemColorKey, string>;
14
+ /** 色阶步入 token 的下标范围(0 与 12 不产出步入 token) */
15
+ type ColorPaletteKeyIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
16
+ /** 每个彩色色板产出的语义后缀 */
17
+ type ColorTokenKey = 'Fill' | 'FillSecondary' | 'FillTertiary' | 'FillQuaternary' | 'Bg' | 'BgHover' | 'Border' | 'BorderSecondary' | 'BorderHover' | '' | 'Hover' | 'Active' | 'Text' | 'TextHover' | 'TextActive';
18
+ /** 语义色只产出填充系列 */
19
+ type SystemColorTokenKey = 'Fill' | 'FillSecondary' | 'FillTertiary' | 'FillQuaternary';
20
+ /** 语义槽位 token,如 redFill / blueTextHover */
21
+ type ColorToken = { [key in `${keyof PresetColorType}${ColorTokenKey}`]: string; };
22
+ /** 语义色填充 token,如 colorErrorFill */
23
+ type SystemColorToken = { [key in `color${keyof PresetSystemColorType}${SystemColorTokenKey}`]: string; };
24
+ /** 色阶步入 token(实色),如 red1 … red11 */
25
+ type ColorPalettes = { [key in `${keyof PresetColorType}${ColorPaletteKeyIndex}`]: string; };
26
+ /** 色阶步入 token(透明系列),如 red1A … red11A */
27
+ type ColorPalettesAlpha = { [key in `${keyof PresetColorType}${ColorPaletteKeyIndex}A`]: string; };
28
+ interface SuperadCustomToken extends ColorPalettes, ColorPalettesAlpha, ColorToken, SystemColorToken {
29
+ /** colorBgContainer 与 colorBgLayout 的 1:1 混合色 */
30
+ colorBgContainerSecondary: string;
31
+ }
32
+ //#endregion
33
+ export { ColorPalettes, ColorPalettesAlpha, ColorToken, PresetColorKey, PresetColorType, PresetColors, PresetSystemColorKey, PresetSystemColorType, PresetSystemColors, SuperadCustomToken, SystemColorToken };
34
+ //# sourceMappingURL=customToken.d.mts.map
@@ -0,0 +1,32 @@
1
+ //#region src/types/customToken.ts
2
+ /**
3
+ * 自定义 token 的类型契约。
4
+ * 由 generateCustomColorToken 在运行期按色板生成,这里给出静态类型。
5
+ */
6
+ /** 彩色色板名(色轮顺序,驱动主题面板的色板展示顺序) */
7
+ const PresetColors = [
8
+ "red",
9
+ "volcano",
10
+ "orange",
11
+ "gold",
12
+ "yellow",
13
+ "lime",
14
+ "green",
15
+ "cyan",
16
+ "blue",
17
+ "geekblue",
18
+ "purple",
19
+ "magenta",
20
+ "gray"
21
+ ];
22
+ /** 语义色名 */
23
+ const PresetSystemColors = [
24
+ "Error",
25
+ "Warning",
26
+ "Success",
27
+ "Info"
28
+ ];
29
+ //#endregion
30
+ export { PresetColors, PresetSystemColors };
31
+
32
+ //# sourceMappingURL=customToken.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customToken.mjs","names":[],"sources":["../../src/types/customToken.ts"],"sourcesContent":["/**\n * 自定义 token 的类型契约。\n * 由 generateCustomColorToken 在运行期按色板生成,这里给出静态类型。\n */\n\n/** 彩色色板名(色轮顺序,驱动主题面板的色板展示顺序) */\nexport const PresetColors = [\n 'red',\n 'volcano',\n 'orange',\n 'gold',\n 'yellow',\n 'lime',\n 'green',\n 'cyan',\n 'blue',\n 'geekblue',\n 'purple',\n 'magenta',\n 'gray',\n] as const;\n\n/** 语义色名 */\nexport const PresetSystemColors = ['Error', 'Warning', 'Success', 'Info'] as const;\n\nexport type PresetColorKey = (typeof PresetColors)[number];\nexport type PresetSystemColorKey = (typeof PresetSystemColors)[number];\n\nexport type PresetColorType = Record<PresetColorKey, string>;\nexport type PresetSystemColorType = Record<PresetSystemColorKey, string>;\n\n/** 色阶步入 token 的下标范围(0 与 12 不产出步入 token) */\ntype ColorPaletteKeyIndex = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;\n\n/** 每个彩色色板产出的语义后缀 */\ntype ColorTokenKey =\n // 填充(alpha 系列)\n | 'Fill'\n | 'FillSecondary'\n | 'FillTertiary'\n | 'FillQuaternary'\n // 背景\n | 'Bg'\n | 'BgHover'\n // 边框\n | 'Border'\n | 'BorderSecondary'\n | 'BorderHover'\n // 实色本体与交互态\n | ''\n | 'Hover'\n | 'Active'\n // 文字\n | 'Text'\n | 'TextHover'\n | 'TextActive';\n\n/** 语义色只产出填充系列 */\ntype SystemColorTokenKey = 'Fill' | 'FillSecondary' | 'FillTertiary' | 'FillQuaternary';\n\n/** 语义槽位 token,如 redFill / blueTextHover */\nexport type ColorToken = {\n [key in `${keyof PresetColorType}${ColorTokenKey}`]: string;\n};\n\n/** 语义色填充 token,如 colorErrorFill */\nexport type SystemColorToken = {\n [key in `color${keyof PresetSystemColorType}${SystemColorTokenKey}`]: string;\n};\n\n/** 色阶步入 token(实色),如 red1 … red11 */\nexport type ColorPalettes = {\n [key in `${keyof PresetColorType}${ColorPaletteKeyIndex}`]: string;\n};\n\n/** 色阶步入 token(透明系列),如 red1A … red11A */\nexport type ColorPalettesAlpha = {\n [key in `${keyof PresetColorType}${ColorPaletteKeyIndex}A`]: string;\n};\n\nexport interface SuperadCustomToken\n extends ColorPalettes, ColorPalettesAlpha, ColorToken, SystemColorToken {\n /** colorBgContainer 与 colorBgLayout 的 1:1 混合色 */\n colorBgContainerSecondary: string;\n}\n"],"mappings":";;;;;;AAMA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAGA,MAAa,qBAAqB;CAAC;CAAS;CAAW;CAAW;AAAM"}
@@ -0,0 +1,15 @@
1
+ import { SuperadCustomStylish } from "./customStylish.mjs";
2
+ import { ColorPalettes, ColorPalettesAlpha, ColorToken, PresetColorKey, PresetColorType, PresetColors, PresetSystemColorKey, PresetSystemColorType, PresetSystemColors, SuperadCustomToken, SystemColorToken } from "./customToken.mjs";
3
+ import { AnchorHTMLAttributes, HTMLAttributes } from "react";
4
+ //#region src/types/index.d.ts
5
+ type DivProps = HTMLAttributes<HTMLDivElement>;
6
+ type SpanProps = HTMLAttributes<HTMLSpanElement>;
7
+ type ImgProps = HTMLAttributes<HTMLImageElement>;
8
+ type VideoProps = HTMLAttributes<HTMLVideoElement>;
9
+ type SvgProps = HTMLAttributes<SVGSVGElement>;
10
+ type InputProps = HTMLAttributes<HTMLInputElement>;
11
+ type TextAreaProps = HTMLAttributes<HTMLTextAreaElement>;
12
+ type AProps = AnchorHTMLAttributes<HTMLAnchorElement>;
13
+ //#endregion
14
+ export { AProps, ColorPalettes, ColorPalettesAlpha, ColorToken, DivProps, ImgProps, InputProps, PresetColorKey, PresetColorType, PresetColors, PresetSystemColorKey, PresetSystemColorType, PresetSystemColors, SpanProps, SuperadCustomStylish, SuperadCustomToken, SvgProps, SystemColorToken, TextAreaProps, VideoProps };
15
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ export * from './index.d.mts';
@@ -0,0 +1 @@
1
+ export * from './index.mjs';
@@ -0,0 +1,2 @@
1
+ import { PresetColors, PresetSystemColors } from "./customToken.mjs";
2
+ export { PresetColors, PresetSystemColors };
@@ -0,0 +1,5 @@
1
+ //#region src/utils/composeEventHandlers.d.ts
2
+ declare const composeEventHandlers: <E>(theirHandler: ((event: E) => void) | undefined, ourHandler: (event: E) => void) => ((event: E) => void);
3
+ //#endregion
4
+ export { composeEventHandlers };
5
+ //# sourceMappingURL=composeEventHandlers.d.mts.map
@@ -0,0 +1,10 @@
1
+ //#region src/utils/composeEventHandlers.ts
2
+ const composeEventHandlers = (theirHandler, ourHandler) => (event) => {
3
+ theirHandler?.(event);
4
+ if (event?.defaultPrevented) return;
5
+ ourHandler(event);
6
+ };
7
+ //#endregion
8
+ export { composeEventHandlers };
9
+
10
+ //# sourceMappingURL=composeEventHandlers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeEventHandlers.mjs","names":[],"sources":["../../src/utils/composeEventHandlers.ts"],"sourcesContent":["export const composeEventHandlers =\n <E>(\n theirHandler: ((event: E) => void) | undefined,\n ourHandler: (event: E) => void,\n ): ((event: E) => void) =>\n (event) => {\n theirHandler?.(event);\n if ((event as { defaultPrevented?: boolean })?.defaultPrevented) return;\n ourHandler(event);\n };\n"],"mappings":";AAAA,MAAa,wBAET,cACA,gBAED,UAAU;CACT,eAAe,KAAK;CACpB,IAAK,OAA0C,kBAAkB;CACjE,WAAW,KAAK;AAClB"}
@@ -0,0 +1,5 @@
1
+ //#region src/utils/copyToClipboard.d.ts
2
+ declare const copyToClipboard: (text: string) => Promise<void>;
3
+ //#endregion
4
+ export { copyToClipboard };
5
+ //# sourceMappingURL=copyToClipboard.d.mts.map
@@ -0,0 +1,28 @@
1
+ //#region src/utils/copyToClipboard.ts
2
+ /**
3
+ * 优先走异步 Clipboard API;不可用或被拒绝(权限、非安全上下文)时
4
+ * 退回隐藏 textarea + execCommand 的老路子。
5
+ */
6
+ const legacyCopy = (text) => {
7
+ const el = document.createElement("textarea");
8
+ el.value = text;
9
+ el.style.cssText = "position:fixed;top:0;left:0;opacity:0;pointer-events:none;";
10
+ document.body.append(el);
11
+ el.select();
12
+ try {
13
+ document.execCommand("copy");
14
+ } finally {
15
+ el.remove();
16
+ }
17
+ };
18
+ const copyToClipboard = async (text) => {
19
+ if (typeof navigator !== "undefined" && navigator.clipboard) try {
20
+ await navigator.clipboard.writeText(text);
21
+ return;
22
+ } catch {}
23
+ legacyCopy(text);
24
+ };
25
+ //#endregion
26
+ export { copyToClipboard };
27
+
28
+ //# sourceMappingURL=copyToClipboard.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copyToClipboard.mjs","names":[],"sources":["../../src/utils/copyToClipboard.ts"],"sourcesContent":["/**\n * 优先走异步 Clipboard API;不可用或被拒绝(权限、非安全上下文)时\n * 退回隐藏 textarea + execCommand 的老路子。\n */\nconst legacyCopy = (text: string): void => {\n const el = document.createElement('textarea');\n el.value = text;\n // 避免插入节点引起页面跳动或触发聚焦样式\n el.style.cssText = 'position:fixed;top:0;left:0;opacity:0;pointer-events:none;';\n document.body.append(el);\n el.select();\n try {\n document.execCommand('copy');\n } finally {\n el.remove();\n }\n};\n\nexport const copyToClipboard = async (text: string): Promise<void> => {\n if (typeof navigator !== 'undefined' && navigator.clipboard) {\n try {\n await navigator.clipboard.writeText(text);\n return;\n } catch {\n // 继续走兜底\n }\n }\n legacyCopy(text);\n};\n"],"mappings":";;;;;AAIA,MAAM,cAAc,SAAuB;CACzC,MAAM,KAAK,SAAS,cAAc,UAAU;CAC5C,GAAG,QAAQ;CAEX,GAAG,MAAM,UAAU;CACnB,SAAS,KAAK,OAAO,EAAE;CACvB,GAAG,OAAO;CACV,IAAI;EACF,SAAS,YAAY,MAAM;CAC7B,UAAU;EACR,GAAG,OAAO;CACZ;AACF;AAEA,MAAa,kBAAkB,OAAO,SAAgC;CACpE,IAAI,OAAO,cAAc,eAAe,UAAU,WAChD,IAAI;EACF,MAAM,UAAU,UAAU,UAAU,IAAI;EACxC;CACF,QAAQ,CAER;CAEF,WAAW,IAAI;AACjB"}
@@ -0,0 +1,15 @@
1
+ //#region src/utils/dom.d.ts
2
+ interface Preventable {
3
+ preventDefault: () => void;
4
+ }
5
+ interface Stoppable {
6
+ stopPropagation: () => void;
7
+ }
8
+ declare function preventDefault<T extends Preventable>(event: T): void;
9
+ declare function stopPropagation<T extends Stoppable>(event: T): void;
10
+ declare function preventDefaultAndStopPropagation<T extends Preventable & Stoppable & {
11
+ preventBaseUIHandler?: () => void;
12
+ }>(event: T): void;
13
+ //#endregion
14
+ export { preventDefault, preventDefaultAndStopPropagation, stopPropagation };
15
+ //# sourceMappingURL=dom.d.mts.map
@@ -0,0 +1,16 @@
1
+ //#region src/utils/dom.ts
2
+ function preventDefault(event) {
3
+ event.preventDefault();
4
+ }
5
+ function stopPropagation(event) {
6
+ event.stopPropagation();
7
+ }
8
+ function preventDefaultAndStopPropagation(event) {
9
+ event.preventDefault();
10
+ event.stopPropagation();
11
+ event.preventBaseUIHandler?.();
12
+ }
13
+ //#endregion
14
+ export { preventDefault, preventDefaultAndStopPropagation, stopPropagation };
15
+
16
+ //# sourceMappingURL=dom.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.mjs","names":[],"sources":["../../src/utils/dom.ts"],"sourcesContent":["interface Preventable {\n preventDefault: () => void;\n}\n\ninterface Stoppable {\n stopPropagation: () => void;\n}\n\nexport function preventDefault<T extends Preventable>(event: T): void {\n event.preventDefault();\n}\n\nexport function stopPropagation<T extends Stoppable>(event: T): void {\n event.stopPropagation();\n}\n\nexport function preventDefaultAndStopPropagation<\n T extends Preventable & Stoppable & { preventBaseUIHandler?: () => void },\n>(event: T): void {\n event.preventDefault();\n event.stopPropagation();\n event.preventBaseUIHandler?.();\n}\n"],"mappings":";AAQA,SAAgB,eAAsC,OAAgB;CACpE,MAAM,eAAe;AACvB;AAEA,SAAgB,gBAAqC,OAAgB;CACnE,MAAM,gBAAgB;AACxB;AAEA,SAAgB,iCAEd,OAAgB;CAChB,MAAM,eAAe;CACrB,MAAM,gBAAgB;CACtB,MAAM,uBAAuB;AAC/B"}
@@ -0,0 +1,12 @@
1
+ //#region src/utils/genCdnUrl.d.ts
2
+ type CDN = 'aliyun' | 'unpkg';
3
+ interface CdnApi {
4
+ path: string;
5
+ pkg: string;
6
+ proxy?: CDN;
7
+ version?: string;
8
+ }
9
+ declare const genCdnUrl: ({ path, pkg, proxy, version }: CdnApi) => string;
10
+ //#endregion
11
+ export { CDN, CdnApi, genCdnUrl };
12
+ //# sourceMappingURL=genCdnUrl.d.mts.map
@@ -0,0 +1,17 @@
1
+ import urlJoin from "url-join";
2
+ //#region src/utils/genCdnUrl.ts
3
+ const UNPKG_API = "https://unpkg.com";
4
+ const ALIYUN_API = "https://registry.npmmirror.com";
5
+ const builders = {
6
+ aliyun: ({ path, pkg, version }) => urlJoin(ALIYUN_API, pkg, version, "files", path),
7
+ unpkg: ({ path, pkg, version }) => urlJoin(UNPKG_API, `${pkg}@${version}`, path)
8
+ };
9
+ const genCdnUrl = ({ path, pkg, proxy = "aliyun", version = "latest" }) => builders[proxy]({
10
+ path,
11
+ pkg,
12
+ version
13
+ });
14
+ //#endregion
15
+ export { ALIYUN_API, UNPKG_API, genCdnUrl };
16
+
17
+ //# sourceMappingURL=genCdnUrl.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genCdnUrl.mjs","names":[],"sources":["../../src/utils/genCdnUrl.ts"],"sourcesContent":["import urlJoin from 'url-join';\n\nconst UNPKG_API = 'https://unpkg.com';\nconst ALIYUN_API = 'https://registry.npmmirror.com';\n\nexport type CDN = 'aliyun' | 'unpkg';\nexport interface CdnApi {\n path: string;\n pkg: string;\n proxy?: CDN;\n version?: string;\n}\n\ntype ResolvedCdnApi = Required<Omit<CdnApi, 'proxy'>>;\n\nconst builders: Record<CDN, (api: ResolvedCdnApi) => string> = {\n aliyun: ({ path, pkg, version }) => urlJoin(ALIYUN_API, pkg, version, 'files', path),\n unpkg: ({ path, pkg, version }) => urlJoin(UNPKG_API, `${pkg}@${version}`, path),\n};\n\nexport const genCdnUrl = ({ path, pkg, proxy = 'aliyun', version = 'latest' }: CdnApi): string =>\n builders[proxy]({ path, pkg, version });\n\nexport { ALIYUN_API, UNPKG_API };\n"],"mappings":";;AAEA,MAAM,YAAY;AAClB,MAAM,aAAa;AAYnB,MAAM,WAAyD;CAC7D,SAAS,EAAE,MAAM,KAAK,cAAc,QAAQ,YAAY,KAAK,SAAS,SAAS,IAAI;CACnF,QAAQ,EAAE,MAAM,KAAK,cAAc,QAAQ,WAAW,GAAG,IAAI,GAAG,WAAW,IAAI;AACjF;AAEA,MAAa,aAAa,EAAE,MAAM,KAAK,QAAQ,UAAU,UAAU,eACjE,SAAS,MAAM,CAAC;CAAE;CAAM;CAAK;AAAQ,CAAC"}
@@ -0,0 +1,6 @@
1
+ //#region src/utils/safeReadableColor.ts
2
+ const safeReadableColor = (bgColor) => `oklch(from ${bgColor} clamp(0, (l - 0.62) * -1000, 1) 0 h / 1)`;
3
+ //#endregion
4
+ export { safeReadableColor };
5
+
6
+ //# sourceMappingURL=safeReadableColor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safeReadableColor.mjs","names":[],"sources":["../../src/utils/safeReadableColor.ts"],"sourcesContent":["export const safeReadableColor = (bgColor: string): string =>\n `oklch(from ${bgColor} clamp(0, (l - 0.62) * -1000, 1) 0 h / 1)`;\n"],"mappings":";AAAA,MAAa,qBAAqB,YAChC,cAAc,QAAQ"}