@blocksuite/global
Advanced tools
Comparing version 0.4.0-20230117135824-d571db4 to 0.4.0-20230118194738-231953b
@@ -6,3 +6,2 @@ export declare const removeStackHeader: (stack: unknown) => string; | ||
}) => void; | ||
type AnyFunction = (...args: any[]) => any; | ||
export declare const debug: (tag?: string) => (target: object, name: string, descriptor: TypedPropertyDescriptor<AnyFunction>) => TypedPropertyDescriptor<AnyFunction>; | ||
@@ -12,3 +11,2 @@ export declare function configDebugLog(verbose: boolean): void; | ||
export declare function disableDebuglog(tag?: string): void; | ||
export {}; | ||
//# sourceMappingURL=debug.d.ts.map |
@@ -0,1 +1,4 @@ | ||
export { Signal } from './utils/signal.js'; | ||
export type { Disposable } from './utils/disposable.js'; | ||
export { DisposableGroup, flattenDisposable } from './utils/disposable.js'; | ||
export declare const SYS_KEYS: Set<string>; | ||
@@ -13,3 +16,2 @@ export declare function isPrimitive(a: unknown): a is null | undefined | boolean | number | string; | ||
export declare function sleep(ms: number): Promise<void>; | ||
export {}; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -0,1 +1,3 @@ | ||
export { Signal } from './utils/signal.js'; | ||
export { DisposableGroup, flattenDisposable } from './utils/disposable.js'; | ||
export const SYS_KEYS = new Set(['id', 'flavour', 'children']); | ||
@@ -2,0 +4,0 @@ // https://stackoverflow.com/questions/31538010/test-if-a-variable-is-a-primitive-rather-than-an-object |
@@ -0,1 +1,4 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
type AnyFunction = (...args: any[]) => any; | ||
declare module 'quill' { | ||
@@ -8,2 +11,45 @@ import quill = require('quill/index'); | ||
declare module 'y-protocols/awareness.js' { | ||
export class Awareness< | ||
State extends Record<string, unknown> = Record<string, unknown> | ||
> { | ||
constructor< | ||
State extends Record<string, unknown> = Record<string, unknown> | ||
>(doc: Y.Doc): Awareness<State>; | ||
clientID: number; | ||
destroy(): void; | ||
getStates(): Map<number, State>; | ||
getLocalState(): State; | ||
setLocalState(state: State): void; | ||
setLocalStateField<Field extends keyof State>( | ||
field: Field, | ||
value: State[Field] | ||
): void; | ||
on( | ||
event: 'change', | ||
callback: ( | ||
diff: { | ||
added: number[]; | ||
removed: number[]; | ||
updated: number[]; | ||
}, | ||
transactionOrigin: string | number | ||
) => void | ||
): void; | ||
on( | ||
event: 'update', | ||
callback: ( | ||
diff: { | ||
added: number[]; | ||
removed: number[]; | ||
updated: number[]; | ||
}, | ||
transactionOrigin: string | number | ||
) => void | ||
): void; | ||
on(event: 'destroy', callback: () => void): void; | ||
off(event: 'change' | 'update' | 'destroy', callback: AnyFunction): void; | ||
} | ||
} | ||
// eslint-disable-next-line @typescript-eslint/prefer-namespace-keyword | ||
@@ -24,2 +70,4 @@ declare module NodeJS { | ||
enable_surface: boolean; | ||
enable_block_hub: boolean; | ||
enable_slash_menu: boolean; | ||
readonly: Record<string, boolean>; | ||
@@ -30,2 +78,3 @@ }; | ||
import { TextType } from '@blocksuite/store'; | ||
interface SchemaMeta { | ||
@@ -181,2 +230,3 @@ /** | ||
import type { ColorStyle, TDShapeType } from '@blocksuite/blocks'; | ||
interface ShapeBlockModel { | ||
@@ -183,0 +233,0 @@ color: ColorStyle | `#${string}`; |
{ | ||
"name": "@blocksuite/global", | ||
"version": "0.4.0-20230117135824-d571db4", | ||
"version": "0.4.0-20230118194738-231953b", | ||
"types": "./index.d.ts", | ||
@@ -21,7 +21,10 @@ "type": "module", | ||
"dependencies": { | ||
"ansi-colors": "^4.1.3" | ||
"ansi-colors": "^4.1.3", | ||
"lit": "^2.6.1" | ||
}, | ||
"scripts": { | ||
"test:unit": "vitest --run", | ||
"test:unit:ui": "vitest --ui", | ||
"build": "tsc" | ||
} | ||
} |
@@ -37,4 +37,2 @@ import color from 'ansi-colors'; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
type AnyFunction = (...args: any[]) => any; | ||
export const debug = (tag?: string) => { | ||
@@ -41,0 +39,0 @@ return ( |
@@ -0,1 +1,4 @@ | ||
export { Signal } from './utils/signal.js'; | ||
export type { Disposable } from './utils/disposable.js'; | ||
export { DisposableGroup, flattenDisposable } from './utils/disposable.js'; | ||
export const SYS_KEYS = new Set(['id', 'flavour', 'children']); | ||
@@ -2,0 +5,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
208594
48
2381
2
1
+ Addedlit@^2.6.1
+ Added@lit-labs/ssr-dom-shim@1.3.0(transitive)
+ Added@lit/reactive-element@1.6.3(transitive)
+ Added@types/trusted-types@2.0.7(transitive)
+ Addedlit@2.8.0(transitive)
+ Addedlit-element@3.3.3(transitive)
+ Addedlit-html@2.8.0(transitive)