refactor(editor): remove redundant edgeless icons (#10169)

Continue [BS-2240](https://linear.app/affine-design/issue/BS-2240/%E6%B8%85%E7%90%86%E9%87%8D%E5%A4%8D%E7%9A%84icon)

This PR removes `icons/edgeless.ts` and refactor with `@blocksuite/icons` for reducing redundant icons
This commit is contained in:
L-Sun
2025-02-14 05:03:26 +00:00
parent 1f6ac4b1fe
commit 9d08f446cc
90 changed files with 2309 additions and 2899 deletions
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,4 @@
export * from './ai.js';
export * from './edgeless.js';
export * from './file-icons.js';
export * from './import-export.js';
export * from './list.js';
@@ -18,6 +18,7 @@ import {
TextSelection,
} from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import { ArrowDownSmallIcon, MoreVerticalIcon } from '@blocksuite/icons/lit';
import type { InlineRange } from '@blocksuite/inline/types';
import { computePosition, inline, offset, shift } from '@floating-ui/dom';
import { html, LitElement, nothing } from 'lit';
@@ -31,9 +32,7 @@ import {
CopyIcon,
DeleteIcon,
EditIcon,
MoreVerticalIcon,
OpenIcon,
SmallArrowDownIcon,
UnlinkIcon,
} from '../../../../../../icons/index.js';
import { toast } from '../../../../../../toast/index.js';
@@ -227,8 +226,12 @@ export class LinkPopup extends WithDisposable(LitElement) {
<editor-menu-button
.contentPadding=${'8px'}
.button=${html`
<editor-icon-button aria-label="More" .tooltip=${'More'}>
${MoreVerticalIcon}
<editor-icon-button
aria-label="More"
.tooltip=${'More'}
.iconSize=${'20px'}
>
${MoreVerticalIcon()}
</editor-icon-button>
`}
>
@@ -514,9 +517,10 @@ export class LinkPopup extends WithDisposable(LitElement) {
.justify=${'space-between'}
.labelHeight=${'20px'}
.iconContainerWidth=${'110px'}
.iconSize=${'16px'}
>
<div class="label">Inline view</div>
${SmallArrowDownIcon}
${ArrowDownSmallIcon()}
</editor-icon-button>
`}
@toggle=${this._toggleViewSelector}
@@ -18,6 +18,7 @@ import {
type BlockStdScope,
} from '@blocksuite/block-std';
import { assertExists, WithDisposable } from '@blocksuite/global/utils';
import { ArrowDownSmallIcon, MoreVerticalIcon } from '@blocksuite/icons/lit';
import type { InlineRange } from '@blocksuite/inline';
import { computePosition, inline, offset, shift } from '@floating-ui/dom';
import { effect } from '@preact/signals-core';
@@ -31,9 +32,7 @@ import {
CopyIcon,
DeleteIcon,
EditIcon,
MoreVerticalIcon,
OpenIcon,
SmallArrowDownIcon,
} from '../../../../../icons/index.js';
import { notifyLinkedDocSwitchedToEmbed } from '../../../../../notification/index.js';
import { isPeekable, peek } from '../../../../../peek/index.js';
@@ -297,7 +296,7 @@ export class ReferencePopup extends WithDisposable(LitElement) {
.justify=${'space-between'}
.labelHeight=${'20px'}
>
${OpenIcon}${SmallArrowDownIcon}
${OpenIcon} ${ArrowDownSmallIcon({ width: '16px', height: '16px' })}
</editor-icon-button>
`}
>
@@ -362,7 +361,7 @@ export class ReferencePopup extends WithDisposable(LitElement) {
.iconContainerWidth=${'110px'}
>
<span class="label">Inline view</span>
${SmallArrowDownIcon}
${ArrowDownSmallIcon({ width: '16px', height: '16px' })}
</editor-icon-button>
`}
@toggle=${this._toggleViewSelector}
@@ -458,8 +457,12 @@ export class ReferencePopup extends WithDisposable(LitElement) {
<editor-menu-button
.contentPadding=${'8px'}
.button=${html`
<editor-icon-button aria-label="More" .tooltip=${'More'}>
${MoreVerticalIcon}
<editor-icon-button
aria-label="More"
.tooltip=${'More'}
.iconSize=${'20px'}
>
${MoreVerticalIcon()}
</editor-icon-button>
`}
>