Skip to content

Commit

Permalink
feat: Bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
nuintun committed Jun 19, 2024
1 parent 580a8ce commit bf72ea0
Show file tree
Hide file tree
Showing 5 changed files with 202 additions and 186 deletions.
18 changes: 12 additions & 6 deletions app/js/hooks/createStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
* @module createStyles
*/

import createCalc from 'antd/es/theme/util/calc';
import createMaxMin from 'antd/es/theme/util/maxmin';
import {
AbstractCalculator,
CSSInterpolation,
genCalc,
token2CSSVar,
unit,
useCSSVarRegister,
useStyleRegister
} from '@ant-design/cssinjs';
import genMaxMin from 'antd/es/theme/util/maxmin';
import { isNumber, isString } from '/js/utils/utils';
import { memo, ReactElement, useId, useMemo } from 'react';
import AbstractCalculator from 'antd/es/theme/util/calc/calculator';
import { AliasToken, GlobalToken, OverrideToken } from 'antd/es/theme/interface';
import useToken, { ignore, unitless as unitlessSeeds } from 'antd/es/theme/useToken';
import { CSSInterpolation, token2CSSVar, unit, useCSSVarRegister, useStyleRegister } from '@ant-design/cssinjs';

interface CSSVar {
key: string;
Expand Down Expand Up @@ -214,10 +220,10 @@ export default function createStyles<C extends Components = never>(path: string[

const utils = useMemo(() => {
const type = cssVar ? 'css' : 'js';
const { max, min } = createMaxMin(type);
const { max, min } = genMaxMin(type);
const unitlessCssVar = new Set(Object.keys(unitless));

return { min, max, unit, calc: createCalc(type, unitlessCssVar) };
return { min, max, unit, calc: genCalc(type, unitlessCssVar) };
}, [cssVar, unitless]);

const render = useStyleRegister({ path, theme, token, hashId }, () => {
Expand Down
2 changes: 1 addition & 1 deletion app/js/hooks/useSearchFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Query as Filter } from '/js/utils/request';
export type { Filter };

export type SearchFilters<T extends Filter[]> = {
[K in keyof T]: T[K] extends Filter ? T[K] | false : T[K];
[K in keyof T]: T[K] | false;
};

/**
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@ant-design/plots": "^2.2.2",
"@nuintun/qrcode": "^4.1.3",
"@swc/helpers": "^0.5.11",
"antd": "^5.18.2",
"antd": "^5.18.3",
"classnames": "^2.5.1",
"core-js": "^3.37.1",
"dayjs": "^1.11.11",
Expand All @@ -40,7 +40,7 @@
"devDependencies": {
"@nuintun/svgo-loader": "^0.2.8",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
"@swc/core": "^1.6.1",
"@swc/core": "^1.6.3",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/throttle-debounce": "^5.0.2",
Expand All @@ -61,7 +61,7 @@
"postcss": "^8.4.38",
"postcss-loader": "^8.1.1",
"prettier": "^3.3.2",
"sass": "^1.77.5",
"sass": "^1.77.6",
"sass-loader": "^14.2.1",
"svgc-loader": "^0.2.8",
"swc-loader": "^0.2.6",
Expand Down
Loading

0 comments on commit bf72ea0

Please sign in to comment.