@embedpdf/plugin-commands 3.0.0-next.9 → 3.1.0

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.
@@ -0,0 +1,30 @@
1
+ import { c as CommandId, l as CommandRefusal, u as CommandsCapability } from "./contract-CeyIrbN0.js";
2
+ import { KeyStroke } from "@embedpdf/core-ui";
3
+ //#region src/host-contract.d.ts
4
+ /** The command a keystroke's shortcut names, and why it won't run when it's refused. */
5
+ interface ShortcutMatch {
6
+ readonly commandId: CommandId;
7
+ /** Set when the command is turned off or not allowed; `null` when it may run (or just can't right now). */
8
+ readonly refusal: CommandRefusal | null;
9
+ }
10
+ interface CommandsHostCapability extends CommandsCapability {
11
+ /**
12
+ * The command whose shortcut a keystroke matches, for the active document, or `null`. Of
13
+ * several with the same keys, one that can run now wins, then one that isn't refused (it only
14
+ * can't run right now); a refused one counts only while its `visible` says it would show. With
15
+ * `inTextField` (the key was typed in one), only a command whose `shortcutInTextFields` says so
16
+ * matches.
17
+ */
18
+ matchStroke(stroke: KeyStroke, options: {
19
+ isMac: boolean;
20
+ inTextField?: boolean;
21
+ }): ShortcutMatch | null;
22
+ /** The menu a command opens, for the "More" menu's nested menus; `null` for an unknown id. */
23
+ getMenuTarget(id: CommandId): {
24
+ menu?: string;
25
+ } | null;
26
+ }
27
+ declare const CommandsToken: import("@embedpdf/core").CapabilityToken<CommandsHostCapability>;
28
+ //#endregion
29
+ export { CommandsToken as n, ShortcutMatch as r, CommandsHostCapability as t };
30
+ //# sourceMappingURL=host-contract-BYueFQCF.d.ts.map
@@ -0,0 +1,30 @@
1
+ import { c as CommandId, l as CommandRefusal, u as CommandsCapability } from "./contract-CeyIrbN0.cjs";
2
+ import { KeyStroke } from "@embedpdf/core-ui";
3
+ //#region src/host-contract.d.ts
4
+ /** The command a keystroke's shortcut names, and why it won't run when it's refused. */
5
+ interface ShortcutMatch {
6
+ readonly commandId: CommandId;
7
+ /** Set when the command is turned off or not allowed; `null` when it may run (or just can't right now). */
8
+ readonly refusal: CommandRefusal | null;
9
+ }
10
+ interface CommandsHostCapability extends CommandsCapability {
11
+ /**
12
+ * The command whose shortcut a keystroke matches, for the active document, or `null`. Of
13
+ * several with the same keys, one that can run now wins, then one that isn't refused (it only
14
+ * can't run right now); a refused one counts only while its `visible` says it would show. With
15
+ * `inTextField` (the key was typed in one), only a command whose `shortcutInTextFields` says so
16
+ * matches.
17
+ */
18
+ matchStroke(stroke: KeyStroke, options: {
19
+ isMac: boolean;
20
+ inTextField?: boolean;
21
+ }): ShortcutMatch | null;
22
+ /** The menu a command opens, for the "More" menu's nested menus; `null` for an unknown id. */
23
+ getMenuTarget(id: CommandId): {
24
+ menu?: string;
25
+ } | null;
26
+ }
27
+ declare const CommandsToken: import("@embedpdf/core").CapabilityToken<CommandsHostCapability>;
28
+ //#endregion
29
+ export { CommandsToken as n, ShortcutMatch as r, CommandsHostCapability as t };
30
+ //# sourceMappingURL=host-contract-DQl-nsDH.d.cts.map