@portabletext/editor 1.44.14 → 1.44.15
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.
|
@@ -5614,20 +5614,29 @@ const abstractAnnotationBehaviors = [defineBehavior({
|
|
|
5614
5614
|
snapshot,
|
|
5615
5615
|
event
|
|
5616
5616
|
}) => {
|
|
5617
|
-
|
|
5617
|
+
let success;
|
|
5618
|
+
const failures = [];
|
|
5619
|
+
for (const converter of snapshot.context.converters) {
|
|
5618
5620
|
const data = event.originEvent.originEvent.dataTransfer.getData(converter.mimeType);
|
|
5619
|
-
|
|
5621
|
+
if (!data)
|
|
5622
|
+
continue;
|
|
5623
|
+
const deserializeEvent = converter.deserialize({
|
|
5620
5624
|
snapshot,
|
|
5621
5625
|
event: {
|
|
5622
5626
|
type: "deserialize",
|
|
5623
5627
|
data
|
|
5624
5628
|
}
|
|
5625
|
-
})
|
|
5626
|
-
|
|
5627
|
-
|
|
5629
|
+
});
|
|
5630
|
+
if (deserializeEvent.type === "deserialization.success") {
|
|
5631
|
+
success = deserializeEvent;
|
|
5632
|
+
break;
|
|
5633
|
+
} else
|
|
5634
|
+
failures.push(deserializeEvent);
|
|
5635
|
+
}
|
|
5636
|
+
return success || {
|
|
5628
5637
|
type: "deserialization.failure",
|
|
5629
5638
|
mimeType: "*/*",
|
|
5630
|
-
reason:
|
|
5639
|
+
reason: failures.map((failure) => failure.reason).join(", ")
|
|
5631
5640
|
};
|
|
5632
5641
|
},
|
|
5633
5642
|
actions: [({
|