@elementor/editor-elements 4.5.0-1185 → 4.5.0-1186
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.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +3 -3
- package/src/sync/get-element-widget-markers.ts +7 -11
package/dist/index.mjs
CHANGED
|
@@ -906,19 +906,19 @@ var widgetMarkerSchema = z.object({
|
|
|
906
906
|
values: z.record(z.unknown()).optional()
|
|
907
907
|
});
|
|
908
908
|
var partSchema = z.string().regex(PART_PATTERN);
|
|
909
|
-
function
|
|
910
|
-
const result = widgetMarkerSchema.safeParse(
|
|
909
|
+
function getContainerWidgetMarker(container) {
|
|
910
|
+
const result = widgetMarkerSchema.safeParse(container?.model.get(WIDGET_MARKER_KEYS.widget));
|
|
911
911
|
if (!result.success) {
|
|
912
912
|
return null;
|
|
913
913
|
}
|
|
914
914
|
return { ...result.data, values: result.data.values ?? {} };
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
const result = partSchema.safeParse(
|
|
916
|
+
function getContainerPart(container) {
|
|
917
|
+
const result = partSchema.safeParse(container?.model.get(WIDGET_MARKER_KEYS.part));
|
|
918
918
|
return result.success ? result.data : null;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
return true ===
|
|
920
|
+
function isContainerSlot(container) {
|
|
921
|
+
return true === container?.model.get(WIDGET_MARKER_KEYS.slot) && null !== getContainerPart(container);
|
|
922
922
|
}
|
|
923
923
|
|
|
924
924
|
// src/sync/regenerate-local-style-ids.ts
|
|
@@ -1661,6 +1661,8 @@ export {
|
|
|
1661
1661
|
getAnchoredAncestorId,
|
|
1662
1662
|
getAnchoredDescendantId,
|
|
1663
1663
|
getContainer,
|
|
1664
|
+
getContainerPart,
|
|
1665
|
+
getContainerWidgetMarker,
|
|
1664
1666
|
getCurrentDocumentContainer,
|
|
1665
1667
|
getCurrentDocumentId,
|
|
1666
1668
|
getDefaultStyleTagFromPreviewElement,
|
|
@@ -1669,13 +1671,11 @@ export {
|
|
|
1669
1671
|
getElementIcon,
|
|
1670
1672
|
getElementInteractions,
|
|
1671
1673
|
getElementLabel,
|
|
1672
|
-
getElementPart,
|
|
1673
1674
|
getElementSetting,
|
|
1674
1675
|
getElementSettings,
|
|
1675
1676
|
getElementStyles,
|
|
1676
1677
|
getElementTitle,
|
|
1677
1678
|
getElementType,
|
|
1678
|
-
getElementWidgetMarker,
|
|
1679
1679
|
getElements,
|
|
1680
1680
|
getHostDocumentElements,
|
|
1681
1681
|
getHostDocumentId,
|
|
@@ -1683,8 +1683,8 @@ export {
|
|
|
1683
1683
|
getPreviewElementDOM,
|
|
1684
1684
|
getSelectedElements,
|
|
1685
1685
|
getWidgetsCache,
|
|
1686
|
+
isContainerSlot,
|
|
1686
1687
|
isElementAnchored,
|
|
1687
|
-
isElementSlot,
|
|
1688
1688
|
moveElement,
|
|
1689
1689
|
moveElements,
|
|
1690
1690
|
parseDefaultStyleTagFromClassList,
|