@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 CHANGED
@@ -485,9 +485,9 @@ declare const WIDGET_MARKER_KEYS: {
485
485
  readonly part: "part";
486
486
  readonly slot: "slot";
487
487
  };
488
- declare function getElementWidgetMarker(elementId: ElementID): Required<V1ElementWidgetMarker> | null;
489
- declare function getElementPart(elementId: ElementID): string | null;
490
- declare function isElementSlot(elementId: ElementID): boolean;
488
+ declare function getContainerWidgetMarker(container: V1Element | null): Required<V1ElementWidgetMarker> | null;
489
+ declare function getContainerPart(container: V1Element | null): string | null;
490
+ declare function isContainerSlot(container: V1Element | null): boolean;
491
491
 
492
492
  declare function regenerateLocalStyleIds(element: V1ElementData): {
493
493
  styles: Record<StyleDefinitionID, StyleDefinition> | undefined;
@@ -659,4 +659,4 @@ declare const updateElementInteractions: ({ elementId, interactions, }: {
659
659
  }) => void;
660
660
  declare const playElementInteractions: (elementId: string, interactionId: string) => void;
661
661
 
662
- export { type AnimationPresetPropValue, type BackboneCollection, type BackboneModel, type BooleanPropValue, type ChildDependenciesConfig, type ChildDependencyRule, type ConfigPropValue, type Control, type ControlItem, type ControlLayout, type ControlsSection, type CreateElementParams, type CreateElementStyleArgs, DEFAULT_STYLE_CLASS_PREFIX, type DropElementParams, type DuplicateElementParams, type DuplicateElementsParams, type DuplicatedElement, type DuplicatedElementsResult, ELEMENT_STYLE_CHANGE_EVENT, type Element, type ElementChildren, type ElementControl, type ElementID, type ElementInteractions, type ElementModel, type ElementPosition, type ElementPositionKind, type ElementType, type ExcludedBreakpointsPropValue, type ExtendedWindow, type InteractionBreakpointsPropValue, type InteractionItemPropValue, type LinkInLinkRestriction, type ModelResult, type MoveElementParams, type NumberPropValue, type PseudoState, type StringPropValue, type TimingConfigPropValue, type UpdateElementSettingsArgs, type UpdateElementStyleArgs, type UseElementChildrenOptions, type V1Element, type V1ElementConfig, type V1ElementData, type V1ElementEditorSettingsProps, type V1ElementModelProps, type V1ElementSettingsProps, type V1ElementWidgetMarker, WIDGET_MARKER_KEYS, addModelToParent, bindSettingsReconcile, cloneElementTree, createElement, createElementStyle, createElements, deleteElement, deleteElementStyle, dropElement, duplicateElement, duplicateElements, evaluateWhen, findChildRecursive, findClosestContainer, findModelInDocument, generateElementId, getAllDescendants, getAnchoredAncestorId, getAnchoredDescendantId, getContainer, getCurrentDocumentContainer, getCurrentDocumentId, getDefaultStyleTagFromPreviewElement, getElementChildren as getElementChildrenWithFallback, getElementEditorSettings, getElementIcon, getElementInteractions, getElementLabel, getElementPart, getElementSetting, getElementSettings, getElementStyles, getElementTitle, getElementType, getElementWidgetMarker, getElements, getHostDocumentElements, getHostDocumentId, getLinkInLinkRestriction, getPreviewElementDOM, getSelectedElements, getWidgetsCache, isElementAnchored, isElementSlot, moveElement, moveElements, parseDefaultStyleTagFromClassList, playElementInteractions, reconcileInitialChildren, regenerateLocalStyleIds, removeElements, removeModelFromParent, replaceElement, resolveContainer, resolveInsertIndex, selectElement, shouldCreateNewLocalStyle, styleRerenderEvents, updateElementEditorSettings, updateElementInteractions, updateElementSettings, updateElementStyle, useElementChildren, useElementEditorSettings, useParentElement, useSelectedElement, useSelectedElementSettings };
662
+ export { type AnimationPresetPropValue, type BackboneCollection, type BackboneModel, type BooleanPropValue, type ChildDependenciesConfig, type ChildDependencyRule, type ConfigPropValue, type Control, type ControlItem, type ControlLayout, type ControlsSection, type CreateElementParams, type CreateElementStyleArgs, DEFAULT_STYLE_CLASS_PREFIX, type DropElementParams, type DuplicateElementParams, type DuplicateElementsParams, type DuplicatedElement, type DuplicatedElementsResult, ELEMENT_STYLE_CHANGE_EVENT, type Element, type ElementChildren, type ElementControl, type ElementID, type ElementInteractions, type ElementModel, type ElementPosition, type ElementPositionKind, type ElementType, type ExcludedBreakpointsPropValue, type ExtendedWindow, type InteractionBreakpointsPropValue, type InteractionItemPropValue, type LinkInLinkRestriction, type ModelResult, type MoveElementParams, type NumberPropValue, type PseudoState, type StringPropValue, type TimingConfigPropValue, type UpdateElementSettingsArgs, type UpdateElementStyleArgs, type UseElementChildrenOptions, type V1Element, type V1ElementConfig, type V1ElementData, type V1ElementEditorSettingsProps, type V1ElementModelProps, type V1ElementSettingsProps, type V1ElementWidgetMarker, WIDGET_MARKER_KEYS, addModelToParent, bindSettingsReconcile, cloneElementTree, createElement, createElementStyle, createElements, deleteElement, deleteElementStyle, dropElement, duplicateElement, duplicateElements, evaluateWhen, findChildRecursive, findClosestContainer, findModelInDocument, generateElementId, getAllDescendants, getAnchoredAncestorId, getAnchoredDescendantId, getContainer, getContainerPart, getContainerWidgetMarker, getCurrentDocumentContainer, getCurrentDocumentId, getDefaultStyleTagFromPreviewElement, getElementChildren as getElementChildrenWithFallback, getElementEditorSettings, getElementIcon, getElementInteractions, getElementLabel, getElementSetting, getElementSettings, getElementStyles, getElementTitle, getElementType, getElements, getHostDocumentElements, getHostDocumentId, getLinkInLinkRestriction, getPreviewElementDOM, getSelectedElements, getWidgetsCache, isContainerSlot, isElementAnchored, moveElement, moveElements, parseDefaultStyleTagFromClassList, playElementInteractions, reconcileInitialChildren, regenerateLocalStyleIds, removeElements, removeModelFromParent, replaceElement, resolveContainer, resolveInsertIndex, selectElement, shouldCreateNewLocalStyle, styleRerenderEvents, updateElementEditorSettings, updateElementInteractions, updateElementSettings, updateElementStyle, useElementChildren, useElementEditorSettings, useParentElement, useSelectedElement, useSelectedElementSettings };
package/dist/index.d.ts CHANGED
@@ -485,9 +485,9 @@ declare const WIDGET_MARKER_KEYS: {
485
485
  readonly part: "part";
486
486
  readonly slot: "slot";
487
487
  };
488
- declare function getElementWidgetMarker(elementId: ElementID): Required<V1ElementWidgetMarker> | null;
489
- declare function getElementPart(elementId: ElementID): string | null;
490
- declare function isElementSlot(elementId: ElementID): boolean;
488
+ declare function getContainerWidgetMarker(container: V1Element | null): Required<V1ElementWidgetMarker> | null;
489
+ declare function getContainerPart(container: V1Element | null): string | null;
490
+ declare function isContainerSlot(container: V1Element | null): boolean;
491
491
 
492
492
  declare function regenerateLocalStyleIds(element: V1ElementData): {
493
493
  styles: Record<StyleDefinitionID, StyleDefinition> | undefined;
@@ -659,4 +659,4 @@ declare const updateElementInteractions: ({ elementId, interactions, }: {
659
659
  }) => void;
660
660
  declare const playElementInteractions: (elementId: string, interactionId: string) => void;
661
661
 
662
- export { type AnimationPresetPropValue, type BackboneCollection, type BackboneModel, type BooleanPropValue, type ChildDependenciesConfig, type ChildDependencyRule, type ConfigPropValue, type Control, type ControlItem, type ControlLayout, type ControlsSection, type CreateElementParams, type CreateElementStyleArgs, DEFAULT_STYLE_CLASS_PREFIX, type DropElementParams, type DuplicateElementParams, type DuplicateElementsParams, type DuplicatedElement, type DuplicatedElementsResult, ELEMENT_STYLE_CHANGE_EVENT, type Element, type ElementChildren, type ElementControl, type ElementID, type ElementInteractions, type ElementModel, type ElementPosition, type ElementPositionKind, type ElementType, type ExcludedBreakpointsPropValue, type ExtendedWindow, type InteractionBreakpointsPropValue, type InteractionItemPropValue, type LinkInLinkRestriction, type ModelResult, type MoveElementParams, type NumberPropValue, type PseudoState, type StringPropValue, type TimingConfigPropValue, type UpdateElementSettingsArgs, type UpdateElementStyleArgs, type UseElementChildrenOptions, type V1Element, type V1ElementConfig, type V1ElementData, type V1ElementEditorSettingsProps, type V1ElementModelProps, type V1ElementSettingsProps, type V1ElementWidgetMarker, WIDGET_MARKER_KEYS, addModelToParent, bindSettingsReconcile, cloneElementTree, createElement, createElementStyle, createElements, deleteElement, deleteElementStyle, dropElement, duplicateElement, duplicateElements, evaluateWhen, findChildRecursive, findClosestContainer, findModelInDocument, generateElementId, getAllDescendants, getAnchoredAncestorId, getAnchoredDescendantId, getContainer, getCurrentDocumentContainer, getCurrentDocumentId, getDefaultStyleTagFromPreviewElement, getElementChildren as getElementChildrenWithFallback, getElementEditorSettings, getElementIcon, getElementInteractions, getElementLabel, getElementPart, getElementSetting, getElementSettings, getElementStyles, getElementTitle, getElementType, getElementWidgetMarker, getElements, getHostDocumentElements, getHostDocumentId, getLinkInLinkRestriction, getPreviewElementDOM, getSelectedElements, getWidgetsCache, isElementAnchored, isElementSlot, moveElement, moveElements, parseDefaultStyleTagFromClassList, playElementInteractions, reconcileInitialChildren, regenerateLocalStyleIds, removeElements, removeModelFromParent, replaceElement, resolveContainer, resolveInsertIndex, selectElement, shouldCreateNewLocalStyle, styleRerenderEvents, updateElementEditorSettings, updateElementInteractions, updateElementSettings, updateElementStyle, useElementChildren, useElementEditorSettings, useParentElement, useSelectedElement, useSelectedElementSettings };
662
+ export { type AnimationPresetPropValue, type BackboneCollection, type BackboneModel, type BooleanPropValue, type ChildDependenciesConfig, type ChildDependencyRule, type ConfigPropValue, type Control, type ControlItem, type ControlLayout, type ControlsSection, type CreateElementParams, type CreateElementStyleArgs, DEFAULT_STYLE_CLASS_PREFIX, type DropElementParams, type DuplicateElementParams, type DuplicateElementsParams, type DuplicatedElement, type DuplicatedElementsResult, ELEMENT_STYLE_CHANGE_EVENT, type Element, type ElementChildren, type ElementControl, type ElementID, type ElementInteractions, type ElementModel, type ElementPosition, type ElementPositionKind, type ElementType, type ExcludedBreakpointsPropValue, type ExtendedWindow, type InteractionBreakpointsPropValue, type InteractionItemPropValue, type LinkInLinkRestriction, type ModelResult, type MoveElementParams, type NumberPropValue, type PseudoState, type StringPropValue, type TimingConfigPropValue, type UpdateElementSettingsArgs, type UpdateElementStyleArgs, type UseElementChildrenOptions, type V1Element, type V1ElementConfig, type V1ElementData, type V1ElementEditorSettingsProps, type V1ElementModelProps, type V1ElementSettingsProps, type V1ElementWidgetMarker, WIDGET_MARKER_KEYS, addModelToParent, bindSettingsReconcile, cloneElementTree, createElement, createElementStyle, createElements, deleteElement, deleteElementStyle, dropElement, duplicateElement, duplicateElements, evaluateWhen, findChildRecursive, findClosestContainer, findModelInDocument, generateElementId, getAllDescendants, getAnchoredAncestorId, getAnchoredDescendantId, getContainer, getContainerPart, getContainerWidgetMarker, getCurrentDocumentContainer, getCurrentDocumentId, getDefaultStyleTagFromPreviewElement, getElementChildren as getElementChildrenWithFallback, getElementEditorSettings, getElementIcon, getElementInteractions, getElementLabel, getElementSetting, getElementSettings, getElementStyles, getElementTitle, getElementType, getElements, getHostDocumentElements, getHostDocumentId, getLinkInLinkRestriction, getPreviewElementDOM, getSelectedElements, getWidgetsCache, isContainerSlot, isElementAnchored, moveElement, moveElements, parseDefaultStyleTagFromClassList, playElementInteractions, reconcileInitialChildren, regenerateLocalStyleIds, removeElements, removeModelFromParent, replaceElement, resolveContainer, resolveInsertIndex, selectElement, shouldCreateNewLocalStyle, styleRerenderEvents, updateElementEditorSettings, updateElementInteractions, updateElementSettings, updateElementStyle, useElementChildren, useElementEditorSettings, useParentElement, useSelectedElement, useSelectedElementSettings };
package/dist/index.js CHANGED
@@ -43,6 +43,8 @@ __export(index_exports, {
43
43
  getAnchoredAncestorId: () => getAnchoredAncestorId,
44
44
  getAnchoredDescendantId: () => getAnchoredDescendantId,
45
45
  getContainer: () => getContainer,
46
+ getContainerPart: () => getContainerPart,
47
+ getContainerWidgetMarker: () => getContainerWidgetMarker,
46
48
  getCurrentDocumentContainer: () => getCurrentDocumentContainer,
47
49
  getCurrentDocumentId: () => getCurrentDocumentId,
48
50
  getDefaultStyleTagFromPreviewElement: () => getDefaultStyleTagFromPreviewElement,
@@ -51,13 +53,11 @@ __export(index_exports, {
51
53
  getElementIcon: () => getElementIcon,
52
54
  getElementInteractions: () => getElementInteractions,
53
55
  getElementLabel: () => getElementLabel,
54
- getElementPart: () => getElementPart,
55
56
  getElementSetting: () => getElementSetting,
56
57
  getElementSettings: () => getElementSettings,
57
58
  getElementStyles: () => getElementStyles,
58
59
  getElementTitle: () => getElementTitle,
59
60
  getElementType: () => getElementType,
60
- getElementWidgetMarker: () => getElementWidgetMarker,
61
61
  getElements: () => getElements,
62
62
  getHostDocumentElements: () => getHostDocumentElements,
63
63
  getHostDocumentId: () => getHostDocumentId,
@@ -65,8 +65,8 @@ __export(index_exports, {
65
65
  getPreviewElementDOM: () => getPreviewElementDOM,
66
66
  getSelectedElements: () => getSelectedElements,
67
67
  getWidgetsCache: () => getWidgetsCache,
68
+ isContainerSlot: () => isContainerSlot,
68
69
  isElementAnchored: () => isElementAnchored,
69
- isElementSlot: () => isElementSlot,
70
70
  moveElement: () => moveElement,
71
71
  moveElements: () => moveElements,
72
72
  parseDefaultStyleTagFromClassList: () => parseDefaultStyleTagFromClassList,
@@ -1001,19 +1001,19 @@ var widgetMarkerSchema = import_schema.z.object({
1001
1001
  values: import_schema.z.record(import_schema.z.unknown()).optional()
1002
1002
  });
1003
1003
  var partSchema = import_schema.z.string().regex(PART_PATTERN);
1004
- function getElementWidgetMarker(elementId) {
1005
- const result = widgetMarkerSchema.safeParse(getContainer(elementId)?.model.get(WIDGET_MARKER_KEYS.widget));
1004
+ function getContainerWidgetMarker(container) {
1005
+ const result = widgetMarkerSchema.safeParse(container?.model.get(WIDGET_MARKER_KEYS.widget));
1006
1006
  if (!result.success) {
1007
1007
  return null;
1008
1008
  }
1009
1009
  return { ...result.data, values: result.data.values ?? {} };
1010
1010
  }
1011
- function getElementPart(elementId) {
1012
- const result = partSchema.safeParse(getContainer(elementId)?.model.get(WIDGET_MARKER_KEYS.part));
1011
+ function getContainerPart(container) {
1012
+ const result = partSchema.safeParse(container?.model.get(WIDGET_MARKER_KEYS.part));
1013
1013
  return result.success ? result.data : null;
1014
1014
  }
1015
- function isElementSlot(elementId) {
1016
- return true === getContainer(elementId)?.model.get(WIDGET_MARKER_KEYS.slot) && null !== getElementPart(elementId);
1015
+ function isContainerSlot(container) {
1016
+ return true === container?.model.get(WIDGET_MARKER_KEYS.slot) && null !== getContainerPart(container);
1017
1017
  }
1018
1018
 
1019
1019
  // src/sync/regenerate-local-style-ids.ts
@@ -1755,6 +1755,8 @@ var playElementInteractions = (elementId, interactionId) => {
1755
1755
  getAnchoredAncestorId,
1756
1756
  getAnchoredDescendantId,
1757
1757
  getContainer,
1758
+ getContainerPart,
1759
+ getContainerWidgetMarker,
1758
1760
  getCurrentDocumentContainer,
1759
1761
  getCurrentDocumentId,
1760
1762
  getDefaultStyleTagFromPreviewElement,
@@ -1763,13 +1765,11 @@ var playElementInteractions = (elementId, interactionId) => {
1763
1765
  getElementIcon,
1764
1766
  getElementInteractions,
1765
1767
  getElementLabel,
1766
- getElementPart,
1767
1768
  getElementSetting,
1768
1769
  getElementSettings,
1769
1770
  getElementStyles,
1770
1771
  getElementTitle,
1771
1772
  getElementType,
1772
- getElementWidgetMarker,
1773
1773
  getElements,
1774
1774
  getHostDocumentElements,
1775
1775
  getHostDocumentId,
@@ -1777,8 +1777,8 @@ var playElementInteractions = (elementId, interactionId) => {
1777
1777
  getPreviewElementDOM,
1778
1778
  getSelectedElements,
1779
1779
  getWidgetsCache,
1780
+ isContainerSlot,
1780
1781
  isElementAnchored,
1781
- isElementSlot,
1782
1782
  moveElement,
1783
1783
  moveElements,
1784
1784
  parseDefaultStyleTagFromClassList,