-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/** | ||
* Updates the block doc with the local blocks block changes. | ||
* | ||
* @param {yjs.Map} yDocBlocks Blocks doc. | ||
* @param {Array} blocks Updated blocks. | ||
* @param {string} clientId Current clientId. | ||
*/ | ||
export function updateBlocksDoc(yDocBlocks: yjs.Map<any>, blocks: any[], clientId?: string): void; | ||
/** | ||
* Updates the comments doc with the local comments changes. | ||
* | ||
* @param {yjs.Doc} commentsDoc comments doc. | ||
* @param {Object} comments Updated comments. | ||
*/ | ||
export function updateCommentsDoc(commentsDoc: yjs.Doc, comments?: any): void; | ||
/** | ||
* Updates the replies doc with the local replies changes. | ||
* | ||
* @param {yjs.Doc} repliesDoc replies doc. | ||
* @param {Object} replies Updated replies. | ||
*/ | ||
export function updateCommentRepliesDoc(repliesDoc: yjs.Doc, replies?: any): void; | ||
/** | ||
* Updates the post doc with the local post changes. | ||
* | ||
* @param {yjs.Doc} doc Shared doc. | ||
* @param {Object} newPost Updated post. | ||
*/ | ||
export function updatePostDoc(doc: yjs.Doc, newPost: any): void; | ||
/** | ||
* Converts the comments doc into a comment list. | ||
* | ||
* @param {yjs.Map} commentsDoc Comments doc. | ||
* @return {Array} Comment list. | ||
*/ | ||
export function commentsDocToArray(commentsDoc: yjs.Map<any>): any[]; | ||
/** | ||
* Converts the block doc into a block list. | ||
* | ||
* @param {yjs.Map} yDocBlocks Block doc. | ||
* @param {string} clientId Current block clientId. | ||
* @return {Array} Block list. | ||
*/ | ||
export function blocksDocToArray(yDocBlocks: yjs.Map<any>, clientId?: string): any[]; | ||
/** | ||
* Converts the post doc into a post object. | ||
* | ||
* @param {yjs.Map} doc Shared doc. | ||
* @return {Object} Post object. | ||
*/ | ||
export function postDocToObject(doc: yjs.Map<any>): any; | ||
import * as yjs from "yjs"; | ||
//# sourceMappingURL=yjs.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* @param {object} opts - Hook options | ||
* @param {object[]} opts.blocks | ||
* @param {OnUpdate} opts.onRemoteDataChange | ||
* @param {CollaborationSettings} [opts.settings] | ||
*/ | ||
export default function useYjs({ blocks, onRemoteDataChange, settings }: { | ||
blocks: object[]; | ||
onRemoteDataChange: OnUpdate; | ||
settings?: import("../../..").CollaborationSettings | undefined; | ||
}): void; | ||
export type IsoEditorSelection = { | ||
selectionStart: object; | ||
selectionEnd: object; | ||
}; | ||
export type CollaborationSettings = import('../../..').CollaborationSettings; | ||
export type CollaborationTransport = import('../../..').CollaborationTransport; | ||
export type CollaborationTransportDocMessage = import('../../..').CollaborationTransportDocMessage; | ||
export type CollaborationTransportSelectionMessage = import('../../..').CollaborationTransportSelectionMessage; | ||
export type EditorSelection = import('../../..').EditorSelection; | ||
export type OnUpdate = import('..').OnUpdate; | ||
//# sourceMappingURL=index.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export function createDocument({ identity, applyDataChanges, getData, sendMessage, }: { | ||
identity: any; | ||
applyDataChanges: any; | ||
getData: any; | ||
sendMessage: any; | ||
}): { | ||
applyDataChanges(data: any): void; | ||
connect(): void; | ||
disconnect(): void; | ||
startSharing(data: any): void; | ||
receiveMessage({ protocol, messageType, origin, ...content }: { | ||
[x: string]: any; | ||
protocol: any; | ||
messageType: any; | ||
origin: any; | ||
}): void; | ||
onRemoteDataChange(listener: any): () => void; | ||
onStateChange(listener: any): () => void; | ||
getState(): string; | ||
}; | ||
//# sourceMappingURL=yjs-doc.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
declare var _default: import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any>>; | ||
declare var _default: import("@wordpress/element/node_modules/@types/react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("@wordpress/element/node_modules/@types/react").RefAttributes<any>>; | ||
export default _default; | ||
//# sourceMappingURL=redo.d.ts.map |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
declare var _default: import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<any>>; | ||
declare var _default: import("@wordpress/element/node_modules/@types/react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("@wordpress/element/node_modules/@types/react").RefAttributes<any>>; | ||
export default _default; | ||
//# sourceMappingURL=undo.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Applies given carets to the given record. | ||
* | ||
* @param {Object} record The record to apply carets to. | ||
* @param {Array} carets The carets to apply. | ||
* @return {Object} A record with the carets applied. | ||
*/ | ||
export function applyCarets(record: any, carets?: any[]): any; | ||
export namespace settings { | ||
const title: string; | ||
const tagName: string; | ||
const className: string; | ||
namespace attributes { | ||
export const id: string; | ||
const className_1: string; | ||
export { className_1 as className }; | ||
} | ||
function edit(): null; | ||
function edit(): null; | ||
function __experimentalGetPropsForEditableTreePreparation(select: any, { richTextIdentifier, blockClientId }: { | ||
richTextIdentifier: any; | ||
blockClientId: any; | ||
}): { | ||
carets: { | ||
id: string; | ||
label: any; | ||
start: any; | ||
end: any; | ||
color: any; | ||
}[]; | ||
}; | ||
function __experimentalGetPropsForEditableTreePreparation(select: any, { richTextIdentifier, blockClientId }: { | ||
richTextIdentifier: any; | ||
blockClientId: any; | ||
}): { | ||
carets: { | ||
id: string; | ||
label: any; | ||
start: any; | ||
end: any; | ||
color: any; | ||
}[]; | ||
}; | ||
function __experimentalCreatePrepareEditableTree({ carets }: { | ||
carets: any; | ||
}): (formats: any, text: any) => any; | ||
function __experimentalCreatePrepareEditableTree({ carets }: { | ||
carets: any; | ||
}): (formats: any, text: any) => any; | ||
} | ||
export function registerFormatCollabCaret(): void; | ||
//# sourceMappingURL=index.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.