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
@@ -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 { property, state } from 'lit/decorators.js';
@@ -6,6 +6,7 @@ export * from './dom';
export * from './drag-helper';
export * from './edgeless';
export * from './event';
export { getSvgPath as getFigmaSquircleSvgPath } from './figma-squircle';
export * from './file';
export * from './fractional-indexing';
export * from './image';
+1
View File
@@ -83,6 +83,7 @@ export {
createDefaultDoc,
createSignalFromObservable,
findNoteBlockModel,
getFigmaSquircleSvgPath,
getLastNoteBlock,
getPageRootByElement,
isInsideEdgelessEditor,
@@ -1,6 +1,6 @@
import { describe, expect, test, vi } from 'vitest';
import { Slot } from '../utils.js';
import { Slot } from '../utils/slot.js';
describe('slot', () => {
test('init', () => {
@@ -1,6 +1,6 @@
import { describe, expect, test } from 'vitest';
import { isEqual } from '../utils.js';
import { isEqual } from '../utils/index.js';
describe('isEqual', () => {
test('number', () => {
@@ -1,6 +1,8 @@
import type { ErrorCode } from './code.js';
import { ErrorCode } from './code.js';
export class BlockSuiteError extends Error {
static ErrorCode = ErrorCode;
code: ErrorCode;
isFatal: boolean;
-1
View File
@@ -1 +0,0 @@
export * from './utils/index.js';
@@ -3,7 +3,6 @@ export * from './bound.js';
export * from './crypto.js';
export * from './curve.js';
export * from './disposable.js';
export { getSvgPath as getFigmaSquircleSvgPath } from './figma-squircle/index.js';
export * from './function.js';
export * from './iterable.js';
export * from './logger.js';
@@ -1,5 +1,5 @@
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 clsx from 'clsx';
import { debounce } from 'lodash-es';