@elementor/editor-global-classes 4.1.0-823 → 4.1.0-824

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 CHANGED
@@ -2217,16 +2217,6 @@ var StartSyncToV3Modal = ({
2217
2217
  // src/components/class-manager/class-manager-panel.tsx
2218
2218
  var STOP_SYNC_MESSAGE_KEY = "stop-sync-class";
2219
2219
  var id = "global-classes-manager";
2220
- var reloadDocument = () => {
2221
- const currentDocument = (0, import_editor_documents3.getCurrentDocument)();
2222
- const documentsManager = (0, import_editor_documents3.getV1DocumentsManager)();
2223
- documentsManager.invalidateCache();
2224
- return (0, import_editor_v1_adapters2.__privateRunCommand)("editor/documents/switch", {
2225
- id: currentDocument?.id,
2226
- shouldScroll: false,
2227
- shouldNavigateToDefaultRoute: false
2228
- });
2229
- };
2230
2220
  var { panel, usePanelActions } = (0, import_editor_panels.__createPanel)({
2231
2221
  id,
2232
2222
  component: ClassManagerPanel,
@@ -2237,7 +2227,7 @@ var { panel, usePanelActions } = (0, import_editor_panels.__createPanel)({
2237
2227
  },
2238
2228
  onClose: async () => {
2239
2229
  (0, import_editor_v1_adapters2.changeEditMode)("edit");
2240
- await reloadDocument();
2230
+ await (0, import_editor_documents3.reloadCurrentDocument)();
2241
2231
  unblockPanelInteractions();
2242
2232
  },
2243
2233
  isOpenPreviousElement: true
@@ -2549,6 +2539,7 @@ function createClassName(prefix) {
2549
2539
 
2550
2540
  // src/components/global-styles-import-listener.tsx
2551
2541
  var import_react11 = require("react");
2542
+ var import_editor_canvas = require("@elementor/editor-canvas");
2552
2543
  var import_store22 = require("@elementor/store");
2553
2544
  function GlobalStylesImportListener() {
2554
2545
  const dispatch5 = (0, import_store22.__useDispatch)();
@@ -2587,12 +2578,9 @@ function GlobalStylesImportListener() {
2587
2578
  }).catch(() => {
2588
2579
  });
2589
2580
  };
2590
- window.addEventListener("elementor/global-styles/imported", handleGlobalStylesImported);
2581
+ window.addEventListener(import_editor_canvas.GLOBAL_STYLES_IMPORTED_EVENT, handleGlobalStylesImported);
2591
2582
  return () => {
2592
- window.removeEventListener(
2593
- "elementor/global-styles/imported",
2594
- handleGlobalStylesImported
2595
- );
2583
+ window.removeEventListener(import_editor_canvas.GLOBAL_STYLES_IMPORTED_EVENT, handleGlobalStylesImported);
2596
2584
  };
2597
2585
  }, [dispatch5]);
2598
2586
  return null;
@@ -2819,7 +2807,7 @@ function initMcpApplyGetGlobalClassUsages(reg) {
2819
2807
  }
2820
2808
 
2821
2809
  // src/mcp-integration/mcp-manage-global-classes.ts
2822
- var import_editor_canvas = require("@elementor/editor-canvas");
2810
+ var import_editor_canvas2 = require("@elementor/editor-canvas");
2823
2811
  var import_editor_props = require("@elementor/editor-props");
2824
2812
  var import_editor_styles3 = require("@elementor/editor-styles");
2825
2813
  var import_schema3 = require("@elementor/schema");
@@ -2979,8 +2967,8 @@ var initManageGlobalClasses = (reg) => {
2979
2967
  name: "manage-global-classes",
2980
2968
  requiredResources: [
2981
2969
  { uri: GLOBAL_CLASSES_URI, description: "Global classes list" },
2982
- { uri: import_editor_canvas.STYLE_SCHEMA_URI, description: "Style schema resources" },
2983
- { uri: import_editor_canvas.BREAKPOINTS_SCHEMA_URI, description: "Breakpoints list" }
2970
+ { uri: import_editor_canvas2.STYLE_SCHEMA_URI, description: "Style schema resources" },
2971
+ { uri: import_editor_canvas2.BREAKPOINTS_SCHEMA_URI, description: "Breakpoints list" }
2984
2972
  ],
2985
2973
  modelPreferences: {
2986
2974
  intelligencePriority: 0.85,