AcEdEvents: {
    "failed-to-get-avaiable-fonts": { url: string };
    "failed-to-open-file": { fileName: string };
    "font-not-found": { count: number; fontName: string };
    "font-not-loaded": { fontName: string; url: string };
    message: { message: string; type: AcEdMessageType };
    "open-file": {};
    "open-file-progress": AcEdOpenFileProgressEventArgs;
}

Type definition for all events that can be emitted through the global event bus.

This type maps event names to their corresponding payload types, providing type safety for event emission and listening throughout the application.

  • File Operations: open-file, open-file-progress, failed-to-open-file
  • Font Management: font-not-loaded, failed-to-get-avaiable-fonts, font-not-found
  • User Messages: message

Type declaration

  • failed-to-get-avaiable-fonts: { url: string }

    Emitted when the available fonts list cannot be retrieved

    • url: string

      URL where the fonts list was attempted to be retrieved from

  • failed-to-open-file: { fileName: string }

    Emitted when a file fails to open

    • fileName: string

      Name/path of the file that failed to open

  • font-not-found: { count: number; fontName: string }

    Emitted when a required font is not found

    • count: number

      Number of entities that require this font

    • fontName: string

      Name of the missing font

  • font-not-loaded: { fontName: string; url: string }

    Emitted when a font fails to load

    • fontName: string

      Name of the font that failed to load

    • url: string

      URL where the font was attempted to be loaded from

  • message: { message: string; type: AcEdMessageType }

    Emitted to display a message to the user

    • message: string

      The message text to display

    • type: AcEdMessageType

      The severity/type of the message

  • open-file: {}

    Emitted to request opening a file dialog

  • open-file-progress: AcEdOpenFileProgressEventArgs

    Emitted during file opening to report progress