refactor(editor): move figma squircle to shared (#10610)

This commit is contained in:
Saul-Mirone
2025-03-04 10:26:58 +00:00
parent fa5674166e
commit 5ad3d3c94a
12 changed files with 9 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
import { getFigmaSquircleSvgPath } from '@blocksuite/global/utils'; import { getFigmaSquircleSvgPath } from '@blocksuite/affine-shared/utils';
import { css, html, LitElement, svg, type TemplateResult } from 'lit'; import { css, html, LitElement, svg, type TemplateResult } from 'lit';
import { property, state } from 'lit/decorators.js'; import { property, state } from 'lit/decorators.js';

View File

@@ -6,6 +6,7 @@ export * from './dom';
export * from './drag-helper'; export * from './drag-helper';
export * from './edgeless'; export * from './edgeless';
export * from './event'; export * from './event';
export { getSvgPath as getFigmaSquircleSvgPath } from './figma-squircle';
export * from './file'; export * from './file';
export * from './fractional-indexing'; export * from './fractional-indexing';
export * from './image'; export * from './image';

View File

@@ -83,6 +83,7 @@ export {
createDefaultDoc, createDefaultDoc,
createSignalFromObservable, createSignalFromObservable,
findNoteBlockModel, findNoteBlockModel,
getFigmaSquircleSvgPath,
getLastNoteBlock, getLastNoteBlock,
getPageRootByElement, getPageRootByElement,
isInsideEdgelessEditor, isInsideEdgelessEditor,

View File

@@ -1,6 +1,6 @@
import { describe, expect, test, vi } from 'vitest'; import { describe, expect, test, vi } from 'vitest';
import { Slot } from '../utils.js'; import { Slot } from '../utils/slot.js';
describe('slot', () => { describe('slot', () => {
test('init', () => { test('init', () => {

View File

@@ -1,6 +1,6 @@
import { describe, expect, test } from 'vitest'; import { describe, expect, test } from 'vitest';
import { isEqual } from '../utils.js'; import { isEqual } from '../utils/index.js';
describe('isEqual', () => { describe('isEqual', () => {
test('number', () => { test('number', () => {

View File

@@ -1,6 +1,8 @@
import type { ErrorCode } from './code.js'; import { ErrorCode } from './code.js';
export class BlockSuiteError extends Error { export class BlockSuiteError extends Error {
static ErrorCode = ErrorCode;
code: ErrorCode; code: ErrorCode;
isFatal: boolean; isFatal: boolean;

View File

@@ -1 +0,0 @@
export * from './utils/index.js';

View File

@@ -3,7 +3,6 @@ export * from './bound.js';
export * from './crypto.js'; export * from './crypto.js';
export * from './curve.js'; export * from './curve.js';
export * from './disposable.js'; export * from './disposable.js';
export { getSvgPath as getFigmaSquircleSvgPath } from './figma-squircle/index.js';
export * from './function.js'; export * from './function.js';
export * from './iterable.js'; export * from './iterable.js';
export * from './logger.js'; export * from './logger.js';

View File

@@ -1,5 +1,5 @@
import { useAutoFocus } from '@affine/component'; import { useAutoFocus } from '@affine/component';
import { getFigmaSquircleSvgPath } from '@blocksuite/affine/global/utils'; import { getFigmaSquircleSvgPath } from '@blocksuite/affine/blocks';
import { SearchIcon } from '@blocksuite/icons/rc'; import { SearchIcon } from '@blocksuite/icons/rc';
import clsx from 'clsx'; import clsx from 'clsx';
import { debounce } from 'lodash-es'; import { debounce } from 'lodash-es';