@embedpdf/plugin-ui 1.0.10 → 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.
Files changed (50) hide show
  1. package/dist/index.cjs +2 -883
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.ts +1 -495
  4. package/dist/index.js +37 -56
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/actions.d.ts +88 -0
  7. package/dist/lib/icons/icon-manager.d.ts +47 -0
  8. package/dist/lib/icons/types.d.ts +36 -0
  9. package/dist/lib/index.d.ts +13 -0
  10. package/dist/lib/manifest.d.ts +4 -0
  11. package/dist/lib/menu/menu-manager.d.ts +98 -0
  12. package/dist/lib/menu/types.d.ts +83 -0
  13. package/dist/lib/menu/utils.d.ts +5 -0
  14. package/dist/lib/reducer.d.ts +5 -0
  15. package/dist/lib/types.d.ts +204 -0
  16. package/dist/lib/ui-component.d.ts +30 -0
  17. package/dist/lib/ui-plugin.d.ts +24 -0
  18. package/dist/lib/utils.d.ts +33 -0
  19. package/dist/preact/adapter.d.ts +5 -0
  20. package/dist/preact/core.d.ts +1 -0
  21. package/dist/preact/index.cjs +2 -130
  22. package/dist/preact/index.cjs.map +1 -1
  23. package/dist/preact/index.d.ts +1 -70
  24. package/dist/preact/index.js +19 -26
  25. package/dist/preact/index.js.map +1 -1
  26. package/dist/react/adapter.d.ts +2 -0
  27. package/dist/react/core.d.ts +1 -0
  28. package/dist/react/index.cjs +2 -2
  29. package/dist/react/index.cjs.map +1 -1
  30. package/dist/react/index.d.ts +1 -2
  31. package/dist/react/index.js +92 -1
  32. package/dist/react/index.js.map +1 -1
  33. package/dist/shared-preact/components/component-wrapper.d.ts +5 -0
  34. package/dist/shared-preact/components/index.d.ts +1 -0
  35. package/dist/shared-preact/components/plugin-ui-provider.d.ts +37 -0
  36. package/dist/shared-preact/hooks/index.d.ts +2 -0
  37. package/dist/shared-preact/hooks/use-icon.d.ts +15 -0
  38. package/dist/shared-preact/hooks/use-ui.d.ts +11 -0
  39. package/dist/shared-preact/index.d.ts +2 -0
  40. package/dist/shared-react/components/component-wrapper.d.ts +5 -0
  41. package/dist/shared-react/components/index.d.ts +1 -0
  42. package/dist/shared-react/components/plugin-ui-provider.d.ts +37 -0
  43. package/dist/shared-react/hooks/index.d.ts +2 -0
  44. package/dist/shared-react/hooks/use-icon.d.ts +15 -0
  45. package/dist/shared-react/hooks/use-ui.d.ts +11 -0
  46. package/dist/shared-react/index.d.ts +2 -0
  47. package/package.json +14 -11
  48. package/dist/index.d.cts +0 -495
  49. package/dist/preact/index.d.cts +0 -70
  50. package/dist/react/index.d.cts +0 -2
@@ -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 };
@@ -1,2 +0,0 @@
1
-
2
- export { }