platform-bible-utils
    Preparing search index...

    Type Alias MenuItemContainingCommand

    MenuItemContainingCommand: MenuItemBase & {
        checked?: boolean;
        checkedWhen?: string;
        command: ReferencedItem;
        iconPathAfter?: string;
        iconPathBefore?: string;
        shortcut?: string;
    }

    Menu item that runs a command

    Type declaration

    • Optional Experimentalchecked?: boolean

      Whether this menu item's checkbox is currently checked. Computed at runtime from MenuItemContainingCommand.checkedWhen by evaluateMenu — NOT allowed in menus.json contributions (rejected by the schema).

      This field is unstable and may change or disappear without notice

    • Optional ExperimentalcheckedWhen?: string

      When-expression controlling whether this menu item shows a checkmark. If provided, the item renders as a checkbox-style item (checked or unchecked); if not provided, the item renders as a plain item. Same grammar as MenuItemBase.when.

      This field is unstable and may change or disappear without notice

    • command: ReferencedItem

      Name of the PAPI command to run when this menu item is selected.

    • OptionaliconPathAfter?: string

      Uri path to the icon to display after the menu text, shown at up to 16px wide and tall (the size of a named icon). Ex: papi-extension://helloWorld/assets/icon.png

    • OptionaliconPathBefore?: string

      Uri path to the icon to display before the menu text, shown at up to 16px wide and tall (the size of a named icon). Ex: papi-extension://helloWorld/assets/icon.png

    • Optional Experimentalshortcut?: string

      Display text for the keyboard shortcut that runs this item's command (e.g. ⌃F on macOS, Ctrl+F on Windows and Linux), shown at the end of the row. It is display-only: renderers split it into one keycap per key, but never treat it as a key binding.

      The platform fills it in from its keyboard shortcuts catalog in the localized menus it serves; the unlocalized main menu never has it. Key names are not localized, and only the first catalogued alternative is shown.

      A menus.json contribution cannot set it: the menus schema rejects it, which rejects the extension's whole menus.json.

      This field is unstable and may change or disappear without notice