@liveblocks/emails 3.9.2-tiptap2 → 3.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +56 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +39 -54
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { detectDupes } from "@liveblocks/core";
|
|
|
3
3
|
|
|
4
4
|
// src/version.ts
|
|
5
5
|
var PKG_NAME = "@liveblocks/emails";
|
|
6
|
-
var PKG_VERSION = "3.9.2
|
|
6
|
+
var PKG_VERSION = "3.9.2";
|
|
7
7
|
var PKG_FORMAT = "esm";
|
|
8
8
|
|
|
9
9
|
// src/text-mention-notification.tsx
|
|
@@ -1091,12 +1091,9 @@ var iterateDeletedStructs = (transaction, ds, f) => ds.clients.forEach((deletes,
|
|
|
1091
1091
|
/** @type {Array<GC|Item>} */
|
|
1092
1092
|
transaction.doc.store.clients.get(clientid)
|
|
1093
1093
|
);
|
|
1094
|
-
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1097
|
-
for (let i = 0, del = deletes[i]; i < deletes.length && del.clock < clockState; del = deletes[++i]) {
|
|
1098
|
-
iterateStructs(transaction, structs, del.clock, del.len, f);
|
|
1099
|
-
}
|
|
1094
|
+
for (let i = 0; i < deletes.length; i++) {
|
|
1095
|
+
const del = deletes[i];
|
|
1096
|
+
iterateStructs(transaction, structs, del.clock, del.len, f);
|
|
1100
1097
|
}
|
|
1101
1098
|
});
|
|
1102
1099
|
var findIndexDS = (dis, clock) => {
|
|
@@ -2135,13 +2132,13 @@ var integrateStructs = (transaction, store, clientsStructRefs) => {
|
|
|
2135
2132
|
const addStackToRestSS = () => {
|
|
2136
2133
|
for (const item of stack) {
|
|
2137
2134
|
const client = item.id.client;
|
|
2138
|
-
const
|
|
2139
|
-
if (
|
|
2140
|
-
|
|
2141
|
-
restStructs.clients.set(client,
|
|
2135
|
+
const unapplicableItems = clientsStructRefs.get(client);
|
|
2136
|
+
if (unapplicableItems) {
|
|
2137
|
+
unapplicableItems.i--;
|
|
2138
|
+
restStructs.clients.set(client, unapplicableItems.refs.slice(unapplicableItems.i));
|
|
2142
2139
|
clientsStructRefs.delete(client);
|
|
2143
|
-
|
|
2144
|
-
|
|
2140
|
+
unapplicableItems.i = 0;
|
|
2141
|
+
unapplicableItems.refs = [];
|
|
2145
2142
|
} else {
|
|
2146
2143
|
restStructs.clients.set(client, [item]);
|
|
2147
2144
|
}
|
|
@@ -3650,8 +3647,6 @@ var typeMapSet = (transaction, parent, key, value) => {
|
|
|
3650
3647
|
case Boolean:
|
|
3651
3648
|
case Array:
|
|
3652
3649
|
case String:
|
|
3653
|
-
case Date:
|
|
3654
|
-
case BigInt:
|
|
3655
3650
|
content = new ContentAny([value]);
|
|
3656
3651
|
break;
|
|
3657
3652
|
case Uint8Array:
|
|
@@ -4917,7 +4912,7 @@ var YText = class _YText extends AbstractType {
|
|
|
4917
4912
|
/**
|
|
4918
4913
|
* Apply a {@link Delta} on this shared YText type.
|
|
4919
4914
|
*
|
|
4920
|
-
* @param {
|
|
4915
|
+
* @param {any} delta The changes to apply on this element.
|
|
4921
4916
|
* @param {object} opts
|
|
4922
4917
|
* @param {boolean} [opts.sanitize] Sanitize input delta. Removes ending newlines if set to true.
|
|
4923
4918
|
*
|
|
@@ -5264,9 +5259,8 @@ var YXmlTreeWalker = class {
|
|
|
5264
5259
|
n = type._start;
|
|
5265
5260
|
} else {
|
|
5266
5261
|
while (n !== null) {
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
n = nxt;
|
|
5262
|
+
if (n.right !== null) {
|
|
5263
|
+
n = n.right;
|
|
5270
5264
|
break;
|
|
5271
5265
|
} else if (n.parent === this._root) {
|
|
5272
5266
|
n = null;
|
|
@@ -5806,7 +5800,7 @@ var YXmlEvent = class extends YEvent {
|
|
|
5806
5800
|
* @param {YXmlElement|YXmlText|YXmlFragment} target The target on which the event is created.
|
|
5807
5801
|
* @param {Set<string|null>} subs The set of changed attributes. `null` is included if the
|
|
5808
5802
|
* child list changed.
|
|
5809
|
-
* @param {Transaction} transaction The transaction instance with
|
|
5803
|
+
* @param {Transaction} transaction The transaction instance with wich the
|
|
5810
5804
|
* change was created.
|
|
5811
5805
|
*/
|
|
5812
5806
|
constructor(target, subs, transaction) {
|
|
@@ -6016,7 +6010,7 @@ var AbstractStruct = class {
|
|
|
6016
6010
|
* This method is already assuming that `this.id.clock + this.length === this.id.clock`.
|
|
6017
6011
|
* Also this method does *not* remove right from StructStore!
|
|
6018
6012
|
* @param {AbstractStruct} right
|
|
6019
|
-
* @return {boolean}
|
|
6013
|
+
* @return {boolean} wether this merged with right
|
|
6020
6014
|
*/
|
|
6021
6015
|
mergeWith(right) {
|
|
6022
6016
|
return false;
|
|
@@ -7030,7 +7024,8 @@ var Item = class _Item extends AbstractStruct {
|
|
|
7030
7024
|
if (this.left && this.left.constructor === _Item) {
|
|
7031
7025
|
this.parent = this.left.parent;
|
|
7032
7026
|
this.parentSub = this.left.parentSub;
|
|
7033
|
-
}
|
|
7027
|
+
}
|
|
7028
|
+
if (this.right && this.right.constructor === _Item) {
|
|
7034
7029
|
this.parent = this.right.parent;
|
|
7035
7030
|
this.parentSub = this.right.parentSub;
|
|
7036
7031
|
}
|
|
@@ -7810,41 +7805,33 @@ function toInlineCSSString(styles) {
|
|
|
7810
7805
|
// src/tiptap-editor.ts
|
|
7811
7806
|
import { assertNever as assertNever2 } from "@liveblocks/core";
|
|
7812
7807
|
|
|
7813
|
-
// ../../node_modules/y-prosemirror/src/plugins/sync-plugin.js
|
|
7814
|
-
var hashedMarkNameRegex = /(.*)(--[a-zA-Z0-9+/=]{8})$/;
|
|
7815
|
-
var yattr2markname = (attrName) => hashedMarkNameRegex.exec(attrName)?.[1] ?? attrName;
|
|
7816
|
-
|
|
7817
7808
|
// ../../node_modules/y-prosemirror/src/lib.js
|
|
7818
7809
|
function yXmlFragmentToProsemirrorJSON(xmlFragment) {
|
|
7819
7810
|
const items = xmlFragment.toArray();
|
|
7820
|
-
|
|
7811
|
+
function serialize(item) {
|
|
7821
7812
|
let response;
|
|
7822
|
-
if (item
|
|
7813
|
+
if (!item.nodeName) {
|
|
7823
7814
|
const delta = item.toDelta();
|
|
7824
|
-
response = delta.map(
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
}
|
|
7841
|
-
return mark;
|
|
7842
|
-
});
|
|
7843
|
-
}
|
|
7844
|
-
return text;
|
|
7815
|
+
response = delta.map((d) => {
|
|
7816
|
+
const text = {
|
|
7817
|
+
type: "text",
|
|
7818
|
+
text: d.insert
|
|
7819
|
+
};
|
|
7820
|
+
if (d.attributes) {
|
|
7821
|
+
text.marks = Object.keys(d.attributes).map((type) => {
|
|
7822
|
+
const attrs = d.attributes[type];
|
|
7823
|
+
const mark = {
|
|
7824
|
+
type
|
|
7825
|
+
};
|
|
7826
|
+
if (Object.keys(attrs)) {
|
|
7827
|
+
mark.attrs = attrs;
|
|
7828
|
+
}
|
|
7829
|
+
return mark;
|
|
7830
|
+
});
|
|
7845
7831
|
}
|
|
7846
|
-
|
|
7847
|
-
|
|
7832
|
+
return text;
|
|
7833
|
+
});
|
|
7834
|
+
} else {
|
|
7848
7835
|
response = {
|
|
7849
7836
|
type: item.nodeName
|
|
7850
7837
|
};
|
|
@@ -7856,11 +7843,9 @@ function yXmlFragmentToProsemirrorJSON(xmlFragment) {
|
|
|
7856
7843
|
if (children.length) {
|
|
7857
7844
|
response.content = children.map(serialize).flat();
|
|
7858
7845
|
}
|
|
7859
|
-
} else {
|
|
7860
|
-
unexpectedCase();
|
|
7861
7846
|
}
|
|
7862
7847
|
return response;
|
|
7863
|
-
}
|
|
7848
|
+
}
|
|
7864
7849
|
return {
|
|
7865
7850
|
type: "doc",
|
|
7866
7851
|
content: items.map(serialize)
|