Browse Source

fix: remove unused dummy property and export ComponentDragEventProps for better accessibility

carlos/adjust-component-drag-types
Carlos 10 months ago
parent
commit
84ef29293e
  1. 6
      packages/core/src/commands/index.ts
  2. 1
      packages/core/src/index.ts

6
packages/core/src/commands/index.ts

@ -43,7 +43,6 @@ import Component, { eventDrag } from '../dom_components/model/Component';
import type Editor from '../editor/model/Editor';
import type { ObjectAny } from '../common';
import CommandsEvents from './types';
import type { ComponentDragEventProps } from './view/ComponentDrag';
export type CommandEvent = 'run' | 'stop' | `run:${string}` | `stop:${string}` | `abort:${string}`;
@ -451,9 +450,4 @@ export default class CommandsModule extends Module<CommandsConfig & { pStylePref
this.commands = {};
this.active = {};
}
// Dummy property to ensure ComponentDragEventProps type is included in the build
dummyComponentDragEventProps() {
return undefined as ComponentDragEventProps | undefined;
}
}

1
packages/core/src/index.ts

@ -96,6 +96,7 @@ export const grapesjs = {
* @deprecated Changed to CategoryProperties
*/
export type { CategoryProperties as BlockCategoryProperties } from './abstract/ModuleCategory';
export type { ComponentDragEventProps } from './commands/view/ComponentDrag';
// Exports for TS
export type { default as Asset } from './asset_manager/model/Asset';

Loading…
Cancel
Save