@elementor/editor-global-classes 0.14.0 → 0.15.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # @elementor/editor-global-classes
2
2
 
3
+ ## 0.15.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [02fd724]
8
+ - Updated dependencies [9b5e475]
9
+ - Updated dependencies [94aa98c]
10
+ - Updated dependencies [13cc0d0]
11
+ - Updated dependencies [c6937f8]
12
+ - Updated dependencies [f644084]
13
+ - @elementor/editor-styles-repository@0.8.3
14
+ - @elementor/editor-editing-panel@1.27.0
15
+ - @elementor/editor-ui@0.7.0
16
+ - @elementor/editor-styles@0.6.5
17
+
18
+ ## 0.15.2
19
+
20
+ ### Patch Changes
21
+
22
+ - 5a3e47f: Fix global classes header text.
23
+ - Updated dependencies [8b40d87]
24
+ - @elementor/editor-editing-panel@1.26.1
25
+
26
+ ## 0.15.1
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [b31a032]
31
+ - @elementor/editor-editing-panel@1.26.0
32
+
33
+ ## 0.15.0
34
+
35
+ ### Minor Changes
36
+
37
+ - fdfc87a: Classes and selector UI updates.
38
+ - b30b8c4: Reload documents when deleting a global class.
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [fdfc87a]
43
+ - Updated dependencies [33bc54d]
44
+ - Updated dependencies [b30b8c4]
45
+ - Updated dependencies [548209b]
46
+ - @elementor/editor-editing-panel@1.25.0
47
+ - @elementor/editor-ui@0.6.0
48
+ - @elementor/editor-documents@0.13.0
49
+ - @elementor/editor-styles-repository@0.8.2
50
+
51
+ ## 0.14.1
52
+
53
+ ### Patch Changes
54
+
55
+ - 666ffdd: Change theme provider styles for editing panel and class manager panel
56
+ - Updated dependencies [c262b65]
57
+ - Updated dependencies [951d633]
58
+ - Updated dependencies [666ffdd]
59
+ - Updated dependencies [311ff8e]
60
+ - Updated dependencies [67f2795]
61
+ - Updated dependencies [7aaf98f]
62
+ - @elementor/editor-editing-panel@1.24.0
63
+ - @elementor/editor-ui@0.5.1
64
+ - @elementor/editor@0.18.5
65
+ - @elementor/editor-panels@0.14.0
66
+ - @elementor/editor-documents@0.12.2
67
+
3
68
  ## 0.14.0
4
69
 
5
70
  ### Minor Changes
package/dist/index.js CHANGED
@@ -27,21 +27,22 @@ var import_editor = require("@elementor/editor");
27
27
  var import_editor_editing_panel = require("@elementor/editor-editing-panel");
28
28
  var import_editor_panels2 = require("@elementor/editor-panels");
29
29
  var import_editor_styles_repository2 = require("@elementor/editor-styles-repository");
30
- var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
30
+ var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
31
31
  var import_store16 = require("@elementor/store");
32
32
 
33
33
  // src/components/class-manager/class-manager-button.tsx
34
34
  var React8 = __toESM(require("react"));
35
- var import_editor_documents2 = require("@elementor/editor-documents");
35
+ var import_editor_documents3 = require("@elementor/editor-documents");
36
36
  var import_ui7 = require("@elementor/ui");
37
37
  var import_i18n6 = require("@wordpress/i18n");
38
38
 
39
39
  // src/components/class-manager/class-manager-panel.tsx
40
40
  var React7 = __toESM(require("react"));
41
41
  var import_react4 = require("react");
42
- var import_editor_documents = require("@elementor/editor-documents");
42
+ var import_editor_documents2 = require("@elementor/editor-documents");
43
43
  var import_editor_panels = require("@elementor/editor-panels");
44
- var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
44
+ var import_editor_ui3 = require("@elementor/editor-ui");
45
+ var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
45
46
  var import_icons6 = require("@elementor/icons");
46
47
  var import_query = require("@elementor/query");
47
48
  var import_ui6 = require("@elementor/ui");
@@ -194,8 +195,12 @@ var ClassManagerIntroduction = () => {
194
195
  import_editor_ui.IntroductionModal,
195
196
  {
196
197
  open: shouldShowIntroduction,
197
- title: (0, import_i18n.__)("CSS Class manager", "elementor"),
198
+ title: (0, import_i18n.__)("Class Manager", "elementor"),
198
199
  content: /* @__PURE__ */ React.createElement(IntroductionContent, null),
200
+ image: {
201
+ src: "https://assets.elementor.com/packages/v1/images/class-manager-intro.svg",
202
+ alt: ""
203
+ },
199
204
  handleClose: (shouldShowAgain) => {
200
205
  if (!shouldShowAgain) {
201
206
  suppressMessage();
@@ -206,34 +211,18 @@ var ClassManagerIntroduction = () => {
206
211
  );
207
212
  };
208
213
  var IntroductionContent = () => {
209
- return /* @__PURE__ */ React.createElement(import_ui.Stack, { gap: 1.5, padding: 3 }, /* @__PURE__ */ React.createElement(
210
- import_ui.Image,
211
- {
212
- sx: { width: "100%", height: "312px" },
213
- src: "https://assets.elementor.com/packages/v1/images/class-manager-intro.svg",
214
- alt: ""
215
- }
216
- ), /* @__PURE__ */ React.createElement(import_ui.Box, null, /* @__PURE__ */ React.createElement(import_ui.Typography, { variant: "body2" }, (0, import_i18n.__)(
217
- "The CSS Class Manager allows you to manage and organize your site's CSS classes efficiently. You can reorder classes to adjust their priority, rename them to maintain clarity in your design system, and delete unused classes to keep your CSS structured.",
214
+ return /* @__PURE__ */ React.createElement(import_ui.Box, { p: 3 }, /* @__PURE__ */ React.createElement(import_ui.Typography, { variant: "body2" }, (0, import_i18n.__)(
215
+ "The Class Manager lets you see all the classes you've created, plus adjust their priority, rename them, and delete unused classes to keep your CSS structured.",
218
216
  "elementor"
219
217
  )), /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement(import_ui.Typography, { variant: "body2" }, (0, import_i18n.__)(
220
- "Changes apply globally\u2014any modifications will affect all elements using the class, impacting the class order and priority across your site.",
218
+ "Remember, when editing an item within a specific class, any changes you make will apply across all elements in that class.",
221
219
  "elementor"
222
- ))));
220
+ )));
223
221
  };
224
222
 
225
- // src/components/class-manager/flipped-color-swatch-icon.tsx
226
- var React2 = __toESM(require("react"));
227
- var import_icons = require("@elementor/icons");
228
- var FlippedColorSwatchIcon = ({ sx, ...props }) => /* @__PURE__ */ React2.createElement(import_icons.ColorSwatchIcon, { sx: { transform: "rotate(90deg)", ...sx }, ...props });
229
-
230
- // src/components/class-manager/global-classes-list.tsx
231
- var React5 = __toESM(require("react"));
232
- var import_editor_styles_repository = require("@elementor/editor-styles-repository");
233
- var import_editor_ui2 = require("@elementor/editor-ui");
234
- var import_icons4 = require("@elementor/icons");
235
- var import_ui4 = require("@elementor/ui");
236
- var import_i18n4 = require("@wordpress/i18n");
223
+ // src/components/class-manager/delete-class.ts
224
+ var import_editor_documents = require("@elementor/editor-documents");
225
+ var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
237
226
 
238
227
  // src/global-classes-styles-provider.ts
239
228
  var import_editor_styles2 = require("@elementor/editor-styles");
@@ -290,11 +279,46 @@ var globalClassesStylesProvider = {
290
279
  },
291
280
  subscribe: (cb) => (0, import_store6.__subscribeWithSelector)((state) => state.globalClasses, cb),
292
281
  labels: {
293
- singular: (0, import_i18n2.__)("Global class", "elementor"),
294
- plural: (0, import_i18n2.__)("Global CSS classes", "elementor")
282
+ singular: (0, import_i18n2.__)("class", "elementor"),
283
+ plural: (0, import_i18n2.__)("classes", "elementor")
295
284
  }
296
285
  };
297
286
 
287
+ // src/components/class-manager/delete-class.ts
288
+ var isDeleted = false;
289
+ var deleteClass = (id2) => {
290
+ globalClassesStylesProvider.actions.delete(id2);
291
+ isDeleted = true;
292
+ };
293
+ var onDelete = async () => {
294
+ await reloadDocument();
295
+ isDeleted = false;
296
+ };
297
+ var hasDeletedItems = () => isDeleted;
298
+ var reloadDocument = () => {
299
+ const currentDocument = (0, import_editor_documents.getCurrentDocument)();
300
+ const documentsManager = (0, import_editor_documents.getV1DocumentsManager)();
301
+ documentsManager.invalidateCache();
302
+ return (0, import_editor_v1_adapters.__privateRunCommand)("editor/documents/switch", {
303
+ id: currentDocument?.id,
304
+ shouldScroll: false,
305
+ shouldNavigateToDefaultRoute: false
306
+ });
307
+ };
308
+
309
+ // src/components/class-manager/flipped-color-swatch-icon.tsx
310
+ var React2 = __toESM(require("react"));
311
+ var import_icons = require("@elementor/icons");
312
+ var FlippedColorSwatchIcon = ({ sx, ...props }) => /* @__PURE__ */ React2.createElement(import_icons.ColorSwatchIcon, { sx: { transform: "rotate(90deg)", ...sx }, ...props });
313
+
314
+ // src/components/class-manager/global-classes-list.tsx
315
+ var React5 = __toESM(require("react"));
316
+ var import_editor_styles_repository = require("@elementor/editor-styles-repository");
317
+ var import_editor_ui2 = require("@elementor/editor-ui");
318
+ var import_icons4 = require("@elementor/icons");
319
+ var import_ui4 = require("@elementor/ui");
320
+ var import_i18n4 = require("@wordpress/i18n");
321
+
298
322
  // src/hooks/use-classes-order.ts
299
323
  var import_store8 = require("@elementor/store");
300
324
  var useClassesOrder = () => {
@@ -328,13 +352,13 @@ var TITLE_ID = "delete-class-dialog";
328
352
  var DeleteConfirmationDialog = ({ label, id: id2 }) => {
329
353
  const { closeDialog } = useDeleteConfirmation();
330
354
  const onConfirm = () => {
331
- globalClassesStylesProvider.actions.delete(id2);
355
+ deleteClass(id2);
332
356
  closeDialog();
333
357
  };
334
- return /* @__PURE__ */ React3.createElement(import_ui2.Dialog, { open: true, onClose: closeDialog, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React3.createElement(import_ui2.DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React3.createElement(import_icons2.AlertOctagonFilledIcon, { color: "error" }), (0, import_i18n3.__)("Delete global class", "elementor")), /* @__PURE__ */ React3.createElement(import_ui2.DialogContent, null, /* @__PURE__ */ React3.createElement(import_ui2.DialogContentText, { variant: "body2", color: "textPrimary" }, (0, import_i18n3.__)("Deleting", "elementor"), /* @__PURE__ */ React3.createElement(import_ui2.Typography, { variant: "subtitle2", component: "span" }, "\xA0", label, "\xA0"), (0, import_i18n3.__)(
358
+ return /* @__PURE__ */ React3.createElement(import_ui2.Dialog, { open: true, onClose: closeDialog, "aria-labelledby": TITLE_ID, maxWidth: "xs" }, /* @__PURE__ */ React3.createElement(import_ui2.DialogTitle, { id: TITLE_ID, display: "flex", alignItems: "center", gap: 1, sx: { lineHeight: 1 } }, /* @__PURE__ */ React3.createElement(import_icons2.AlertOctagonFilledIcon, { color: "error" }), (0, import_i18n3.__)("Delete this class?", "elementor")), /* @__PURE__ */ React3.createElement(import_ui2.DialogContent, null, /* @__PURE__ */ React3.createElement(import_ui2.DialogContentText, { variant: "body2", color: "textPrimary" }, (0, import_i18n3.__)("Deleting", "elementor"), /* @__PURE__ */ React3.createElement(import_ui2.Typography, { variant: "subtitle2", component: "span" }, "\xA0", label, "\xA0"), (0, import_i18n3.__)(
335
359
  "will permanently remove it from your project and may affect the design across all elements using it. This action cannot be undone.",
336
360
  "elementor"
337
- ))), /* @__PURE__ */ React3.createElement(import_ui2.DialogActions, null, /* @__PURE__ */ React3.createElement(import_ui2.Button, { color: "secondary", onClick: closeDialog }, (0, import_i18n3.__)("Cancel", "elementor")), /* @__PURE__ */ React3.createElement(import_ui2.Button, { variant: "contained", color: "error", onClick: onConfirm }, (0, import_i18n3.__)("Delete", "elementor"))));
361
+ ))), /* @__PURE__ */ React3.createElement(import_ui2.DialogActions, null, /* @__PURE__ */ React3.createElement(import_ui2.Button, { color: "secondary", onClick: closeDialog }, (0, import_i18n3.__)("Not now", "elementor")), /* @__PURE__ */ React3.createElement(import_ui2.Button, { variant: "contained", color: "error", onClick: onConfirm }, (0, import_i18n3.__)("Delete", "elementor"))));
338
362
  };
339
363
  var useDeleteConfirmation = () => {
340
364
  const contextValue = (0, import_react2.useContext)(context);
@@ -508,7 +532,7 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
508
532
  openEditMode();
509
533
  }
510
534
  },
511
- /* @__PURE__ */ React5.createElement(import_ui4.ListItemText, { primary: (0, import_i18n4.__)("Rename", "elementor") })
535
+ /* @__PURE__ */ React5.createElement(import_ui4.Typography, { variant: "caption", sx: { color: "text.primary" } }, (0, import_i18n4.__)("Rename", "elementor"))
512
536
  ),
513
537
  /* @__PURE__ */ React5.createElement(
514
538
  import_editor_ui2.MenuListItem,
@@ -518,7 +542,7 @@ var ClassItem = ({ id: id2, label, renameClass, selected, disabled, sortableTrig
518
542
  openDialog({ id: id2, label });
519
543
  }
520
544
  },
521
- /* @__PURE__ */ React5.createElement(import_ui4.ListItemText, { primary: (0, import_i18n4.__)("Delete", "elementor"), sx: { color: "error.light" } })
545
+ /* @__PURE__ */ React5.createElement(import_ui4.Typography, { variant: "caption", sx: { color: "error.light" } }, (0, import_i18n4.__)("Delete", "elementor"))
522
546
  )
523
547
  ));
524
548
  };
@@ -579,10 +603,10 @@ var getIndicatorBorder = ({ isActive, isError, theme }) => {
579
603
  };
580
604
  var validateLabel = (newLabel) => {
581
605
  if (!import_editor_styles_repository.stylesRepository.isLabelValid(newLabel)) {
582
- return (0, import_i18n4.__)("Format is not valid", "elementor");
606
+ return (0, import_i18n4.__)("Invalid format", "elementor");
583
607
  }
584
608
  if (import_editor_styles_repository.stylesRepository.isLabelExist(newLabel)) {
585
- return (0, import_i18n4.__)("Existing name", "elementor");
609
+ return (0, import_i18n4.__)("Name exists", "elementor");
586
610
  }
587
611
  return null;
588
612
  };
@@ -625,14 +649,10 @@ var { panel, usePanelActions } = (0, import_editor_panels.__createPanel)({
625
649
  component: ClassManagerPanel,
626
650
  allowedEditModes: ["edit", id],
627
651
  onOpen: () => {
628
- (0, import_editor_v1_adapters.changeEditMode)(id);
629
- return (0, import_editor_documents.getDocumentModifiedStatus)();
652
+ (0, import_editor_v1_adapters2.changeEditMode)(id);
630
653
  },
631
- onClose: (documentModifiedState) => {
632
- (0, import_editor_v1_adapters.changeEditMode)("edit");
633
- if ((0, import_editor_documents.getDocumentModifiedStatus)() !== documentModifiedState) {
634
- (0, import_editor_documents.setDocumentModifiedStatus)(documentModifiedState);
635
- }
654
+ onClose: () => {
655
+ (0, import_editor_v1_adapters2.changeEditMode)("edit");
636
656
  }
637
657
  });
638
658
  function ClassManagerPanel() {
@@ -641,10 +661,11 @@ function ClassManagerPanel() {
641
661
  const { open: openSaveChangesDialog, close: closeSaveChangesDialog, isOpen: isSaveChangesDialogOpen } = useDialog();
642
662
  const { mutateAsync: publish, isPending: isPublishing } = usePublish();
643
663
  usePreventUnload();
644
- return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(import_ui6.ErrorBoundary, { fallback: /* @__PURE__ */ React7.createElement(ErrorBoundaryFallback, null) }, /* @__PURE__ */ React7.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React7.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React7.createElement(import_ui6.Stack, { p: 1, pl: 2, width: "100%", direction: "row", alignItems: "center" }, /* @__PURE__ */ React7.createElement(import_editor_panels.PanelHeaderTitle, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React7.createElement(FlippedColorSwatchIcon, { fontSize: "inherit" }), (0, import_i18n5.__)("CSS Class manager", "elementor")), /* @__PURE__ */ React7.createElement(
664
+ return /* @__PURE__ */ React7.createElement(import_editor_ui3.ThemeProvider, null, /* @__PURE__ */ React7.createElement(import_ui6.ErrorBoundary, { fallback: /* @__PURE__ */ React7.createElement(ErrorBoundaryFallback, null) }, /* @__PURE__ */ React7.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React7.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React7.createElement(import_ui6.Stack, { p: 1, pl: 2, width: "100%", direction: "row", alignItems: "center" }, /* @__PURE__ */ React7.createElement(import_editor_panels.PanelHeaderTitle, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React7.createElement(FlippedColorSwatchIcon, { fontSize: "inherit" }), (0, import_i18n5.__)("Class Manager", "elementor")), /* @__PURE__ */ React7.createElement(
645
665
  CloseButton,
646
666
  {
647
667
  sx: { marginLeft: "auto" },
668
+ disabled: isPublishing,
648
669
  onClose: () => {
649
670
  if (isDirty2) {
650
671
  openSaveChangesDialog();
@@ -702,13 +723,12 @@ var usePreventUnload = () => {
702
723
  }, [isDirty2]);
703
724
  };
704
725
  var usePublish = () => {
705
- const document = (0, import_editor_documents.__useActiveDocument)();
706
- const [initialDocumentStatus] = (0, import_react4.useState)(document?.isDirty ?? false);
707
726
  return (0, import_query.useMutation)({
708
727
  mutationFn: () => saveGlobalClasses({ context: "frontend" }),
709
- onSuccess: () => {
710
- if (initialDocumentStatus !== document?.isDirty) {
711
- (0, import_editor_documents.setDocumentModifiedStatus)(initialDocumentStatus);
728
+ onSuccess: async () => {
729
+ (0, import_editor_documents2.setDocumentModifiedStatus)(false);
730
+ if (hasDeletedItems()) {
731
+ await onDelete();
712
732
  }
713
733
  }
714
734
  });
@@ -716,9 +736,9 @@ var usePublish = () => {
716
736
 
717
737
  // src/components/class-manager/class-manager-button.tsx
718
738
  var ClassManagerButton = () => {
719
- const document = (0, import_editor_documents2.__useActiveDocument)();
739
+ const document = (0, import_editor_documents3.__useActiveDocument)();
720
740
  const { open: openPanel } = usePanelActions();
721
- const { save: saveDocument } = (0, import_editor_documents2.__useActiveDocumentActions)();
741
+ const { save: saveDocument } = (0, import_editor_documents3.__useActiveDocumentActions)();
722
742
  const { open: openSaveChangesDialog, close: closeSaveChangesDialog, isOpen: isSaveChangesDialogOpen } = useDialog();
723
743
  const handleOpenPanel = () => {
724
744
  if (document?.isDirty) {
@@ -727,15 +747,15 @@ var ClassManagerButton = () => {
727
747
  }
728
748
  openPanel();
729
749
  };
730
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui7.Tooltip, { title: (0, import_i18n6.__)("Class manager", "elementor"), placement: "top" }, /* @__PURE__ */ React8.createElement(import_ui7.IconButton, { onClick: handleOpenPanel }, /* @__PURE__ */ React8.createElement(FlippedColorSwatchIcon, { fontSize: "tiny" }))), isSaveChangesDialogOpen && /* @__PURE__ */ React8.createElement(SaveChangesDialog, null, /* @__PURE__ */ React8.createElement(SaveChangesDialog.Title, null, (0, import_i18n6.__)("You have unsaved changes", "elementor")), /* @__PURE__ */ React8.createElement(SaveChangesDialog.Content, null, /* @__PURE__ */ React8.createElement(SaveChangesDialog.ContentText, { sx: { mb: 2 } }, (0, import_i18n6.__)(
731
- "Save your changes before moving to the class manager to ensure all updates are applied and saved.",
750
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui7.Tooltip, { title: (0, import_i18n6.__)("Class Manager", "elementor"), placement: "top" }, /* @__PURE__ */ React8.createElement(import_ui7.IconButton, { onClick: handleOpenPanel }, /* @__PURE__ */ React8.createElement(FlippedColorSwatchIcon, { fontSize: "tiny" }))), isSaveChangesDialogOpen && /* @__PURE__ */ React8.createElement(SaveChangesDialog, null, /* @__PURE__ */ React8.createElement(SaveChangesDialog.Title, null, (0, import_i18n6.__)("You have unsaved changes", "elementor")), /* @__PURE__ */ React8.createElement(SaveChangesDialog.Content, null, /* @__PURE__ */ React8.createElement(SaveChangesDialog.ContentText, { sx: { mb: 2 } }, (0, import_i18n6.__)(
751
+ "To open the Class Manager, save your page first. You can't continue without saving.",
732
752
  "elementor"
733
- )), /* @__PURE__ */ React8.createElement(SaveChangesDialog.ContentText, null, (0, import_i18n6.__)("If you leave without saving, all changes will be discarded.", "elementor"))), /* @__PURE__ */ React8.createElement(
753
+ ))), /* @__PURE__ */ React8.createElement(
734
754
  SaveChangesDialog.Actions,
735
755
  {
736
756
  actions: {
737
757
  cancel: {
738
- label: (0, import_i18n6.__)("Keep editing", "elementor"),
758
+ label: (0, import_i18n6.__)("Stay here", "elementor"),
739
759
  action: closeSaveChangesDialog
740
760
  },
741
761
  confirm: {
@@ -766,8 +786,8 @@ function PopulateStore() {
766
786
  }
767
787
 
768
788
  // src/sync-with-document-save.ts
769
- var import_editor_documents3 = require("@elementor/editor-documents");
770
- var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
789
+ var import_editor_documents4 = require("@elementor/editor-documents");
790
+ var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
771
791
  var import_store14 = require("@elementor/store");
772
792
  function syncWithDocumentSave() {
773
793
  const unsubscribe = syncDirtyState();
@@ -779,11 +799,11 @@ function syncDirtyState() {
779
799
  if (!isDirty()) {
780
800
  return;
781
801
  }
782
- (0, import_editor_documents3.setDocumentModifiedStatus)(true);
802
+ (0, import_editor_documents4.setDocumentModifiedStatus)(true);
783
803
  });
784
804
  }
785
805
  function bindSaveAction() {
786
- (0, import_editor_v1_adapters2.registerDataHook)("after", "document/save/save", (args) => {
806
+ (0, import_editor_v1_adapters3.registerDataHook)("after", "document/save/save", (args) => {
787
807
  return saveGlobalClasses({
788
808
  context: args.status === "publish" ? "frontend" : "preview"
789
809
  });
@@ -806,7 +826,7 @@ function init() {
806
826
  id: "global-classes-manager-button",
807
827
  component: ClassManagerButton
808
828
  });
809
- (0, import_editor_v1_adapters3.__privateListenTo)((0, import_editor_v1_adapters3.v1ReadyEvent)(), () => {
829
+ (0, import_editor_v1_adapters4.__privateListenTo)((0, import_editor_v1_adapters4.v1ReadyEvent)(), () => {
810
830
  syncWithDocumentSave();
811
831
  });
812
832
  }