@embedpdf/plugin-ui 1.0.11 → 1.0.12
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/dist/index.cjs +2 -883
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -495
- package/dist/index.js +37 -56
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +88 -0
- package/dist/lib/icons/icon-manager.d.ts +47 -0
- package/dist/lib/icons/types.d.ts +36 -0
- package/dist/lib/index.d.ts +13 -0
- package/dist/lib/manifest.d.ts +4 -0
- package/dist/lib/menu/menu-manager.d.ts +98 -0
- package/dist/lib/menu/types.d.ts +83 -0
- package/dist/lib/menu/utils.d.ts +5 -0
- package/dist/lib/reducer.d.ts +5 -0
- package/dist/lib/types.d.ts +204 -0
- package/dist/lib/ui-component.d.ts +30 -0
- package/dist/lib/ui-plugin.d.ts +24 -0
- package/dist/lib/utils.d.ts +33 -0
- package/dist/preact/adapter.d.ts +5 -0
- package/dist/preact/core.d.ts +1 -0
- package/dist/preact/index.cjs +2 -130
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.d.ts +1 -70
- package/dist/preact/index.js +19 -26
- package/dist/preact/index.js.map +1 -1
- package/dist/react/adapter.d.ts +2 -0
- package/dist/react/core.d.ts +1 -0
- package/dist/react/index.cjs +2 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +1 -2
- package/dist/react/index.js +92 -1
- package/dist/react/index.js.map +1 -1
- package/dist/shared-preact/components/component-wrapper.d.ts +5 -0
- package/dist/shared-preact/components/index.d.ts +1 -0
- package/dist/shared-preact/components/plugin-ui-provider.d.ts +37 -0
- package/dist/shared-preact/hooks/index.d.ts +2 -0
- package/dist/shared-preact/hooks/use-icon.d.ts +15 -0
- package/dist/shared-preact/hooks/use-ui.d.ts +11 -0
- package/dist/shared-preact/index.d.ts +2 -0
- package/dist/shared-react/components/component-wrapper.d.ts +5 -0
- package/dist/shared-react/components/index.d.ts +1 -0
- package/dist/shared-react/components/plugin-ui-provider.d.ts +37 -0
- package/dist/shared-react/hooks/index.d.ts +2 -0
- package/dist/shared-react/hooks/use-icon.d.ts +15 -0
- package/dist/shared-react/hooks/use-ui.d.ts +11 -0
- package/dist/shared-react/index.d.ts +2 -0
- package/package.json +14 -11
- package/dist/index.d.cts +0 -495
- package/dist/preact/index.d.cts +0 -70
- package/dist/react/index.d.cts +0 -2
package/dist/preact/index.d.cts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { JSX, h } from 'preact';
|
|
2
|
-
import * as _embedpdf_plugin_ui from '@embedpdf/plugin-ui';
|
|
3
|
-
import { UIPlugin, Icon, IconRegistry, IconIdentifier } from '@embedpdf/plugin-ui';
|
|
4
|
-
|
|
5
|
-
/** @jsxImportSource preact */
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Interface for UI components organized by type/location
|
|
9
|
-
*/
|
|
10
|
-
interface UIComponentsMap {
|
|
11
|
-
headers: {
|
|
12
|
-
top: JSX.Element[];
|
|
13
|
-
bottom: JSX.Element[];
|
|
14
|
-
left: JSX.Element[];
|
|
15
|
-
right: JSX.Element[];
|
|
16
|
-
};
|
|
17
|
-
panels: {
|
|
18
|
-
left: JSX.Element[];
|
|
19
|
-
right: JSX.Element[];
|
|
20
|
-
};
|
|
21
|
-
floating: {
|
|
22
|
-
insideScroller: JSX.Element[];
|
|
23
|
-
outsideScroller: JSX.Element[];
|
|
24
|
-
};
|
|
25
|
-
commandMenu: JSX.Element | null;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Props for the PluginUIProvider
|
|
29
|
-
*/
|
|
30
|
-
interface PluginUIProviderProps {
|
|
31
|
-
/**
|
|
32
|
-
* Render function that receives UI components
|
|
33
|
-
*/
|
|
34
|
-
children: (components: UIComponentsMap) => JSX.Element;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* PluginUIProvider collects all components from the UI plugin system
|
|
38
|
-
* and provides them to a render function without imposing any structure.
|
|
39
|
-
*
|
|
40
|
-
* It uses the render props pattern for maximum flexibility.
|
|
41
|
-
*/
|
|
42
|
-
declare function PluginUIProvider({ children }: PluginUIProviderProps): h.JSX.Element;
|
|
43
|
-
|
|
44
|
-
declare const useUIPlugin: () => {
|
|
45
|
-
plugin: UIPlugin | null;
|
|
46
|
-
isLoading: boolean;
|
|
47
|
-
ready: Promise<void>;
|
|
48
|
-
};
|
|
49
|
-
declare const useUICapability: () => {
|
|
50
|
-
provides: Readonly<_embedpdf_plugin_ui.UICapability> | null;
|
|
51
|
-
isLoading: boolean;
|
|
52
|
-
ready: Promise<void>;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Hook to access icon functionality in React
|
|
57
|
-
*/
|
|
58
|
-
declare function useIcon(): {
|
|
59
|
-
registerIcon: (icon: Icon) => void;
|
|
60
|
-
registerIcons: (icons: Icon[] | IconRegistry) => void;
|
|
61
|
-
getIcon: (id: string) => Icon | undefined;
|
|
62
|
-
getAllIcons: () => IconRegistry;
|
|
63
|
-
getSvgString: (identifier: IconIdentifier) => string | undefined;
|
|
64
|
-
isSvgString: (identifier: IconIdentifier) => boolean;
|
|
65
|
-
isSvgDataUri: (value: string) => boolean;
|
|
66
|
-
dataUriToSvgString: (dataUri: string) => string;
|
|
67
|
-
svgStringToDataUri: (svgString: string) => string;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export { PluginUIProvider, type PluginUIProviderProps, type UIComponentsMap, useIcon, useUICapability, useUIPlugin };
|
package/dist/react/index.d.cts
DELETED