@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.
|
@@ -5588,20 +5588,29 @@ const abstractAnnotationBehaviors = [behavior_core.defineBehavior({
|
|
|
5588
5588
|
snapshot,
|
|
5589
5589
|
event
|
|
5590
5590
|
}) => {
|
|
5591
|
-
|
|
5591
|
+
let success;
|
|
5592
|
+
const failures = [];
|
|
5593
|
+
for (const converter of snapshot.context.converters) {
|
|
5592
5594
|
const data = event.originEvent.originEvent.dataTransfer.getData(converter.mimeType);
|
|
5593
|
-
|
|
5595
|
+
if (!data)
|
|
5596
|
+
continue;
|
|
5597
|
+
const deserializeEvent = converter.deserialize({
|
|
5594
5598
|
snapshot,
|
|
5595
5599
|
event: {
|
|
5596
5600
|
type: "deserialize",
|
|
5597
5601
|
data
|
|
5598
5602
|
}
|
|
5599
|
-
})
|
|
5600
|
-
|
|
5601
|
-
|
|
5603
|
+
});
|
|
5604
|
+
if (deserializeEvent.type === "deserialization.success") {
|
|
5605
|
+
success = deserializeEvent;
|
|
5606
|
+
break;
|
|
5607
|
+
} else
|
|
5608
|
+
failures.push(deserializeEvent);
|
|
5609
|
+
}
|
|
5610
|
+
return success || {
|
|
5602
5611
|
type: "deserialization.failure",
|
|
5603
5612
|
mimeType: "*/*",
|
|
5604
|
-
reason:
|
|
5613
|
+
reason: failures.map((failure) => failure.reason).join(", ")
|
|
5605
5614
|
};
|
|
5606
5615
|
},
|
|
5607
5616
|
actions: [({
|