Skip to content

Commit

Permalink
refactor: add boime lint and fix lint errrors (ant-design#49536)
Browse files Browse the repository at this point in the history
* chore: add boime lint

* fix lint

* use files ignore

* revert change

* ignore clarity.js

* fix some errors

* fix some errors

* fix some errors

* fix some errors

* add yml file

* Update clarity.js

Signed-off-by: afc163 <[email protected]>

* add npm run lint:biome

* add npm run lint:biome

* fix test case

* fix ts errors

* fix ts errors

* fix lint and add .lintstagedrc

* shorten prop name

* chore: update package.json

* update biome.json

* chore: remove stylelint

* chore: useOptionalChain

* fix lint

* biome format

* prettier all code

* prettier all code

* fix site test

---------

Signed-off-by: afc163 <[email protected]>
  • Loading branch information
afc163 authored Jun 22, 2024
1 parent c5114b3 commit 59ad484
Show file tree
Hide file tree
Showing 265 changed files with 1,948 additions and 504 deletions.
28 changes: 14 additions & 14 deletions .dumi/hooks/use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ function use<T>(promise: PromiseLike<T>): T {
}
if (internal.status === 'rejected') {
throw internal.reason;
} else if (internal.status === 'pending') {
throw internal;
} else {
internal.status = 'pending';
internal.then(
(result) => {
internal.status = 'fulfilled';
internal.value = result;
},
(reason) => {
internal.status = 'rejected';
internal.reason = reason;
},
);
}
if (internal.status === 'pending') {
throw internal;
}
internal.status = 'pending';
internal.then(
(result) => {
internal.status = 'fulfilled';
internal.value = result;
},
(reason) => {
internal.status = 'rejected';
internal.reason = reason;
},
);
throw internal;
}

export default use;
1 change: 1 addition & 0 deletions .dumi/hooks/useFetch/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fetch from 'cross-fetch';

import use from '../use';
import FetchCache from './cache';

Expand Down
3 changes: 2 additions & 1 deletion .dumi/hooks/useLocation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useLocation as useDumiLocation } from 'dumi';
import * as React from 'react';
import { useLocation as useDumiLocation } from 'dumi';

import useLocale from './useLocale';

function clearPath(path: string) {
Expand Down
7 changes: 4 additions & 3 deletions .dumi/pages/404/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { HomeOutlined } from '@ant-design/icons';
import { useLocation } from 'dumi';
import React, { useEffect } from 'react';
import { HomeOutlined } from '@ant-design/icons';
import { Button, Result } from 'antd';
import * as utils from '../../theme/utils';
import { useLocation } from 'dumi';

import Link from '../../theme/common/Link';
import * as utils from '../../theme/utils';

export interface NotFoundProps {
router: {
Expand Down
2 changes: 1 addition & 1 deletion .dumi/pages/index/components/DesignFramework.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { useLocation } from 'dumi';

import useDark from '../../../hooks/useDark';
import useLocale from '../../../hooks/useLocale';
import Link from '../../../theme/common/Link';
import SiteContext from '../../../theme/slots/SiteContext';
import * as utils from '../../../theme/utils';
import Link from '../../../theme/common/Link';

const SECONDARY_LIST = [
{
Expand Down
2 changes: 1 addition & 1 deletion .dumi/pages/index/components/PreviewBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { createStyles } from 'antd-style';
import { useLocation } from 'dumi';

import useLocale from '../../../../hooks/useLocale';
import Link from '../../../../theme/common/Link';
import SiteContext from '../../../../theme/slots/SiteContext';
import * as utils from '../../../../theme/utils';
import Link from '../../../../theme/common/Link';
import GroupMaskLayer from '../GroupMaskLayer';

const ComponentsBlock = React.lazy(() => import('./ComponentsBlock'));
Expand Down
2 changes: 1 addition & 1 deletion .dumi/pages/index/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { createStyles, css } from 'antd-style';
import useDark from '../../hooks/useDark';
import useLocale from '../../hooks/useLocale';
import BannerRecommends from './components/BannerRecommends';
import PreviewBanner from './components/PreviewBanner';
import Group from './components/Group';
import PreviewBanner from './components/PreviewBanner';

const ComponentsList = React.lazy(() => import('./components/ComponentsList'));
const DesignFramework = React.lazy(() => import('./components/DesignFramework'));
Expand Down
2 changes: 1 addition & 1 deletion .dumi/rehypeAntd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function rehypeAntd(): UnifiedTransformer<HastRoot> {
const code = (node.children[0] as any).value as string;
const configRegx = /^const sandpackConfig = ([\S\s]*?});/;
const [configString] = code.match(configRegx) || [];
// eslint-disable-next-line no-eval
/* biome-ignore lint/security/noGlobalEval: used in documentation */ /* eslint-disable-next-line no-eval */
const config = configString && eval(`(${configString.replace(configRegx, '$1')})`);
Object.keys(config || {}).forEach((key) => {
if (typeof config[key] === 'object') {
Expand Down
2 changes: 1 addition & 1 deletion .dumi/theme/builtins/IconSearch/IconSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const IconSearch: React.FC = () => {
if (searchKey) {
const matchKey = searchKey
// eslint-disable-next-line prefer-regex-literals
.replace(new RegExp(`^<([a-zA-Z]*)\\s/>$`, 'gi'), (_, name) => name)
.replace(/^<([a-z]*)\s\/>$/gi, (_, name) => name)
.replace(/(Filled|Outlined|TwoTone)$/, '')
.toLowerCase();
iconList = iconList.filter((iconName) => iconName.toLowerCase().includes(matchKey));
Expand Down
3 changes: 3 additions & 0 deletions .dumi/theme/builtins/IconSearch/themeIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const FilledIcon: CustomIconComponent = (props) => {
'0c0-53-43-96-96-96z';
return (
<svg {...props} viewBox="0 0 1024 1024">
<title>Filled Icon</title>
<path d={path} />
</svg>
);
Expand All @@ -26,6 +27,7 @@ export const OutlinedIcon: CustomIconComponent = (props) => {
' 12 12v680c0 6.6-5.4 12-12 12z';
return (
<svg {...props} viewBox="0 0 1024 1024">
<title>Outlined Icon</title>
<path d={path} />
</svg>
);
Expand All @@ -39,6 +41,7 @@ export const TwoToneIcon: CustomIconComponent = (props) => {
'68 368 0 203.41-164.622 368-368 368z';
return (
<svg {...props} viewBox="0 0 1024 1024">
<title>TwoTone Icon</title>
<path d={path} />
</svg>
);
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/builtins/ImagePreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const ImagePreview: React.FC<React.PropsWithChildren<ImagePreviewProps>> = (prop
<div className="preview-image-title">{coverMeta.alt}</div>
<div
className="preview-image-description"
// biome-ignore lint/security/noDangerouslySetInnerHtml: it's for markdown
dangerouslySetInnerHTML={{ __html: coverMeta.description ?? '' }}
/>
</div>
Expand Down
3 changes: 2 additions & 1 deletion .dumi/theme/builtins/InlinePopover/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PictureOutlined } from '@ant-design/icons';
import React from 'react';
import { PictureOutlined } from '@ant-design/icons';
import { Image, Tooltip, Typography } from 'antd';

import useLocale from '../../../hooks/useLocale';

const locales = {
Expand Down
2 changes: 1 addition & 1 deletion .dumi/theme/builtins/InstallDependencies/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { ConfigProvider, Tabs } from 'antd';
import SourceCode from 'dumi/theme-default/builtins/SourceCode';
import type { Tab } from 'rc-tabs/lib/interface';

import BunLogo from './bun';
import NpmLogo from './npm';
import PnpmLogo from './pnpm';
import YarnLogo from './yarn';
import BunLogo from './bun';

interface InstallProps {
npm?: string;
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/builtins/InstallDependencies/npm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const NpmIcon: React.FC<IconProps> = (props) => {
viewBox="0 0 16 16"
width="1em"
>
<title>npm icon</title>
<path d="M0 0v16h16v-16h-16zM13 13h-2v-8h-3v8h-5v-10h10v10z" />
</svg>
</span>
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/builtins/InstallDependencies/pnpm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const PnpmIcon: React.FC<IconProps> = (props) => {
viewBox="0 0 24 24"
width="1em"
>
<title>pnpm icon</title>
<path d="M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z" />
</svg>
</span>
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/builtins/InstallDependencies/yarn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const YarnIcon: React.FC<IconProps> = (props) => {
viewBox="0 0 496 512"
width="1em"
>
<title>yarn icon</title>
<path d="M393.9 345.2c-39 9.3-48.4 32.1-104 47.4 0 0-2.7 4-10.4 5.8-13.4 3.3-63.9 6-68.5 6.1-12.4.1-19.9-3.2-22-8.2-6.4-15.3 9.2-22 9.2-22-8.1-5-9-9.9-9.8-8.1-2.4 5.8-3.6 20.1-10.1 26.5-8.8 8.9-25.5 5.9-35.3.8-10.8-5.7.8-19.2.8-19.2s-5.8 3.4-10.5-3.6c-6-9.3-17.1-37.3 11.5-62-1.3-10.1-4.6-53.7 40.6-85.6 0 0-20.6-22.8-12.9-43.3 5-13.4 7-13.3 8.6-13.9 5.7-2.2 11.3-4.6 15.4-9.1 20.6-22.2 46.8-18 46.8-18s12.4-37.8 23.9-30.4c3.5 2.3 16.3 30.6 16.3 30.6s13.6-7.9 15.1-5c8.2 16 9.2 46.5 5.6 65.1-6.1 30.6-21.4 47.1-27.6 57.5-1.4 2.4 16.5 10 27.8 41.3 10.4 28.6 1.1 52.7 2.8 55.3.8 1.4 13.7.8 36.4-13.2 12.8-7.9 28.1-16.9 45.4-17 16.7-.5 17.6 19.2 4.9 22.2zM496 256c0 136.9-111.1 248-248 248S0 392.9 0 256 111.1 8 248 8s248 111.1 248 248zm-79.3 75.2c-1.7-13.6-13.2-23-28-22.8-22 .3-40.5 11.7-52.8 19.2-4.8 3-8.9 5.2-12.4 6.8 3.1-44.5-22.5-73.1-28.7-79.4 7.8-11.3 18.4-27.8 23.4-53.2 4.3-21.7 3-55.5-6.9-74.5-1.6-3.1-7.4-11.2-21-7.4-9.7-20-13-22.1-15.6-23.8-1.1-.7-23.6-16.4-41.4 28-12.2.9-31.3 5.3-47.5 22.8-2 2.2-5.9 3.8-10.1 5.4h.1c-8.4 3-12.3 9.9-16.9 22.3-6.5 17.4.2 34.6 6.8 45.7-17.8 15.9-37 39.8-35.7 82.5-34 36-11.8 73-5.6 79.6-1.6 11.1 3.7 19.4 12 23.8 12.6 6.7 30.3 9.6 43.9 2.8 4.9 5.2 13.8 10.1 30 10.1 6.8 0 58-2.9 72.6-6.5 6.8-1.6 11.5-4.5 14.6-7.1 9.8-3.1 36.8-12.3 62.2-28.7 18-11.7 24.2-14.2 37.6-17.4 12.9-3.2 21-15.1 19.4-28.2z" />
</svg>
</span>
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/builtins/Previewer/CodePreviewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ createRoot(document.getElementById('container')).render(<Demo />);
{description && (
<div
className="code-box-description"
// biome-ignore lint/security/noDangerouslySetInnerHtml: it's for markdown
dangerouslySetInnerHTML={{ __html: description }}
/>
)}
Expand Down
5 changes: 3 additions & 2 deletions .dumi/theme/builtins/Previewer/DesignPreviewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const DesignPreviewer: FC<AntdPreviewerProps> = ({ children, title, description,
{title}
</a>
{description && (
// biome-ignore lint/security/noDangerouslySetInnerHtml: description is from markdown
<div className={styles.description} dangerouslySetInnerHTML={{ __html: description }} />
)}
<div className={styles.copy}>
Expand All @@ -89,10 +90,10 @@ const DesignPreviewer: FC<AntdPreviewerProps> = ({ children, title, description,
<span style={{ marginInlineStart: 8 }}>已复制,使用 Kitchen 插件即可粘贴</span>
</div>
) : (
<div onClick={handleCopy} className={styles.copyTip}>
<button type="button" onClick={handleCopy} className={styles.copyTip}>
<SketchOutlined />
<span style={{ marginInlineStart: 8 }}>复制 Sketch JSON</span>
</div>
</button>
)}
</div>
<div className={styles.demo} ref={demoRef}>
Expand Down
29 changes: 15 additions & 14 deletions .dumi/theme/builtins/ResourceCards/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { Col, Row, Tooltip, Card, Typography } from 'antd';
import { Card, Col, Row, Tooltip, Typography } from 'antd';
import { createStyles } from 'antd-style';

import useLocale from '../../../hooks/useLocale';

const { Paragraph } = Typography;
Expand All @@ -22,19 +23,19 @@ const useStyle = createStyles(({ token, css }) => ({
transform: scale(1.3);
`,
badge: css`
position: absolute;
top: 8px;
right: 8px;
padding: ${token.paddingXXS}px ${token.paddingXS}px;
color: #fff;
font-size: ${token.fontSizeSM}px;
line-height: 1;
background: rgba(0, 0, 0, 0.65);
border-radius: ${token.borderRadiusLG}px;
box-shadow: 0 0 2px rgba(255, 255, 255, 0.2);
display: inline-flex;
column-gap: ${token.paddingXXS}px;
`,
position: absolute;
top: 8px;
right: 8px;
padding: ${token.paddingXXS}px ${token.paddingXS}px;
color: #fff;
font-size: ${token.fontSizeSM}px;
line-height: 1;
background: rgba(0, 0, 0, 0.65);
border-radius: ${token.borderRadiusLG}px;
box-shadow: 0 0 2px rgba(255, 255, 255, 0.2);
display: inline-flex;
column-gap: ${token.paddingXXS}px;
`,
}));

export type Resource = {
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/common/CodePenIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Icon from '@ant-design/icons';

const SVGIcon: React.FC = () => (
<svg viewBox="0 0 15 15" fill="currentColor">
<title>codepen icon</title>
<path d="M14.777304,4.75062256 L7.77734505,0.0839936563 C7.60939924,-0.0279665065 7.39060662,-0.0279665065 7.22266081,0.0839936563 L0.222701813,4.75062256 C0.0836082937,4.84334851 5.66973453e-05,4.99945222 4.6875e-05,5.16662013 L4.6875e-05,9.83324903 C4.6875e-05,10.0004355 0.0836088906,10.1565596 0.222701812,10.2492466 L7.22266081,14.9158755 C7.30662908,14.9718752 7.403316,14.999875 7.50000292,14.999875 C7.59668984,14.999875 7.69337678,14.9718752 7.77734505,14.9158755 L14.777304,10.2492466 C14.9163976,10.1565206 14.9999492,10.0004169 14.999959,9.83324903 L14.999959,5.16662013 C14.9999492,4.99945222 14.9163976,4.84334851 14.777304,4.75062256 Z M7.50000292,9.23237755 L4.90139316,7.4999502 L7.50000292,5.76755409 L10.0986127,7.4999502 L7.50000292,9.23237755 Z M8,4.89905919 L8,1.43423573 L13.598561,5.16665138 L10.9999824,6.89904747 L8,4.89905919 Z M7.00000586,4.89905919 L4.00002344,6.89904747 L1.40141366,5.16665138 L7.00000586,1.43423573 L7.00000586,4.89905919 Z M3.09865372,7.4999502 L1.00004102,8.89903575 L1.00004102,6.10089589 L3.09865372,7.4999502 Z M4.00002344,8.10085292 L7.00000586,10.1008412 L7.00000586,13.5656334 L1.40141366,9.83328028 L4.00002344,8.10085292 Z M8,10.1008412 L10.9999824,8.10085292 L13.5985922,9.83328028 L8,13.5656647 L8,10.1008412 L8,10.1008412 Z M11.9013521,7.4999502 L13.9999648,6.10089589 L13.9999648,8.899067 L11.9013521,7.4999502 Z" />
</svg>
);
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/common/CodePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function toReactComponent(jsonML: any[]) {
const attr = JsonML.getAttributes(node);
return (
<pre key={index} className={`language-${attr.lang}`}>
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: it's for markdown */}
<code dangerouslySetInnerHTML={{ __html: attr.highlighted }} />
</pre>
);
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/common/CodeSandboxIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Icon from '@ant-design/icons';

const SVGIcon: React.FC = () => (
<svg viewBox="0 0 1024 1024" fill="currentColor">
<title>CodeSandbox Icon</title>
<path d="M755 140.3l0.5-0.3h0.3L512 0 268.3 140h-0.3l0.8 0.4L68.6 256v512L512 1024l443.4-256V256L755 140.3z m-30 506.4v171.2L548 920.1V534.7L883.4 341v215.7l-158.4 90z m-584.4-90.6V340.8L476 534.4v385.7L300 818.5V646.7l-159.4-90.6zM511.7 280l171.1-98.3 166.3 96-336.9 194.5-337-194.6 165.7-95.7L511.7 280z" />
</svg>
);
Expand Down
2 changes: 1 addition & 1 deletion .dumi/theme/common/Color/ColorBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo } from 'react';
import CopyToClipboard from 'react-copy-to-clipboard';
import { message } from 'antd';
import CopyToClipboard from 'react-copy-to-clipboard';

interface ColorBlockProps {
color: string;
Expand Down
5 changes: 3 additions & 2 deletions .dumi/theme/common/Color/ColorPaletteToolDark.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { FormattedMessage } from 'dumi';
import React, { useMemo, useState } from 'react';
import { Col, ColorPicker, Row } from 'antd';
import ColorPatterns from './ColorPatterns';
import { FormattedMessage } from 'dumi';

import useLocale from '../../../hooks/useLocale';
import ColorPatterns from './ColorPatterns';

const primaryMinSaturation = 70; // 主色推荐最小饱和度
const primaryMinBrightness = 70; // 主色推荐最小亮度
Expand Down
3 changes: 2 additions & 1 deletion .dumi/theme/common/Color/ColorPalettes.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import classNames from 'classnames';
import React from 'react';
import classNames from 'classnames';

import Palette from './Palette';

const colors = [
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/common/Color/ColorPatterns.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { generate } from '@ant-design/colors';
import uniq from 'lodash/uniq';

import ColorBlock from './ColorBlock';

interface ColorPatternsProps {
Expand Down
4 changes: 2 additions & 2 deletions .dumi/theme/common/Color/ColorStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const gray: { [key: number]: string } = {
const ColorStyle: React.FC = () => {
const token = useTheme();

const makePalette = (color: string, index: number = 1): string => {
const makePalette = (color: string, index = 1): string => {
if (index <= 10) {
return `
.palette-${color}-${index} {
Expand All @@ -33,7 +33,7 @@ ${makePalette(color, index + 1)}
return '';
};

const makeGrayPalette = (index: number = 1): string => {
const makeGrayPalette = (index = 1): string => {
if (index <= 13) {
return `
.palette-gray-${index} {
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/common/ComponentChangelog/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';

import type { ComponentChangelogProps } from './ComponentChangelog';
import ComponentChangelog from './ComponentChangelog';

Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/common/DirectionIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const DirectionSvg: React.FC<DirectionIconProps> = ({ direction }) => (
fill="currentColor"
style={{ transform: `scaleX(${direction === 'ltr' ? '1' : '-1'})` }}
>
<title>Direction Icon</title>
<path d="m14.6961816 11.6470802.0841184.0726198 2 2c.2662727.2662727.2904793.682876.0726198.9764816l-.0726198.0841184-2 2c-.2929.2929-.7677.2929-1.0606 0-.2662727-.2662727-.2904793-.682876-.0726198-.9764816l.0726198-.0841184.7196-.7197h-10.6893c-.41421 0-.75-.3358-.75-.75 0-.3796833.28215688-.6934889.64823019-.7431531l.10176981-.0068469h10.6893l-.7196-.7197c-.2929-.2929-.2929-.7677 0-1.0606.2662727-.2662727.682876-.2904793.9764816-.0726198zm-8.1961616-8.6470802c.30667 0 .58246.18671.69635.47146l3.00003 7.50004c.1538.3845-.0333.821-.41784.9749-.38459.1538-.82107-.0333-.9749-.4179l-.81142-2.0285h-2.98445l-.81142 2.0285c-.15383.3846-.59031.5717-.9749.4179-.38458-.1539-.57165-.5904-.41781-.9749l3-7.50004c.1139-.28475.38968-.47146.69636-.47146zm8.1961616 1.14705264.0841184.07261736 2 2c.2662727.26626364.2904793.68293223.0726198.97654222l-.0726198.08411778-2 2c-.2929.29289-.7677.29289-1.0606 0-.2662727-.26626364-.2904793-.68293223-.0726198-.97654222l.0726198-.08411778.7196-.7196675h-3.6893c-.4142 0-.75-.3357925-.75-.7500025 0-.3796925.2821653-.69348832.6482323-.74315087l.1017677-.00684663h3.6893l-.7196-.7196725c-.2929-.29289-.2929-.76777 0-1.06066.2662727-.26626364.682876-.29046942.9764816-.07261736zm-8.1961616 1.62238736-.89223 2.23056h1.78445z" />
</svg>
);
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/common/ExternalLinkIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Icon from '@ant-design/icons';

const SVGIcon: React.FC<{ color?: string }> = ({ color = 'currentColor' }) => (
<svg viewBox="0 0 1024 1024" width="1em" height="1em" fill={color}>
<title>External Link Icon</title>
<path d="M853.333 469.333A42.667 42.667 0 0 0 810.667 512v256A42.667 42.667 0 0 1 768 810.667H256A42.667 42.667 0 0 1 213.333 768V256A42.667 42.667 0 0 1 256 213.333h256A42.667 42.667 0 0 0 512 128H256a128 128 0 0 0-128 128v512a128 128 0 0 0 128 128h512a128 128 0 0 0 128-128V512a42.667 42.667 0 0 0-42.667-42.667z" />
<path d="M682.667 213.333h67.413L481.707 481.28a42.667 42.667 0 0 0 0 60.587 42.667 42.667 0 0 0 60.586 0L810.667 273.92v67.413A42.667 42.667 0 0 0 853.333 384 42.667 42.667 0 0 0 896 341.333V170.667A42.667 42.667 0 0 0 853.333 128H682.667a42.667 42.667 0 0 0 0 85.333z" />
</svg>
Expand Down
2 changes: 1 addition & 1 deletion .dumi/theme/common/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MouseEvent, MouseEventHandler } from 'react';
import React, { forwardRef, useLayoutEffect, useTransition } from 'react';
import { useLocation, useNavigate, Link as DumiLink } from 'dumi';
import { Link as DumiLink, useLocation, useNavigate } from 'dumi';
import nprogress from 'nprogress';

export interface LinkProps {
Expand Down
1 change: 1 addition & 0 deletions .dumi/theme/common/RiddleIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Icon from '@ant-design/icons';

const SVGIcon: React.FC = () => (
<svg viewBox="0 0 14 14" fill="currentColor">
<title>Riddle logo</title>
<path d="M13.8875145,13.1234844 C13.8687399,13.0691875 13.8499977,13.0329687 13.8312555,12.9786562 L11.3687445,8.83296875 C12.9187468,8.05754687 13.9640694,6.49009375 13.9640694,4.68728125 C13.9624994,2.09095312 11.7968694,0 9.10938728,0 L3.86404855,0 C3.04217572,0 2.37028902,0.648703125 2.37028902,1.44223437 L2.37028902,1.82090625 L0.746871676,1.82090625 C0.33593526,1.82090625 0,2.14526562 0,2.54203125 L0,13.4478437 C0,13.7540937 0.242191908,13.9879375 0.559368786,13.9879375 C0.615627746,13.9879375 0.67187052,13.9698281 0.72812948,13.9517187 L13.440615,13.9517187 C13.7578081,13.9517187 14,13.7178906 14,13.4116406 C14,13.321125 13.9624994,13.2125 13.8875145,13.1234844 Z M3.49061272,8.0394375 L3.49061272,2.9206875 L8.71719306,2.9206875 C9.74375723,2.9206875 10.5843723,3.73232812 10.5843723,4.7235 C10.5843723,5.71465625 9.76249942,6.5081875 8.71719306,6.5081875 L6.53280462,6.5081875 L6.53280462,6.52629688 C6.45781965,6.52629688 6.3828185,6.5625 6.3093711,6.59870313 C6.04843699,6.74354688 5.95469364,7.08598438 6.10467977,7.33792188 L8.3078104,11.0325469 L3.4906289,11.0325469 L3.4906289,8.0394375 L3.49061272,8.0394375 Z M1.1203237,12.8881406 L1.1203237,2.9206875 L2.3703052,2.9206875 L2.3703052,11.5545313 C2.3703052,11.8607813 2.61249711,12.0946094 2.92969017,12.0946094 L2.94843237,12.0946094 C2.98593295,12.1127188 3.04219191,12.1127188 3.09843468,12.1127188 L9.16563006,12.1127188 C9.48280694,12.1127188 9.72499884,11.878875 9.72499884,11.572625 L9.72499884,11.5364219 C9.76249942,11.3915938 9.74375723,11.2482813 9.66875607,11.1215469 L7.5593526,7.58835938 L8.6984185,7.58835938 C10.3406104,7.58835938 11.6843514,6.29095313 11.6843514,4.703875 C11.6843514,3.1168125 10.3406104,1.81939063 8.6984185,1.81939063 L3.4906289,1.81939063 L3.4906289,1.44073437 C3.4906289,1.24310937 3.65937341,1.08017187 3.86406474,1.08017187 L9.09061272,1.08017187 C11.143741,1.08017187 12.8234173,2.7019375 12.8234173,4.68578125 C12.8234173,6.21853125 11.8343538,7.5340625 10.4343538,8.05603125 C10.378111,8.07414063 10.3406104,8.09223438 10.2843514,8.11034375 C10.0234173,8.25517188 9.92967399,8.597625 10.0796763,8.8495625 L12.5062405,12.8881563 L1.12030751,12.8881563 L1.1203237,12.8881406 Z" />
</svg>
);
Expand Down
Loading

0 comments on commit 59ad484

Please sign in to comment.