@elementor/editor-interactions 4.1.0-715 → 4.1.0-717
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.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/commands/paste-interactions.ts +8 -2
package/dist/index.mjs
CHANGED
|
@@ -1285,10 +1285,14 @@ function normalizeClipboardInteractions(raw) {
|
|
|
1285
1285
|
return null;
|
|
1286
1286
|
}
|
|
1287
1287
|
const parsed = typeof raw === "string" ? JSON.parse(raw) : raw;
|
|
1288
|
-
|
|
1288
|
+
const payload = {
|
|
1289
|
+
version: parsed?.version ?? 1,
|
|
1290
|
+
items: parsed?.items?.filter((item) => isSupportedInteractionItem(item)) ?? []
|
|
1291
|
+
};
|
|
1292
|
+
if (!payload.items.length) {
|
|
1289
1293
|
return null;
|
|
1290
1294
|
}
|
|
1291
|
-
return
|
|
1295
|
+
return payload;
|
|
1292
1296
|
}
|
|
1293
1297
|
function regenerateInteractionIds(interactions) {
|
|
1294
1298
|
const cloned = structuredClone(interactions);
|