Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hocuspocus/extension-database

Package Overview
Dependencies
Maintainers
5
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hocuspocus/extension-database - npm Package Compare versions

Comparing version 2.9.1-rc.0 to 2.9.2-rc.0

17

dist/packages/provider/src/TiptapCollabProvider.d.ts
import type { AbstractType, YArrayEvent } from 'yjs';
import { HocuspocusProvider, HocuspocusProviderConfiguration } from './HocuspocusProvider.js';
import { TiptapCollabProviderWebsocket } from './TiptapCollabProviderWebsocket.js';
import type { THistoryVersion } from './types.js';
import type { TCollabComment, TCollabThread, THistoryVersion } from './types.js';
export type TiptapCollabProviderConfiguration = Required<Pick<HocuspocusProviderConfiguration, 'name'>> & Partial<HocuspocusProviderConfiguration> & (Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'websocketProvider'>> | Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'appId'>> | Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'baseUrl'>>);

@@ -43,2 +43,17 @@ export interface AdditionalTiptapCollabProviderConfiguration {

disableAutoVersioning(): 0;
private getYThreads;
getThreads<Data, CommentData>(): TCollabThread<Data, CommentData>[];
private getThreadIndex;
getThread<Data, CommentData>(id: string): TCollabThread<Data, CommentData> | null;
private getYThread;
createThread(data: TCollabThread): TCollabThread | null;
updateThread(id: TCollabThread['id'], data: Pick<TCollabThread, 'data'>): TCollabThread | null;
deleteThread(id: TCollabThread['id']): void;
getThreadComments(threadId: TCollabThread['id']): TCollabComment[] | null;
getThreadComment(threadId: TCollabThread['id'], commentId: TCollabComment['id']): TCollabComment | null;
addComment(threadId: TCollabThread['id'], data: TCollabComment): TCollabThread | null;
updateComment(threadId: TCollabThread['id'], commentId: TCollabComment['id'], data: TCollabComment): TCollabThread | null;
deleteComment(threadId: TCollabThread['id'], commentId: TCollabComment['id']): TCollabThread | null;
watchThreads(callback: () => void): void;
unwatchThreads(callback: () => void): void;
}

@@ -87,2 +87,16 @@ import { Encoder } from 'lib0/encoding';

}[];
export type TCollabThread<Data = any, CommentData = any> = {
id: string;
createdAt: number;
updatedAt: number;
comments: TCollabComment<CommentData>[];
data: Data;
};
export type TCollabComment<Data = any> = {
id: string;
createdAt: number;
updatedAt: number;
data: Data;
content: any;
};
export type THistoryVersion = {

@@ -89,0 +103,0 @@ name?: string;

2

dist/playground/frontend/vite.config.d.ts

@@ -1,2 +0,2 @@

declare const _default: import("vite").UserConfigExport;
declare const _default: import("vite").UserConfig;
export default _default;
{
"name": "@hocuspocus/extension-database",
"description": "a generic Hocuspocus persistence driver for the database",
"version": "2.9.1-rc.0",
"version": "2.9.2-rc.0",
"homepage": "https://hocuspocus.dev",

@@ -30,3 +30,3 @@ "keywords": [

"dependencies": {
"@hocuspocus/server": "^2.9.1-rc.0"
"@hocuspocus/server": "^2.9.2-rc.0"
},

@@ -33,0 +33,0 @@ "peerDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc