Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
build(deps): regenerate the CKEditor patches for 48.3.1
Elian Doranba652f6c99ab
diff --git a/patches/@ckeditor__ckeditor5-code-block.patch b/patches/@ckeditor__ckeditor5-code-block.patchindex dd5df70ebd..46c68688ce 100644--- a/patches/@ckeditor__ckeditor5-code-block.patch+++ b/patches/@ckeditor__ckeditor5-code-block.patch@@ -28,14 +28,14 @@ index 50d1b0005b464f33fb3f07f69c06f36a35e0c406..785e95ceeb7fce12be6249b43abf9b83background: unset;border-radius: 0;diff --git a/dist/index.js b/dist/index.js-index 2e231803ce8450f8498e2a37f1be8c32ff52d090..b54c4943904d2b325f3ca6cef08888b3defc29b9 100644+index 055bdaeb3665fd469b59e09ec1111fc4da20be6c..b405e7c2b76c33e6a41d221389ffff3c2d791300 100644--- a/dist/index.js+++ b/dist/index.js-@@ -673,6 +673,7 @@ function getLastOutdentableSequenceRange(model, position, sequence) {- // Attributes added only in the editing view.- if (useLabels) {- preAttributes['data-language'] = languagesToLabels[codeBlockLanguage];-+ preAttributes.class = "hljs";- preAttributes.spellcheck = 'false';- }- const codeAttributes = languagesToClasses[codeBlockLanguage] ? {+@@ -540,6 +540,7 @@ function modelToViewCodeBlockInsertion(model, languageDefs, useLabels = false) {+ const preAttributes = {};+ if (useLabels) {+ preAttributes["data-language"] = languagesToLabels[codeBlockLanguage];++ preAttributes.class = "hljs";+ preAttributes.spellcheck = "false";+ }+ const codeAttributes = languagesToClasses[codeBlockLanguage] ? { class: languagesToClasses[codeBlockLanguage] } : void 0;diff --git a/patches/@ckeditor__ckeditor5-mention.patch b/patches/@ckeditor__ckeditor5-mention.patchindex 0f55fc690c..efb61721b5 100644--- a/patches/@ckeditor__ckeditor5-mention.patch+++ b/patches/@ckeditor__ckeditor5-mention.patch@@ -1,13 +1,16 @@diff --git a/dist/index.js b/dist/index.js-index 5c1b7d98d6a47f56a00440a6753368676bc26a7a..46cf87ae341bd2405fb756ba827c61b5b062f6b6 100644+index 2ad1db419fd67377a6ee0af0b76124891fdd6318..2dc0de85ffc625e2fb20a96effebca4c664f7fb1 100644--- a/dist/index.js+++ b/dist/index.js-@@ -609,6 +609,16 @@ const defaultCommitKeyCodes = [- }- if (data.keyCode == keyCodes.esc) {- this._hideUIAndRemoveMarker();+@@ -595,7 +595,19 @@ var MentionUI = class extends Plugin {+ if (data.keyCode == keyCodes.arrowdown) this._mentionsView.selectNext();+ if (data.keyCode == keyCodes.arrowup) this._mentionsView.selectPrevious();+ if (commitKeys.includes(data.keyCode)) this._mentionsView.executeSelected();+- if (data.keyCode == keyCodes.esc) this._hideUIAndRemoveMarker();++ if (data.keyCode == keyCodes.esc) {++ this._hideUIAndRemoveMarker();+-+ editor.model.change(writer => {++ editor.model.change(writer => {+ // insert a zero-width space as a special marker that we don't want a mention active anymore+ // see e.g. https://github.com/zadam/trilium/issues/4692+ const insertPosition = editor.model.document.selection.getLastPosition();@@ -16,29 +19,19 @@ index 5c1b7d98d6a47f56a00440a6753368676bc26a7a..46cf87ae341bd2405fb756ba827c61b5+ writer.insertText('\u2002', insertPosition);+ }+ });- }- }- }, {-@@ -1075,12 +1085,11 @@ const defaultCommitKeyCodes = [- */ function createRegExp(marker, minimumCharacters) {- const numberOfCharacters = minimumCharacters == 0 ? '*' : `{${minimumCharacters},}`;- const openAfterCharacters = env.features.isRegExpUnicodePropertySupported ? '\\p{Ps}\\p{Pi}"\'' : '\\(\\[{"\'';-- const mentionCharacters = '.';-+ const mentionCharacters = '^=\u2002';- // I wanted to make an util out of it, but since this regexp uses "u" flag, it became difficult.- // When "u" flag is used, the regexp has "strict" escaping rules, i.e. if you try to escape a character that does not need- // to be escaped, RegExp() will throw. It made it difficult to write a generic util, because different characters are- // allowed in different context. For example, escaping "-" sometimes was correct, but sometimes it threw an error.-- marker = marker.replace(/[.*+?^${}()\-|[\]\\]/g, '\\$&');- // The pattern consists of 3 groups:- //- // - 0 (non-capturing): Opening sequence - start of the line, space or an opening punctuation character like "(" or "\"",-@@ -1089,7 +1098,7 @@ const defaultCommitKeyCodes = [- //- // The pattern matches up to the caret (end of string switch - $).- // (0: opening sequence )(1: marker )(2: typed mention )$-- const pattern = `(?:^|[ ${openAfterCharacters}])(${marker})(${mentionCharacters}${numberOfCharacters})$`;-+ const pattern = `(?:^|[= ${ openAfterCharacters }])([${ marker }])([${ mentionCharacters }]${ numberOfCharacters })$`;- return new RegExp(pattern, 'u');++ }+ }+ }, { priority: "highest" });+ clickOutsideHandler({+@@ -979,9 +991,8 @@ function getLastValidMarkerInText(feedsWithPattern, text) {+ function createRegExp(marker, minimumCharacters) {+ const numberOfCharacters = minimumCharacters == 0 ? "*" : `{${minimumCharacters},}`;+ const openAfterCharacters = env.features.isRegExpUnicodePropertySupported ? "\\p{Ps}\\p{Pi}\"'" : "\\(\\[{\"'";+- const mentionCharacters = ".";+- marker = marker.replace(/[.*+?^${}()\-|[\]\\]/g, "\\$&");+- const pattern = `(?:^|[ ${openAfterCharacters}])(${marker})(${mentionCharacters}${numberOfCharacters})$`;++ const mentionCharacters = "^=\u2002";++ const pattern = `(?:^|[= ${openAfterCharacters}])([${marker}])([${mentionCharacters}]${numberOfCharacters})$`;+ return new RegExp(pattern, "u");}/**diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex f0acb13ec3..a0e7476660 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -82,8 +82,8 @@ overrides:extract-zip>yauzl: 3.4.0patchedDependencies:- '@ckeditor/ckeditor5-code-block': 1530be090e4f5235e197fb6208a8e8230e3355d5633fc7cad2b2e892659e9c04- '@ckeditor/ckeditor5-mention': 70377e48a04e2f45abba79aa35f3d5527ec7aa7ffce44056f9957a49a24a4a60+ '@ckeditor/ckeditor5-code-block': e59276f9051081b0220d991563ec6f290a7b1e1c3ae9b349a9a08875f47bd466+ '@ckeditor/ckeditor5-mention': 91c41ee286960cf306640d976142aa98e286415096d5731828d796ac574fdbe8'@excalidraw/[email protected]': 859531a8ff622291b895d36bcd33e07ced6fcb3bcc90631ccaf776789b03f0c2'@maplibre/[email protected]': c30b921f19820021e9c5c23d64378cbdf3dfba379cd4b5daff8a3f1f8b3578d5[email protected]: 124bf3dd7f7c9674e69724570d6727af9dea5b99a30a56a6e4573a95c49c4402@@ -14291,7 +14291,7 @@ snapshots:'@ckeditor/ckeditor5-upload': 48.3.1'@ckeditor/ckeditor5-utils': 48.3.1- '@ckeditor/[email protected](patch_hash=1530be090e4f5235e197fb6208a8e8230e3355d5633fc7cad2b2e892659e9c04)':+ '@ckeditor/[email protected](patch_hash=e59276f9051081b0220d991563ec6f290a7b1e1c3ae9b349a9a08875f47bd466)':dependencies:'@ckeditor/ckeditor5-clipboard': 48.3.1'@ckeditor/ckeditor5-core': 48.3.1@@ -14420,7 +14420,7 @@ snapshots:dependencies:'@ckeditor/ckeditor5-core': 48.3.1'@ckeditor/ckeditor5-icons': 48.3.1- '@ckeditor/ckeditor5-mention': 48.3.1(patch_hash=70377e48a04e2f45abba79aa35f3d5527ec7aa7ffce44056f9957a49a24a4a60)+ '@ckeditor/ckeditor5-mention': 48.3.1(patch_hash=91c41ee286960cf306640d976142aa98e286415096d5731828d796ac574fdbe8)'@ckeditor/ckeditor5-typing': 48.3.1'@ckeditor/ckeditor5-ui': 48.3.1'@ckeditor/ckeditor5-utils': 48.3.1@@ -14700,7 +14700,7 @@ snapshots:'@ckeditor/ckeditor5-utils': 48.3.1'@ckeditor/ckeditor5-widget': 48.3.1- '@ckeditor/[email protected](patch_hash=70377e48a04e2f45abba79aa35f3d5527ec7aa7ffce44056f9957a49a24a4a60)':+ '@ckeditor/[email protected](patch_hash=91c41ee286960cf306640d976142aa98e286415096d5731828d796ac574fdbe8)':dependencies:'@ckeditor/ckeditor5-core': 48.3.1'@ckeditor/ckeditor5-engine': 48.3.1@@ -14715,7 +14715,7 @@ snapshots:'@ckeditor/ckeditor5-engine': 48.3.1'@ckeditor/ckeditor5-icons': 48.3.1'@ckeditor/ckeditor5-image': 48.3.1- '@ckeditor/ckeditor5-mention': 48.3.1(patch_hash=70377e48a04e2f45abba79aa35f3d5527ec7aa7ffce44056f9957a49a24a4a60)+ '@ckeditor/ckeditor5-mention': 48.3.1(patch_hash=91c41ee286960cf306640d976142aa98e286415096d5731828d796ac574fdbe8)'@ckeditor/ckeditor5-ui': 48.3.1'@ckeditor/ckeditor5-utils': 48.3.1'@ckeditor/ckeditor5-widget': 48.3.1@@ -14849,7 +14849,7 @@ snapshots:'@ckeditor/ckeditor5-core': 48.3.1'@ckeditor/ckeditor5-heading': 48.3.1'@ckeditor/ckeditor5-icons': 48.3.1- '@ckeditor/ckeditor5-mention': 48.3.1(patch_hash=70377e48a04e2f45abba79aa35f3d5527ec7aa7ffce44056f9957a49a24a4a60)+ '@ckeditor/ckeditor5-mention': 48.3.1(patch_hash=91c41ee286960cf306640d976142aa98e286415096d5731828d796ac574fdbe8)'@ckeditor/ckeditor5-style': 48.3.1'@ckeditor/ckeditor5-template': 48.3.1'@ckeditor/ckeditor5-ui': 48.3.1@@ -14921,7 +14921,7 @@ snapshots:'@ckeditor/[email protected]':dependencies:'@ckeditor/ckeditor5-clipboard': 48.3.1- '@ckeditor/ckeditor5-code-block': 48.3.1(patch_hash=1530be090e4f5235e197fb6208a8e8230e3355d5633fc7cad2b2e892659e9c04)+ '@ckeditor/ckeditor5-code-block': 48.3.1(patch_hash=e59276f9051081b0220d991563ec6f290a7b1e1c3ae9b349a9a08875f47bd466)'@ckeditor/ckeditor5-collaboration-core': 48.3.1'@ckeditor/ckeditor5-comments': 48.3.1'@ckeditor/ckeditor5-core': 48.3.1@@ -21546,7 +21546,7 @@ snapshots:'@ckeditor/ckeditor5-ckfinder': 48.3.1'@ckeditor/ckeditor5-clipboard': 48.3.1'@ckeditor/ckeditor5-cloud-services': 48.3.1- '@ckeditor/ckeditor5-code-block': 48.3.1(patch_hash=1530be090e4f5235e197fb6208a8e8230e3355d5633fc7cad2b2e892659e9c04)+ '@ckeditor/ckeditor5-code-block': 48.3.1(patch_hash=e59276f9051081b0220d991563ec6f290a7b1e1c3ae9b349a9a08875f47bd466)'@ckeditor/ckeditor5-core': 48.3.1'@ckeditor/ckeditor5-easy-image': 48.3.1'@ckeditor/ckeditor5-editor-balloon': 48.3.1@@ -21574,7 +21574,7 @@ snapshots:'@ckeditor/ckeditor5-list': 48.3.1'@ckeditor/ckeditor5-markdown-gfm': 48.3.1([email protected])'@ckeditor/ckeditor5-media-embed': 48.3.1- '@ckeditor/ckeditor5-mention': 48.3.1(patch_hash=70377e48a04e2f45abba79aa35f3d5527ec7aa7ffce44056f9957a49a24a4a60)+ '@ckeditor/ckeditor5-mention': 48.3.1(patch_hash=91c41ee286960cf306640d976142aa98e286415096d5731828d796ac574fdbe8)'@ckeditor/ckeditor5-minimap': 48.3.1'@ckeditor/ckeditor5-page-break': 48.3.1'@ckeditor/ckeditor5-paragraph': 48.3.1