@elementor/editor-elements 4.5.0-1182 → 4.5.0-1184

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
@@ -220,6 +220,7 @@ type V1ElementModelProps = {
220
220
  hydrateDefaultChildren?: boolean;
221
221
  widget?: V1ElementWidgetMarker;
222
222
  part?: string;
223
+ slot?: boolean;
223
224
  };
224
225
  type V1ElementWidgetMarker = {
225
226
  id: string;
@@ -348,6 +349,7 @@ type Options$4 = {
348
349
  useHistory?: boolean;
349
350
  at?: number;
350
351
  clone?: boolean;
352
+ origin?: string;
351
353
  };
352
354
  type CreateElementParams = {
353
355
  container: V1Element;
@@ -363,6 +365,7 @@ type CreateElementsParams = {
363
365
  elements: CreateElementParams[];
364
366
  title: string;
365
367
  subtitle?: string;
368
+ origin?: string;
366
369
  };
367
370
  type CreatedElement = {
368
371
  container: V1Element;
@@ -376,11 +379,12 @@ type CreatedElementsResult = {
376
379
  createdElements: CreatedElement[];
377
380
  };
378
381
 
379
- declare const createElements: ({ elements, title, subtitle, }: CreateElementsParams) => CreatedElementsResult;
382
+ declare const createElements: ({ elements, title, subtitle, origin, }: CreateElementsParams) => CreatedElementsResult;
380
383
 
381
384
  type Options$3 = {
382
385
  useHistory?: boolean;
383
386
  at?: number;
387
+ origin?: string;
384
388
  };
385
389
  type DeleteElementParams = {
386
390
  container: V1Element;
@@ -407,6 +411,7 @@ type Options$1 = {
407
411
  useHistory?: boolean;
408
412
  at?: number;
409
413
  clone?: boolean;
414
+ origin?: string;
410
415
  };
411
416
  type DuplicateElementParams = {
412
417
  element: V1Element;
@@ -420,6 +425,7 @@ type DuplicateElementsParams = {
420
425
  subtitle?: string;
421
426
  onDuplicateElements?: () => void;
422
427
  onRestoreElements?: () => void;
428
+ origin?: string;
423
429
  };
424
430
  type DuplicatedElement = {
425
431
  container: V1Element;
@@ -433,7 +439,7 @@ type DuplicatedElementsResult = {
433
439
  duplicatedElements: DuplicatedElement[];
434
440
  };
435
441
 
436
- declare const duplicateElements: ({ elementIds, title, subtitle, onDuplicateElements, onRestoreElements, }: DuplicateElementsParams) => DuplicatedElementsResult;
442
+ declare const duplicateElements: ({ elementIds, title, subtitle, onDuplicateElements, onRestoreElements, origin, }: DuplicateElementsParams) => DuplicatedElementsResult;
437
443
 
438
444
  type CloneableElement = Partial<V1ElementModelProps> | BackboneModel;
439
445
  declare function cloneElementTree(item: CloneableElement): V1ElementModelProps;
@@ -474,8 +480,14 @@ declare const getElementStyles: (elementID: ElementID) => Record<string, StyleDe
474
480
 
475
481
  declare function getElementType(type: string): ElementType | null;
476
482
 
483
+ declare const WIDGET_MARKER_KEYS: {
484
+ readonly widget: "widget";
485
+ readonly part: "part";
486
+ readonly slot: "slot";
487
+ };
477
488
  declare function getElementWidgetMarker(elementId: ElementID): Required<V1ElementWidgetMarker> | null;
478
489
  declare function getElementPart(elementId: ElementID): string | null;
490
+ declare function isElementSlot(elementId: ElementID): boolean;
479
491
 
480
492
  declare function regenerateLocalStyleIds(element: V1ElementData): {
481
493
  styles: Record<StyleDefinitionID, StyleDefinition> | undefined;
@@ -505,6 +517,7 @@ type Options = {
505
517
  useHistory?: boolean;
506
518
  at?: number;
507
519
  edit?: boolean;
520
+ origin?: string;
508
521
  };
509
522
  type MoveElementParams = {
510
523
  element: V1Element;
@@ -529,6 +542,7 @@ type MoveElementsParams = {
529
542
  subtitle?: string;
530
543
  onMoveElements?: () => void;
531
544
  onRestoreElements?: () => void;
545
+ origin?: string;
532
546
  };
533
547
  type MovedElement = {
534
548
  element: V1Element;
@@ -544,7 +558,7 @@ type MovedElementsResult = {
544
558
  movedElements: MovedElement[];
545
559
  };
546
560
 
547
- declare const moveElements: ({ moves: movesToMake, title, subtitle, onMoveElements, onRestoreElements, }: MoveElementsParams) => MovedElementsResult;
561
+ declare const moveElements: ({ moves: movesToMake, title, subtitle, onMoveElements, onRestoreElements, origin, }: MoveElementsParams) => MovedElementsResult;
548
562
 
549
563
  type RemoveElementsParams = {
550
564
  elementIds: string[];
@@ -552,6 +566,7 @@ type RemoveElementsParams = {
552
566
  subtitle?: string;
553
567
  onRemoveElements?: () => void;
554
568
  onRestoreElements?: () => void;
569
+ origin?: string;
555
570
  };
556
571
  type RemovedElement = {
557
572
  container: V1Element;
@@ -564,7 +579,7 @@ type RemovedElement = {
564
579
  type RemovedElementsResult = {
565
580
  removedElements: RemovedElement[];
566
581
  };
567
- declare const removeElements: ({ elementIds, title, subtitle, onRemoveElements, onRestoreElements, }: RemoveElementsParams) => RemovedElementsResult;
582
+ declare const removeElements: ({ elementIds, title, subtitle, onRemoveElements, onRestoreElements, origin, }: RemoveElementsParams) => RemovedElementsResult;
568
583
 
569
584
  type ReplaceElementArgs = {
570
585
  currentElementId: string;
@@ -644,4 +659,4 @@ declare const updateElementInteractions: ({ elementId, interactions, }: {
644
659
  }) => void;
645
660
  declare const playElementInteractions: (elementId: string, interactionId: string) => void;
646
661
 
647
- 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, 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, 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, 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 };
package/dist/index.d.ts CHANGED
@@ -220,6 +220,7 @@ type V1ElementModelProps = {
220
220
  hydrateDefaultChildren?: boolean;
221
221
  widget?: V1ElementWidgetMarker;
222
222
  part?: string;
223
+ slot?: boolean;
223
224
  };
224
225
  type V1ElementWidgetMarker = {
225
226
  id: string;
@@ -348,6 +349,7 @@ type Options$4 = {
348
349
  useHistory?: boolean;
349
350
  at?: number;
350
351
  clone?: boolean;
352
+ origin?: string;
351
353
  };
352
354
  type CreateElementParams = {
353
355
  container: V1Element;
@@ -363,6 +365,7 @@ type CreateElementsParams = {
363
365
  elements: CreateElementParams[];
364
366
  title: string;
365
367
  subtitle?: string;
368
+ origin?: string;
366
369
  };
367
370
  type CreatedElement = {
368
371
  container: V1Element;
@@ -376,11 +379,12 @@ type CreatedElementsResult = {
376
379
  createdElements: CreatedElement[];
377
380
  };
378
381
 
379
- declare const createElements: ({ elements, title, subtitle, }: CreateElementsParams) => CreatedElementsResult;
382
+ declare const createElements: ({ elements, title, subtitle, origin, }: CreateElementsParams) => CreatedElementsResult;
380
383
 
381
384
  type Options$3 = {
382
385
  useHistory?: boolean;
383
386
  at?: number;
387
+ origin?: string;
384
388
  };
385
389
  type DeleteElementParams = {
386
390
  container: V1Element;
@@ -407,6 +411,7 @@ type Options$1 = {
407
411
  useHistory?: boolean;
408
412
  at?: number;
409
413
  clone?: boolean;
414
+ origin?: string;
410
415
  };
411
416
  type DuplicateElementParams = {
412
417
  element: V1Element;
@@ -420,6 +425,7 @@ type DuplicateElementsParams = {
420
425
  subtitle?: string;
421
426
  onDuplicateElements?: () => void;
422
427
  onRestoreElements?: () => void;
428
+ origin?: string;
423
429
  };
424
430
  type DuplicatedElement = {
425
431
  container: V1Element;
@@ -433,7 +439,7 @@ type DuplicatedElementsResult = {
433
439
  duplicatedElements: DuplicatedElement[];
434
440
  };
435
441
 
436
- declare const duplicateElements: ({ elementIds, title, subtitle, onDuplicateElements, onRestoreElements, }: DuplicateElementsParams) => DuplicatedElementsResult;
442
+ declare const duplicateElements: ({ elementIds, title, subtitle, onDuplicateElements, onRestoreElements, origin, }: DuplicateElementsParams) => DuplicatedElementsResult;
437
443
 
438
444
  type CloneableElement = Partial<V1ElementModelProps> | BackboneModel;
439
445
  declare function cloneElementTree(item: CloneableElement): V1ElementModelProps;
@@ -474,8 +480,14 @@ declare const getElementStyles: (elementID: ElementID) => Record<string, StyleDe
474
480
 
475
481
  declare function getElementType(type: string): ElementType | null;
476
482
 
483
+ declare const WIDGET_MARKER_KEYS: {
484
+ readonly widget: "widget";
485
+ readonly part: "part";
486
+ readonly slot: "slot";
487
+ };
477
488
  declare function getElementWidgetMarker(elementId: ElementID): Required<V1ElementWidgetMarker> | null;
478
489
  declare function getElementPart(elementId: ElementID): string | null;
490
+ declare function isElementSlot(elementId: ElementID): boolean;
479
491
 
480
492
  declare function regenerateLocalStyleIds(element: V1ElementData): {
481
493
  styles: Record<StyleDefinitionID, StyleDefinition> | undefined;
@@ -505,6 +517,7 @@ type Options = {
505
517
  useHistory?: boolean;
506
518
  at?: number;
507
519
  edit?: boolean;
520
+ origin?: string;
508
521
  };
509
522
  type MoveElementParams = {
510
523
  element: V1Element;
@@ -529,6 +542,7 @@ type MoveElementsParams = {
529
542
  subtitle?: string;
530
543
  onMoveElements?: () => void;
531
544
  onRestoreElements?: () => void;
545
+ origin?: string;
532
546
  };
533
547
  type MovedElement = {
534
548
  element: V1Element;
@@ -544,7 +558,7 @@ type MovedElementsResult = {
544
558
  movedElements: MovedElement[];
545
559
  };
546
560
 
547
- declare const moveElements: ({ moves: movesToMake, title, subtitle, onMoveElements, onRestoreElements, }: MoveElementsParams) => MovedElementsResult;
561
+ declare const moveElements: ({ moves: movesToMake, title, subtitle, onMoveElements, onRestoreElements, origin, }: MoveElementsParams) => MovedElementsResult;
548
562
 
549
563
  type RemoveElementsParams = {
550
564
  elementIds: string[];
@@ -552,6 +566,7 @@ type RemoveElementsParams = {
552
566
  subtitle?: string;
553
567
  onRemoveElements?: () => void;
554
568
  onRestoreElements?: () => void;
569
+ origin?: string;
555
570
  };
556
571
  type RemovedElement = {
557
572
  container: V1Element;
@@ -564,7 +579,7 @@ type RemovedElement = {
564
579
  type RemovedElementsResult = {
565
580
  removedElements: RemovedElement[];
566
581
  };
567
- declare const removeElements: ({ elementIds, title, subtitle, onRemoveElements, onRestoreElements, }: RemoveElementsParams) => RemovedElementsResult;
582
+ declare const removeElements: ({ elementIds, title, subtitle, onRemoveElements, onRestoreElements, origin, }: RemoveElementsParams) => RemovedElementsResult;
568
583
 
569
584
  type ReplaceElementArgs = {
570
585
  currentElementId: string;
@@ -644,4 +659,4 @@ declare const updateElementInteractions: ({ elementId, interactions, }: {
644
659
  }) => void;
645
660
  declare const playElementInteractions: (elementId: string, interactionId: string) => void;
646
661
 
647
- 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, 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, 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, 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 };
package/dist/index.js CHANGED
@@ -22,6 +22,7 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  DEFAULT_STYLE_CLASS_PREFIX: () => DEFAULT_STYLE_CLASS_PREFIX,
24
24
  ELEMENT_STYLE_CHANGE_EVENT: () => ELEMENT_STYLE_CHANGE_EVENT,
25
+ WIDGET_MARKER_KEYS: () => WIDGET_MARKER_KEYS,
25
26
  addModelToParent: () => addModelToParent,
26
27
  bindSettingsReconcile: () => bindSettingsReconcile,
27
28
  cloneElementTree: () => cloneElementTree,
@@ -65,6 +66,7 @@ __export(index_exports, {
65
66
  getSelectedElements: () => getSelectedElements,
66
67
  getWidgetsCache: () => getWidgetsCache,
67
68
  isElementAnchored: () => isElementAnchored,
69
+ isElementSlot: () => isElementSlot,
68
70
  moveElement: () => moveElement,
69
71
  moveElements: () => moveElements,
70
72
  parseDefaultStyleTagFromClassList: () => parseDefaultStyleTagFromClassList,
@@ -623,7 +625,8 @@ function deleteElement({ container, options = {} }) {
623
625
  var createElements = ({
624
626
  elements,
625
627
  title,
626
- subtitle = (0, import_i18n.__)("Item added", "elementor")
628
+ subtitle = (0, import_i18n.__)("Item added", "elementor"),
629
+ origin
627
630
  }) => {
628
631
  const undoableCreate = (0, import_editor_v1_adapters9.undoable)(
629
632
  {
@@ -637,7 +640,7 @@ var createElements = ({
637
640
  const element = createElement({
638
641
  container: parentContainer,
639
642
  ...elementParams,
640
- options: { ...options, useHistory: false }
643
+ options: { ...options, useHistory: false, origin }
641
644
  });
642
645
  createdElements.push({
643
646
  container: element,
@@ -656,7 +659,7 @@ var createElements = ({
656
659
  if (freshContainer) {
657
660
  deleteElement({
658
661
  container: freshContainer,
659
- options: { useHistory: false }
662
+ options: { useHistory: false, origin }
660
663
  });
661
664
  return;
662
665
  }
@@ -671,7 +674,7 @@ var createElements = ({
671
674
  const element = createElement({
672
675
  container: freshParent,
673
676
  model,
674
- options: { ...options, useHistory: false }
677
+ options: { ...options, useHistory: false, origin }
675
678
  });
676
679
  newElements.push({
677
680
  container: element,
@@ -737,7 +740,8 @@ var duplicateElements = ({
737
740
  title,
738
741
  subtitle = (0, import_i18n2.__)("Item duplicated", "elementor"),
739
742
  onDuplicateElements,
740
- onRestoreElements
743
+ onRestoreElements,
744
+ origin
741
745
  }) => {
742
746
  const undoableDuplicate = (0, import_editor_v1_adapters12.undoable)(
743
747
  {
@@ -751,7 +755,7 @@ var duplicateElements = ({
751
755
  }
752
756
  const duplicatedElement = duplicateElement({
753
757
  element: originalContainer,
754
- options: { useHistory: false }
758
+ options: { useHistory: false, origin }
755
759
  });
756
760
  if (!duplicatedElement.parent) {
757
761
  return;
@@ -774,7 +778,7 @@ var duplicateElements = ({
774
778
  if (freshContainer) {
775
779
  deleteElement({
776
780
  container: freshContainer,
777
- options: { useHistory: false }
781
+ options: { useHistory: false, origin }
778
782
  });
779
783
  return;
780
784
  }
@@ -790,7 +794,7 @@ var duplicateElements = ({
790
794
  const createdElement = createElement({
791
795
  container: freshParent,
792
796
  model,
793
- options: { useHistory: false, clone: false, at }
797
+ options: { useHistory: false, clone: false, at, origin }
794
798
  });
795
799
  duplicatedElements.push({
796
800
  container: createdElement,
@@ -986,6 +990,11 @@ var import_schema = require("@elementor/schema");
986
990
  var WIDGET_ID_PATTERN = /^[a-z0-9-]+\/[a-z0-9-]+$/;
987
991
  var PART_PATTERN = /^[a-z][a-z0-9_]*$/;
988
992
  var MIN_VERSION = 1;
993
+ var WIDGET_MARKER_KEYS = {
994
+ widget: "widget",
995
+ part: "part",
996
+ slot: "slot"
997
+ };
989
998
  var widgetMarkerSchema = import_schema.z.object({
990
999
  id: import_schema.z.string().regex(WIDGET_ID_PATTERN),
991
1000
  version: import_schema.z.number().int().min(MIN_VERSION),
@@ -993,16 +1002,19 @@ var widgetMarkerSchema = import_schema.z.object({
993
1002
  });
994
1003
  var partSchema = import_schema.z.string().regex(PART_PATTERN);
995
1004
  function getElementWidgetMarker(elementId) {
996
- const result = widgetMarkerSchema.safeParse(getContainer(elementId)?.model.get("widget"));
1005
+ const result = widgetMarkerSchema.safeParse(getContainer(elementId)?.model.get(WIDGET_MARKER_KEYS.widget));
997
1006
  if (!result.success) {
998
1007
  return null;
999
1008
  }
1000
1009
  return { ...result.data, values: result.data.values ?? {} };
1001
1010
  }
1002
1011
  function getElementPart(elementId) {
1003
- const result = partSchema.safeParse(getContainer(elementId)?.model.get("part"));
1012
+ const result = partSchema.safeParse(getContainer(elementId)?.model.get(WIDGET_MARKER_KEYS.part));
1004
1013
  return result.success ? result.data : null;
1005
1014
  }
1015
+ function isElementSlot(elementId) {
1016
+ return true === getContainer(elementId)?.model.get(WIDGET_MARKER_KEYS.slot) && null !== getElementPart(elementId);
1017
+ }
1006
1018
 
1007
1019
  // src/sync/regenerate-local-style-ids.ts
1008
1020
  var import_editor_props2 = require("@elementor/editor-props");
@@ -1116,7 +1128,8 @@ var moveElements = ({
1116
1128
  title,
1117
1129
  subtitle = (0, import_i18n3.__)("Elements moved", "elementor"),
1118
1130
  onMoveElements,
1119
- onRestoreElements
1131
+ onRestoreElements,
1132
+ origin
1120
1133
  }) => {
1121
1134
  const undoableMove = (0, import_editor_v1_adapters13.undoable)(
1122
1135
  {
@@ -1140,7 +1153,7 @@ var moveElements = ({
1140
1153
  const newElement = moveElement({
1141
1154
  element: sourceElement,
1142
1155
  targetContainer: target,
1143
- options: { ...options, useHistory: false }
1156
+ options: { ...options, useHistory: false, origin }
1144
1157
  });
1145
1158
  movedElements.push({
1146
1159
  element: newElement,
@@ -1168,7 +1181,8 @@ var moveElements = ({
1168
1181
  targetContainer: freshOriginalContainer,
1169
1182
  options: {
1170
1183
  useHistory: false,
1171
- at: originalIndex >= 0 ? originalIndex : void 0
1184
+ at: originalIndex >= 0 ? originalIndex : void 0,
1185
+ origin
1172
1186
  }
1173
1187
  });
1174
1188
  });
@@ -1196,7 +1210,7 @@ var moveElements = ({
1196
1210
  const newElement = moveElement({
1197
1211
  element: freshElement,
1198
1212
  targetContainer: freshTarget,
1199
- options: { ...options, useHistory: false }
1213
+ options: { ...options, useHistory: false, origin }
1200
1214
  });
1201
1215
  newMovedElements.push({
1202
1216
  element: newElement,
@@ -1229,7 +1243,8 @@ var removeElements = ({
1229
1243
  title,
1230
1244
  subtitle = (0, import_i18n4.__)("Item removed", "elementor"),
1231
1245
  onRemoveElements,
1232
- onRestoreElements
1246
+ onRestoreElements,
1247
+ origin
1233
1248
  }) => {
1234
1249
  const undoableRemove = (0, import_editor_v1_adapters14.undoable)(
1235
1250
  {
@@ -1252,7 +1267,7 @@ var removeElements = ({
1252
1267
  removedElements.forEach(({ container }) => {
1253
1268
  deleteElement({
1254
1269
  container,
1255
- options: { useHistory: false }
1270
+ options: { useHistory: false, origin }
1256
1271
  });
1257
1272
  });
1258
1273
  return { removedElements };
@@ -1265,7 +1280,7 @@ var removeElements = ({
1265
1280
  createElement({
1266
1281
  container: freshParent,
1267
1282
  model,
1268
- options: { useHistory: false, at }
1283
+ options: { useHistory: false, at, origin }
1269
1284
  });
1270
1285
  return;
1271
1286
  }
@@ -1281,7 +1296,7 @@ var removeElements = ({
1281
1296
  if (freshContainer && freshParent) {
1282
1297
  deleteElement({
1283
1298
  container: freshContainer,
1284
- options: { useHistory: false }
1299
+ options: { useHistory: false, origin }
1285
1300
  });
1286
1301
  newRemovedElements.push({
1287
1302
  container: freshContainer,
@@ -1719,6 +1734,7 @@ var playElementInteractions = (elementId, interactionId) => {
1719
1734
  0 && (module.exports = {
1720
1735
  DEFAULT_STYLE_CLASS_PREFIX,
1721
1736
  ELEMENT_STYLE_CHANGE_EVENT,
1737
+ WIDGET_MARKER_KEYS,
1722
1738
  addModelToParent,
1723
1739
  bindSettingsReconcile,
1724
1740
  cloneElementTree,
@@ -1762,6 +1778,7 @@ var playElementInteractions = (elementId, interactionId) => {
1762
1778
  getSelectedElements,
1763
1779
  getWidgetsCache,
1764
1780
  isElementAnchored,
1781
+ isElementSlot,
1765
1782
  moveElement,
1766
1783
  moveElements,
1767
1784
  parseDefaultStyleTagFromClassList,