0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Release v2.2.9

This commit is contained in:
Neil Jenkins 2024-07-17 16:21:35 +10:00
parent ac5972b7e3
commit 196f325fc0
13 changed files with 39 additions and 26 deletions

View file

@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file, starting fr
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.2.9] - 2024-07-17
### Fixed
- Fix incorrect styles can be applied after splitting at the end of inline
formatting, blurring, and focusing again.
- Fix font info sometimes not returned even when selection within a single
text span.
## [2.2.8] - 2024-02-21
### Fixed

2
dist/squire-raw.js vendored
View file

@ -2153,6 +2153,7 @@
this.addEventListener("mousedown", this._disableRestoreSelection);
this.addEventListener("touchstart", this._disableRestoreSelection);
this.addEventListener("focus", this._restoreSelection);
this.addEventListener("blur", this._removeZWS);
this._isShiftDown = false;
this.addEventListener("cut", _onCut);
this.addEventListener("copy", _onCopy);
@ -3022,6 +3023,7 @@
if (!range) {
range = this.getSelection();
}
moveRangeBoundariesDownTree(range);
let seenAttributes = 0;
let element = range.commonAncestorContainer;
if (range.collapsed || element instanceof Text) {

2
dist/squire-raw.mjs vendored
View file

@ -2150,6 +2150,7 @@ var Squire = class {
this.addEventListener("mousedown", this._disableRestoreSelection);
this.addEventListener("touchstart", this._disableRestoreSelection);
this.addEventListener("focus", this._restoreSelection);
this.addEventListener("blur", this._removeZWS);
this._isShiftDown = false;
this.addEventListener("cut", _onCut);
this.addEventListener("copy", _onCopy);
@ -3019,6 +3020,7 @@ var Squire = class {
if (!range) {
range = this.getSelection();
}
moveRangeBoundariesDownTree(range);
let seenAttributes = 0;
let element = range.commonAncestorContainer;
if (range.collapsed || element instanceof Text) {

16
dist/squire.js vendored

File diff suppressed because one or more lines are too long

4
dist/squire.js.map vendored

File diff suppressed because one or more lines are too long

16
dist/squire.mjs vendored

File diff suppressed because one or more lines are too long

4
dist/squire.mjs.map vendored

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
import type { Squire } from './Editor';
declare const extractRangeToClipboard: (event: ClipboardEvent, range: Range, root: HTMLElement, removeRangeFromDocument: boolean, toCleanHTML: ((html: string) => string) | null, toPlainText: ((html: string) => string) | null, plainTextOnly: boolean) => boolean;
declare const extractRangeToClipboard: (event: ClipboardEvent, range: Range, root: HTMLElement, removeRangeFromDocument: boolean, toCleanHTML: null | ((html: string) => string), toPlainText: null | ((html: string) => string), plainTextOnly: boolean) => boolean;
declare const _onCut: (this: Squire, event: ClipboardEvent) => void;
declare const _onCopy: (this: Squire, event: ClipboardEvent) => void;
declare const _monitorShiftKey: (this: Squire, event: KeyboardEvent) => void;

View file

@ -1 +1 @@
{"version":3,"file":"Clipboard.d.ts","sourceRoot":"","sources":["../../source/Clipboard.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAOvC,QAAA,MAAM,uBAAuB,UAClB,cAAc,SACd,KAAK,QACN,WAAW,2BACQ,OAAO,uBACJ,MAAM,KAAK,MAAM,+BACjB,MAAM,KAAK,MAAM,yBAC9B,OAAO,KACvB,OAyFF,CAAC;AAIF,QAAA,MAAM,MAAM,SAAmB,MAAM,SAAS,cAAc,KAAG,IAkC9D,CAAC;AAEF,QAAA,MAAM,OAAO,SAAmB,MAAM,SAAS,cAAc,KAAG,IAU/D,CAAC;AAIF,QAAA,MAAM,gBAAgB,SAAmB,MAAM,SAAS,aAAa,KAAG,IAEvE,CAAC;AAEF,QAAA,MAAM,QAAQ,SAAmB,MAAM,SAAS,cAAc,KAAG,IAqLhE,CAAC;AAKF,QAAA,MAAM,OAAO,SAAmB,MAAM,SAAS,SAAS,KAAG,IAwB1D,CAAC;AAIF,OAAO,EACH,uBAAuB,EACvB,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,OAAO,GACV,CAAC"}
{"version":3,"file":"Clipboard.d.ts","sourceRoot":"","sources":["../../source/Clipboard.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAOvC,QAAA,MAAM,uBAAuB,UAClB,cAAc,SACd,KAAK,QACN,WAAW,2BACQ,OAAO,eACnB,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,eACjC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,iBAC/B,OAAO,KACvB,OAyFF,CAAC;AAIF,QAAA,MAAM,MAAM,SAAmB,MAAM,SAAS,cAAc,KAAG,IAkC9D,CAAC;AAEF,QAAA,MAAM,OAAO,SAAmB,MAAM,SAAS,cAAc,KAAG,IAU/D,CAAC;AAIF,QAAA,MAAM,gBAAgB,SAAmB,MAAM,SAAS,aAAa,KAAG,IAEvE,CAAC;AAEF,QAAA,MAAM,QAAQ,SAAmB,MAAM,SAAS,cAAc,KAAG,IAqLhE,CAAC;AAKF,QAAA,MAAM,OAAO,SAAmB,MAAM,SAAS,SAAS,KAAG,IAwB1D,CAAC;AAIF,OAAO,EACH,uBAAuB,EACvB,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,OAAO,GACV,CAAC"}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../source/node/Block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAK5D,QAAA,MAAM,cAAc,SACV,IAAI,QACJ,OAAO,GAAG,gBAAgB,KACjC,aAAa,WAAW,CAI1B,CAAC;AAEF,QAAA,MAAM,gBAAgB,SACZ,IAAI,QACJ,OAAO,GAAG,gBAAgB,KACjC,WAAW,GAAG,IAGhB,CAAC;AAEF,QAAA,MAAM,YAAY,SACR,IAAI,QACJ,OAAO,GAAG,gBAAgB,KACjC,WAAW,GAAG,IAGhB,CAAC;AAEF,QAAA,MAAM,YAAY,UAAW,OAAO,KAAG,OAEtC,CAAC;AAIF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC"}
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../source/node/Block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAK5D,QAAA,MAAM,cAAc,SACV,IAAI,QACJ,OAAO,GAAG,gBAAgB,KACjC,YAAY,CAAC,WAAW,CAI1B,CAAC;AAEF,QAAA,MAAM,gBAAgB,SACZ,IAAI,QACJ,OAAO,GAAG,gBAAgB,KACjC,WAAW,GAAG,IAGhB,CAAC;AAEF,QAAA,MAAM,YAAY,SACR,IAAI,QACJ,OAAO,GAAG,gBAAgB,KACjC,WAAW,GAAG,IAGhB,CAAC;AAEF,QAAA,MAAM,YAAY,UAAW,OAAO,KAAG,OAEtC,CAAC;AAIF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC"}

View file

@ -1 +1 @@
{"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../source/node/Node.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,aAAa,QACV,MAAM,UACH,OAAO,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,aAC1B,IAAI,EAAE,KAClB,WAkBF,CAAC;AAIF,QAAA,MAAM,QAAQ,SACJ,WAAW,GAAG,IAAI,SACjB,WAAW,GAAG,IAAI,KAC1B,OAeF,CAAC;AAEF,QAAA,MAAM,gBAAgB,SACZ,IAAI,GAAG,OAAO,OACf,MAAM,eACE,OAAO,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAC3C,OAaF,CAAC;AAIF,QAAA,MAAM,UAAU,SACN,IAAI,GAAG,IAAI,QACX,OAAO,GAAG,gBAAgB,OAC3B,MAAM,eACE,OAAO,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAC3C,I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M,kBAAkB,SAAU,IAAI,UAAU,MAAM,KAAG,IAAI,GAAG,IAgB/D,CAAC;AAEF,QAAA,MAAM,SAAS,SAAU,IAAI,KAAG,MAM/B,CAAC;AAIF,QAAA,MAAM,KAAK,SAAU,IAAI,KAAG,gBAQ3B,CAAC;AAEF,QAAA,MAAM,MAAM,SAAU,IAAI,KAAG,IAM5B,CAAC;AAEF,QAAA,MAAM,WAAW,SAAU,IAAI,SAAS,IAAI,KAAG,IAK9C,CAAC;AAIF,OAAO,EACH,QAAQ,EACR,aAAa,EACb,MAAM,EACN,KAAK,EACL,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,GACd,CAAC"}

View file

@ -1,6 +1,6 @@
{
"name": "squire-rte",
"version": "2.2.8",
"version": "2.2.9",
"description": "Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible.",
"main": "dist/squire.mjs",
"types": "dist/types/Squire.d.ts",