mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
refactor(editor): separate lit and slot in global (#10666)
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
"./exceptions": "./src/exceptions/index.ts",
|
||||
"./di": "./src/di/index.ts",
|
||||
"./types": "./src/types/index.ts",
|
||||
"./gfx": "./src/gfx/index.ts"
|
||||
"./gfx": "./src/gfx/index.ts",
|
||||
"./slot": "./src/slot/index.ts",
|
||||
"./lit": "./src/lit/index.ts"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
@@ -37,6 +39,12 @@
|
||||
],
|
||||
"gfx": [
|
||||
"dist/gfx/index.d.ts"
|
||||
],
|
||||
"slot": [
|
||||
"dist/slot/index.d.ts"
|
||||
],
|
||||
"lit": [
|
||||
"dist/lit/index.d.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, test, vi } from 'vitest';
|
||||
|
||||
import { Slot } from '../utils/slot.js';
|
||||
import { Slot } from '../slot/slot.js';
|
||||
|
||||
describe('slot', () => {
|
||||
test('init', () => {
|
||||
|
||||
2
blocksuite/framework/global/src/lit/index.ts
Normal file
2
blocksuite/framework/global/src/lit/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './signal-watcher.js';
|
||||
export * from './with-disposable.js';
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { LitElement } from 'lit';
|
||||
|
||||
import { DisposableGroup } from './disposable.js';
|
||||
import type { Constructor } from './types.js';
|
||||
import { DisposableGroup } from '../slot/disposable.js';
|
||||
import type { Constructor } from '../utils/types.js';
|
||||
|
||||
// See https://lit.dev/docs/composition/mixins/#mixins-in-typescript
|
||||
// This definition should be exported, see https://github.com/microsoft/TypeScript/issues/30355#issuecomment-839834550
|
||||
2
blocksuite/framework/global/src/slot/index.ts
Normal file
2
blocksuite/framework/global/src/slot/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './disposable.js';
|
||||
export * from './slot.js';
|
||||
@@ -1,8 +1,4 @@
|
||||
export * from './crypto.js';
|
||||
export * from './disposable.js';
|
||||
export * from './function.js';
|
||||
export * from './logger.js';
|
||||
export * from './signal-watcher.js';
|
||||
export * from './slot.js';
|
||||
export * from './types.js';
|
||||
export * from './with-disposable.js';
|
||||
|
||||
Reference in New Issue
Block a user