Skip to content

Commit

Permalink
Release version v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alecgibson committed Jul 26, 2022
1 parent 3474541 commit c9f8bdf
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ coverage/
# Consumers will override this anyway, so don't bother committing
package-lock.json
yarn.lock
!/dist
4 changes: 4 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import QuillCursors from './quill-cursors/quill-cursors';
import Cursor from './quill-cursors/cursor';
import '../assets/quill-cursors.scss';
export { QuillCursors as default, Cursor };
2 changes: 2 additions & 0 deletions dist/quill-cursors.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions dist/quill-cursors.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*!
* RangeFix v0.2.10
* https://github.com/edg2s/rangefix
*
* Copyright 2014-22 Ed Sanders.
* Released under the MIT license
*/
48 changes: 48 additions & 0 deletions dist/quill-cursors/cursor.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import IQuillCursorsOptions from './i-quill-cursors-options';
import IQuillRange from './i-range';
export default class Cursor {
static readonly CONTAINER_ELEMENT_TAG = "SPAN";
static readonly SELECTION_ELEMENT_TAG = "SPAN";
static readonly CURSOR_CLASS = "ql-cursor";
static readonly SELECTION_CLASS = "ql-cursor-selections";
static readonly SELECTION_BLOCK_CLASS = "ql-cursor-selection-block";
static readonly CARET_CLASS = "ql-cursor-caret";
static readonly CARET_CONTAINER_CLASS = "ql-cursor-caret-container";
static readonly CONTAINER_HOVER_CLASS = "hover";
static readonly CONTAINER_NO_POINTER_CLASS = "no-pointer";
static readonly FLAG_CLASS = "ql-cursor-flag";
static readonly FLAG_FLIPPED_CLASS = "flag-flipped";
static readonly NAME_CLASS = "ql-cursor-name";
static readonly HIDDEN_CLASS = "hidden";
static readonly NO_DELAY_CLASS = "no-delay";
readonly id: string;
readonly name: string;
readonly color: string;
range: IQuillRange;
private _el;
private _selectionEl;
private _caretEl;
private _flagEl;
private _hideDelay;
private _hideSpeedMs;
private _positionFlag;
constructor(id: string, name: string, color: string);
build(options: IQuillCursorsOptions): HTMLElement;
show(): void;
hide(): void;
remove(): void;
toggleNearCursor(pointX: number, pointY: number): boolean;
toggleFlag(shouldShow?: boolean): void;
updateCaret(rectangle: ClientRect, container: ClientRect): void;
updateSelection(selections: ClientRect[], container: ClientRect): void;
private _setHoverState;
private _toggleOpenedCursor;
private _getCoordinates;
private _updateCaretFlag;
private _clearSelection;
private _addSelection;
private _selectionBlock;
private _sortByDomPosition;
private _sanitize;
private _serialize;
}
6 changes: 6 additions & 0 deletions dist/quill-cursors/i-coordinates.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface ICoordinates {
left: number;
top: number;
right: number;
bottom: number;
}
8 changes: 8 additions & 0 deletions dist/quill-cursors/i-delta.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default interface IDelta {
ops: IOp[];
}
export interface IOp {
insert?: any;
delete?: number;
retain?: number;
}
10 changes: 10 additions & 0 deletions dist/quill-cursors/i-quill-cursors-options.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default interface IQuillCursorsOptions {
template?: string;
containerClass?: string;
selectionChangeSource?: string;
hideDelayMs?: number;
hideSpeedMs?: number;
transformOnTextChange?: boolean;
boundsContainer?: HTMLElement;
positionFlag?: (flag: HTMLElement, caretRectangle: ClientRect, container: ClientRect) => void;
}
4 changes: 4 additions & 0 deletions dist/quill-cursors/i-range.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default interface IQuillRange {
index: number;
length: number;
}
34 changes: 34 additions & 0 deletions dist/quill-cursors/quill-cursors.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import IQuillCursorsOptions from './i-quill-cursors-options';
import Cursor from './cursor';
import IQuillRange from './i-range';
export default class QuillCursors {
static DEFAULTS: IQuillCursorsOptions;
readonly quill: any;
readonly options: IQuillCursorsOptions;
private readonly _cursors;
private readonly _container;
private readonly _boundsContainer;
private _currentSelection;
private _isObserving;
constructor(quill: any, options?: IQuillCursorsOptions);
createCursor(id: string, name: string, color: string): Cursor;
moveCursor(id: string, range: IQuillRange): void;
removeCursor(id: string): void;
update(): void;
clearCursors(): void;
toggleFlag(id: string, shouldShow?: boolean): void;
cursors(): Cursor[];
private _registerSelectionChangeListeners;
private _registerTextChangeListener;
private _registerDomListeners;
private _handleCursorTouch;
private _registerResizeObserver;
private _updateCursor;
private _indexWithinQuillBounds;
private _leafIsValid;
private _handleTextChange;
private _emitSelection;
private _setDefaults;
private _lineRanges;
private _transformCursors;
}
2 changes: 2 additions & 0 deletions dist/quill-cursors/template.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const template: string;
export default template;

0 comments on commit c9f8bdf

Please sign in to comment.