@lofcz/embedpdf-plugin-commands 2.15.0 → 3.0.0-next.7
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/LICENSE +192 -21
- package/dist/index.cjs +196 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +150 -0
- package/dist/index.d.ts +150 -1
- package/dist/index.js +189 -379
- package/dist/index.js.map +1 -1
- package/package.json +21 -40
- package/dist/lib/actions.d.ts +0 -8
- package/dist/lib/commands-plugin.d.ts +0 -40
- package/dist/lib/index.d.ts +0 -8
- package/dist/lib/manifest.d.ts +0 -4
- package/dist/lib/reducer.d.ts +0 -5
- package/dist/lib/types.d.ts +0 -116
- package/dist/react/adapter.d.ts +0 -2
- package/dist/react/core.d.ts +0 -1
- package/dist/react/index.cjs +0 -2
- package/dist/react/index.cjs.map +0 -1
- package/dist/react/index.d.ts +0 -1
- package/dist/react/index.js +0 -90
- package/dist/react/index.js.map +0 -1
- package/dist/shared/components/index.d.ts +0 -1
- package/dist/shared/components/keyboard-shortcuts.d.ts +0 -6
- package/dist/shared/hooks/index.d.ts +0 -1
- package/dist/shared/hooks/use-commands.d.ts +0 -23
- package/dist/shared/index.d.ts +0 -4
- package/dist/shared/utils/index.d.ts +0 -1
- package/dist/shared/utils/keyboard-handler.d.ts +0 -10
- package/dist/shared-react/components/index.d.ts +0 -1
- package/dist/shared-react/components/keyboard-shortcuts.d.ts +0 -6
- package/dist/shared-react/hooks/index.d.ts +0 -1
- package/dist/shared-react/hooks/use-commands.d.ts +0 -23
- package/dist/shared-react/index.d.ts +0 -4
- package/dist/shared-react/utils/index.d.ts +0 -1
- package/dist/shared-react/utils/keyboard-handler.d.ts +0 -10
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { CommandsPlugin, ResolvedCommand } from '../../lib/index.ts';
|
|
2
|
-
export declare const useCommandsCapability: () => {
|
|
3
|
-
provides: Readonly<import('../../lib/index.ts').CommandsCapability> | null;
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
ready: Promise<void>;
|
|
6
|
-
};
|
|
7
|
-
export declare const useCommandsPlugin: () => {
|
|
8
|
-
plugin: CommandsPlugin | null;
|
|
9
|
-
isLoading: boolean;
|
|
10
|
-
ready: Promise<void>;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Hook to get a reactive command for a specific document
|
|
14
|
-
* Automatically updates when command state changes
|
|
15
|
-
* @param commandId Command ID
|
|
16
|
-
* @param documentId Document ID
|
|
17
|
-
* @returns ResolvedCommand or null if not available
|
|
18
|
-
*/
|
|
19
|
-
export declare const useCommand: (commandId: string, documentId: string) => ResolvedCommand | null;
|
|
20
|
-
/**
|
|
21
|
-
* Hook to execute a command
|
|
22
|
-
*/
|
|
23
|
-
export declare const useCommandExecutor: (documentId: string) => (commandId: string) => void;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export * from './hooks';
|
|
2
|
-
export * from './components';
|
|
3
|
-
export * from '../lib/index.ts';
|
|
4
|
-
export declare const CommandsPluginPackage: import('@embedpdf/core').WithAutoMount<import('@embedpdf/core').PluginPackage<import('../lib/index.ts').CommandsPlugin, import('../lib/index.ts').CommandsPluginConfig, import('../lib/index.ts').CommandsState, import('../lib/actions').SetDisabledCategoriesAction>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './keyboard-handler';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CommandsCapability } from '../../lib/types';
|
|
2
|
-
/**
|
|
3
|
-
* Build a shortcut string from a keyboard event
|
|
4
|
-
* @example Ctrl+Shift+A -> "ctrl+shift+a"
|
|
5
|
-
*/
|
|
6
|
-
export declare function buildShortcutString(event: KeyboardEvent): string | null;
|
|
7
|
-
/**
|
|
8
|
-
* Handle keyboard events and execute commands based on shortcuts
|
|
9
|
-
*/
|
|
10
|
-
export declare function createKeyDownHandler(commands: CommandsCapability): (event: KeyboardEvent) => void;
|