refactor(editor): move figma squircle to shared (#10610)
This commit is contained in:
@@ -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';
|
||||||
|
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ export {
|
|||||||
createDefaultDoc,
|
createDefaultDoc,
|
||||||
createSignalFromObservable,
|
createSignalFromObservable,
|
||||||
findNoteBlockModel,
|
findNoteBlockModel,
|
||||||
|
getFigmaSquircleSvgPath,
|
||||||
getLastNoteBlock,
|
getLastNoteBlock,
|
||||||
getPageRootByElement,
|
getPageRootByElement,
|
||||||
isInsideEdgelessEditor,
|
isInsideEdgelessEditor,
|
||||||
|
|||||||
@@ -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', () => {
|
||||||
|
|||||||
@@ -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', () => {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
export * from './utils/index.js';
|
|
||||||
@@ -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';
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|||||||
Reference in New Issue
Block a user